sqlglotc 30.4.2__tar.gz → 30.4.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of sqlglotc might be problematic. Click here for more details.
- {sqlglotc-30.4.2/sqlglotc.egg-info → sqlglotc-30.4.3}/PKG-INFO +1 -1
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/snowflake.py +1 -1
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/snowflake.py +15 -9
- {sqlglotc-30.4.2 → sqlglotc-30.4.3/sqlglotc.egg-info}/PKG-INFO +1 -1
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/MANIFEST.in +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/pyproject.toml +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/setup.cfg +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/setup.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/errors.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/executor/table.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/expressions/aggregate.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/expressions/array.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/expressions/builders.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/expressions/constraints.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/expressions/core.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/expressions/datatypes.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/expressions/ddl.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/expressions/dml.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/expressions/functions.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/expressions/json.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/expressions/math.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/expressions/properties.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/expressions/query.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/expressions/string.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/expressions/temporal.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generator.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/athena.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/bigquery.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/clickhouse.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/databricks.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/doris.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/dremio.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/drill.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/druid.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/duckdb.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/dune.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/exasol.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/fabric.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/hive.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/materialize.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/mysql.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/oracle.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/postgres.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/presto.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/prql.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/redshift.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/risingwave.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/singlestore.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/solr.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/spark.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/spark2.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/sqlite.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/starrocks.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/tableau.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/teradata.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/trino.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/generators/tsql.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/helper.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/optimizer/annotate_types.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/optimizer/isolate_table_selects.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/optimizer/normalize_identifiers.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/optimizer/qualify.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/optimizer/qualify_columns.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/optimizer/qualify_tables.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/optimizer/resolver.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/optimizer/scope.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/optimizer/simplify.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parser.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/athena.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/base.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/bigquery.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/clickhouse.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/databricks.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/doris.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/dremio.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/drill.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/druid.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/duckdb.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/dune.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/exasol.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/fabric.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/hive.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/materialize.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/mysql.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/oracle.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/postgres.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/presto.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/prql.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/redshift.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/risingwave.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/singlestore.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/solr.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/spark.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/spark2.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/sqlite.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/starrocks.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/tableau.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/teradata.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/trino.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/parsers/tsql.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/schema.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/serde.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/time.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/tokenizer_core.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglot/trie.py +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglotc.egg-info/SOURCES.txt +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglotc.egg-info/dependency_links.txt +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglotc.egg-info/requires.txt +0 -0
- {sqlglotc-30.4.2 → sqlglotc-30.4.3}/sqlglotc.egg-info/top_level.txt +0 -0
|
@@ -863,7 +863,7 @@ class SnowflakeGenerator(generator.Generator):
|
|
|
863
863
|
def rowaccessproperty_sql(self, expression: exp.RowAccessProperty) -> str:
|
|
864
864
|
if not expression.this:
|
|
865
865
|
return "ROW ACCESS"
|
|
866
|
-
on = f" ON ({self.expressions(expression, flat=True)})"
|
|
866
|
+
on = f" ON ({self.expressions(expression, flat=True)})" if expression.expressions else ""
|
|
867
867
|
return f"WITH ROW ACCESS POLICY {self.sql(expression, 'this')}{on}"
|
|
868
868
|
|
|
869
869
|
def describe_sql(self, expression: exp.Describe) -> str:
|
|
@@ -978,15 +978,21 @@ class SnowflakeParser(parser.Parser):
|
|
|
978
978
|
return super()._parse_with_property()
|
|
979
979
|
|
|
980
980
|
def _parse_row_access_policy(self) -> exp.RowAccessProperty:
|
|
981
|
-
policy
|
|
982
|
-
if
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
)
|
|
989
|
-
|
|
981
|
+
# GET_DDL outputs #unknown_policy when the user lacks privileges to see the policy name
|
|
982
|
+
if self._match(TokenType.HASH):
|
|
983
|
+
policy: exp.Expr | None = self._parse_var(any_token=True)
|
|
984
|
+
if policy:
|
|
985
|
+
policy = exp.Var(this=f"#{policy.name}")
|
|
986
|
+
expressions = None
|
|
987
|
+
else:
|
|
988
|
+
policy = self._parse_column()
|
|
989
|
+
if isinstance(policy, exp.Column):
|
|
990
|
+
policy = policy.to_dot()
|
|
991
|
+
if not self._match(TokenType.ON):
|
|
992
|
+
self.raise_error("Expected ON after ROW ACCESS POLICY name")
|
|
993
|
+
expressions = self._parse_wrapped_csv(self._parse_id_var)
|
|
994
|
+
|
|
995
|
+
return self.expression(exp.RowAccessProperty(this=policy, expressions=expressions))
|
|
990
996
|
|
|
991
997
|
def _parse_create(self) -> exp.Create | exp.Command:
|
|
992
998
|
expression = super()._parse_create()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|