feat(snowflake)!: Transpilation support for TO_DECIMAL, TO_NUMBER,NUMERIC#7315
feat(snowflake)!: Transpilation support for TO_DECIMAL, TO_NUMBER,NUMERIC#7315georgesittas merged 11 commits intomainfrom
Conversation
| join_cols = [col for col in cond.find_all(exp.Column) if col.args.get("join_mark")] | ||
|
|
||
| left_join_table = set(col.table for col in join_cols) | ||
| if not left_join_table: |
There was a problem hiding this comment.
make style formatter modified the transforms.py
sqlglot/dialects/duckdb.py
Outdated
| @@ -4181,6 +4181,84 @@ def strtok_sql(self, expression: exp.Strtok) -> str: | |||
|
|
|||
| return self.function_fallback_sql(expression) | |||
|
|
|||
There was a problem hiding this comment.
Snowflake: TO_NUMBER(expr) defaults to NUMBER(38, 0) -> truncates decimals -> BIGINT
Oracle/others: TO_NUMBER(expr) defaults to NUMBER -> keeps decimals -> DOUBLE
Working on handling this difference. should I use is_snowflake here.
SQLGlot Integration Test ResultsComparing:
By Dialect
Overallmain: 109548 total, 107859 passed (pass rate: 98.5%), sqlglot version: sqlglot:RD-1069319_TO_NUMBER_DECIMAL_NUMERIC: 108302 total, 107081 passed (pass rate: 98.9%), sqlglot version: Transitions: ✅ 1 test(s) passed |
3264deb to
b285974
Compare
There was a problem hiding this comment.
What happened to the rest of the commetns / cases like #7315 (comment) ? (update(edit: no need to resolve these comments for now))
9d9c9f4 to
2ddaef6
Compare
|
/integration-tests |
|
Let's not merge this until we figure out the test failures. |
|
/integration-tests |
85d9b59 to
4806358
Compare
Signed-off-by: George Sittas <giwrgos.sittas@gmail.com>
697cb76 to
7944560
Compare
No description provided.