@@ -1038,8 +1038,8 @@ def from_enum(enum_value: str, buckets: t.Optional[int] = None) -> t.Dict[str, t
10381038 Dict with kind/columns/buckets fields
10391039
10401040 Example:
1041- >>> DistributionTupleInputType .from_enum("RANDOM")
1042- {" kind": " RANDOM", " columns" : [], " buckets" : None}
1041+ >>> DistributionTupleOutputType .from_enum("RANDOM")
1042+ {' kind': ' RANDOM', ' columns' : [], ' buckets' : None}
10431043 """
10441044 return {"kind" : enum_value , "columns" : [], "buckets" : buckets }
10451045
@@ -1058,8 +1058,8 @@ def from_func(
10581058 Dict with kind/columns/buckets fields
10591059
10601060 Example:
1061- >>> func = parse_one("HASH(id, dt)")
1062- >>> DistributionTupleInputType .from_func(func)
1061+ >> func = sqlglot. parse_one("HASH(id, dt)")
1062+ >> DistributionTupleOutputType .from_func(func)
10631063 {"kind": "HASH", "columns": [exp.Column("id"), exp.Column("dt")], "buckets": None}
10641064 """
10651065 func_name = func .name .upper () if hasattr (func , "name" ) else str (func .this ).upper ()
@@ -1095,17 +1095,17 @@ def to_unified_dict(
10951095 TypeError: If value type is not supported
10961096
10971097 Example:
1098- >>> # From DistributionTupleInputType
1099- >>> DistributionTupleInputType .to_unified_dict({"kind": "HASH", "columns": [...]})
1100- {" kind": " HASH", " columns" : [...], "buckets": None }
1098+ >>> # From DistributionTupleOutputType
1099+ >>> DistributionTupleOutputType .to_unified_dict({"kind": "HASH", "columns": [...]})
1100+ {' kind': ' HASH', ' columns' : [Ellipsis] }
11011101
11021102 >>> # From EnumType
1103- >>> DistributionTupleInputType .to_unified_dict("RANDOM")
1104- {" kind": " RANDOM", " columns" : [], " buckets" : None}
1103+ >>> DistributionTupleOutputType .to_unified_dict("RANDOM")
1104+ {' kind': ' RANDOM', ' columns' : [], ' buckets' : None}
11051105
1106- >>> # From FuncType
1107- >>> DistributionTupleInputType .to_unified_dict(parse_one("HASH(id)"))
1108- {" kind": " HASH", " columns" : [exp.Column("id" )], " buckets" : None}
1106+ >> # From FuncType
1107+ >> DistributionTupleOutputType .to_unified_dict(sqlglot. parse_one("HASH(id)"))
1108+ {' kind': ' HASH', ' columns' : [exp.Column('id' )], ' buckets' : None}
11091109 """
11101110 if isinstance (normalized_value , dict ):
11111111 # Already in DistributionTupleInputType format
@@ -1422,7 +1422,7 @@ def ensure_parenthesized(value: t.Any) -> t.Any:
14221422 >>> PropertyValidator.ensure_parenthesized(exp.Literal.string('id1, id2'))
14231423 '(id1, id2)'
14241424 >>> PropertyValidator.ensure_parenthesized(exp.Column(quoted=True, name='id1, id2'))
1425- '( id1, id2)'
1425+ Column(quoted=True, name= id1, id2)
14261426 """
14271427 # logger.debug("ensure_parenthesized. value: %s, type: %s", value, type(value))
14281428
@@ -1526,7 +1526,7 @@ def check_invalid_names(
15261526 SQLMeshError: If any invalid name is found
15271527
15281528 Example:
1529- >>> PropertyValidator.check_invalid_names(
1529+ >> PropertyValidator.check_invalid_names(
15301530 ... valid_name="partitioned_by",
15311531 ... invalid_names=["partition_by", "partition"],
15321532 ... table_properties={"partition_by": "dt"}
@@ -1579,7 +1579,7 @@ def check_at_most_one(
15791579 SQLMeshError: If multiple properties from the group are defined
15801580
15811581 Example:
1582- >>> PropertyValidator.check_at_most_one(
1582+ >> PropertyValidator.check_at_most_one(
15831583 ... property_name="primary_key",
15841584 ... property_description="key type",
15851585 ... exclusive_property_names=["primary_key", "duplicate_key", "unique_key", "aggregate_key"],
0 commit comments