Adding upstream version 25.16.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
a500eebbbb
commit
1341bc6477
110 changed files with 75353 additions and 68092 deletions
|
@ -30,6 +30,7 @@ def qualify(
|
|||
validate_qualify_columns: bool = True,
|
||||
quote_identifiers: bool = True,
|
||||
identify: bool = True,
|
||||
infer_csv_schemas: bool = False,
|
||||
) -> exp.Expression:
|
||||
"""
|
||||
Rewrite sqlglot AST to have normalized and qualified tables and columns.
|
||||
|
@ -60,13 +61,21 @@ def qualify(
|
|||
This step is necessary to ensure correctness for case sensitive queries.
|
||||
But this flag is provided in case this step is performed at a later time.
|
||||
identify: If True, quote all identifiers, else only necessary ones.
|
||||
infer_csv_schemas: Whether to scan READ_CSV calls in order to infer the CSVs' schemas.
|
||||
|
||||
Returns:
|
||||
The qualified expression.
|
||||
"""
|
||||
schema = ensure_schema(schema, dialect=dialect)
|
||||
expression = normalize_identifiers(expression, dialect=dialect)
|
||||
expression = qualify_tables(expression, db=db, catalog=catalog, schema=schema, dialect=dialect)
|
||||
expression = qualify_tables(
|
||||
expression,
|
||||
db=db,
|
||||
catalog=catalog,
|
||||
schema=schema,
|
||||
dialect=dialect,
|
||||
infer_csv_schemas=infer_csv_schemas,
|
||||
)
|
||||
|
||||
if isolate_tables:
|
||||
expression = isolate_table_selects(expression, schema=schema)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue