From 19c235d26e420af155fcf7328eb36c8277a17f23 Mon Sep 17 00:00:00 2001 From: Harshal Sheth Date: Fri, 19 Apr 2024 15:33:15 -0700 Subject: [PATCH] feat(ingest): bump acryl-sqlglot dep --- metadata-ingestion/setup.py | 2 +- .../sql_parsing/goldens/test_select_max_with_schema.json | 8 ++++++-- .../goldens/test_snowflake_default_normalization.json | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/metadata-ingestion/setup.py b/metadata-ingestion/setup.py index 2f981af75e2ce..93b73570a1072 100644 --- a/metadata-ingestion/setup.py +++ b/metadata-ingestion/setup.py @@ -99,7 +99,7 @@ sqlglot_lib = { # Using an Acryl fork of sqlglot. # https://github.com/tobymao/sqlglot/compare/main...hsheth2:sqlglot:hsheth?expand=1 - "acryl-sqlglot==23.2.1.dev5", + "acryl-sqlglot==23.11.2.dev2", } classification_lib = { diff --git a/metadata-ingestion/tests/unit/sql_parsing/goldens/test_select_max_with_schema.json b/metadata-ingestion/tests/unit/sql_parsing/goldens/test_select_max_with_schema.json index 974bb510e8d88..22ff805ab8efc 100644 --- a/metadata-ingestion/tests/unit/sql_parsing/goldens/test_select_max_with_schema.json +++ b/metadata-ingestion/tests/unit/sql_parsing/goldens/test_select_max_with_schema.json @@ -11,8 +11,12 @@ "downstream": { "table": null, "column": "max_col", - "column_type": null, - "native_column_type": null + "column_type": { + "type": { + "com.linkedin.pegasus2avro.schema.NumberType": {} + } + }, + "native_column_type": "DECIMAL" }, "upstreams": [ { diff --git a/metadata-ingestion/tests/unit/sql_parsing/goldens/test_snowflake_default_normalization.json b/metadata-ingestion/tests/unit/sql_parsing/goldens/test_snowflake_default_normalization.json index 6571d894c7678..c56ce8726153b 100644 --- a/metadata-ingestion/tests/unit/sql_parsing/goldens/test_snowflake_default_normalization.json +++ b/metadata-ingestion/tests/unit/sql_parsing/goldens/test_snowflake_default_normalization.json @@ -3,7 +3,7 @@ "query_type_props": { "kind": "TABLE" }, - "query_fingerprint": "2aa655ab211e061dc8c1161e0b2a7073b38636f9ffcc4719d4e70743e3321cb2", + "query_fingerprint": "58a15c69c357905aec390867335699413678368f321bfde6f477c08a973ca3a9", "in_tables": [ "urn:li:dataset:(urn:li:dataPlatform:snowflake,long_tail_companions.analytics.customer_last_purchase_date,PROD)", "urn:li:dataset:(urn:li:dataPlatform:snowflake,long_tail_companions.ecommerce.purchases,PROD)" @@ -127,6 +127,6 @@ ], "debug_info": { "confidence": 0.4, - "generalized_statement": "CREATE TABLE active_customer_ltv AS (WITH active_customers AS (SELECT * FROM customer_last_purchase_date WHERE last_purchase_date >= CURRENT_DATE - INTERVAL DAYS), purchases AS (SELECT * FROM ecommerce.purchases) SELECT active_customers.user_fk, active_customers.email, active_customers.last_purchase_date, SUM(purchases.purchase_amount) AS lifetime_purchase_amount, COUNT(DISTINCT (purchases.pk)) AS lifetime_purchase_count, SUM(purchases.purchase_amount) / COUNT(DISTINCT (purchases.pk)) AS average_purchase_amount FROM active_customers JOIN purchases ON active_customers.user_fk = purchases.user_fk GROUP BY ?, ?, ?)" + "generalized_statement": "CREATE TABLE active_customer_ltv AS (WITH active_customers AS (SELECT * FROM customer_last_purchase_date WHERE last_purchase_date >= CURRENT_DATE - INTERVAL '? DAYS'), purchases AS (SELECT * FROM ecommerce.purchases) SELECT active_customers.user_fk, active_customers.email, active_customers.last_purchase_date, SUM(purchases.purchase_amount) AS lifetime_purchase_amount, COUNT(DISTINCT (purchases.pk)) AS lifetime_purchase_count, SUM(purchases.purchase_amount) / COUNT(DISTINCT (purchases.pk)) AS average_purchase_amount FROM active_customers JOIN purchases ON active_customers.user_fk = purchases.user_fk GROUP BY ?, ?, ?)" } } \ No newline at end of file