Skip to content

Conversation

@toriwei
Copy link
Collaborator

@toriwei toriwei commented Dec 8, 2025

In Snowflake, parse FLOAT to its synonym DOUBLE.

This will improve transpilation to DuckDB, as Snowflake double-precision FLOAT will get mapped to DuckDB DOUBLE, rather than DuckDB's single-precision REAL

Previously:

Snowflake -> DuckDB
CAST(6.43 AS FLOAT) → CAST(6.43 AS REAL))

Now:

Snowflake -> DuckDB
CAST(6.43 AS FLOAT) → CAST(6.43 AS DOUBLE))

@toriwei toriwei force-pushed the tori/map-float-to-double-snowflake branch from 23e8fa4 to 17f7fa4 Compare December 11, 2025 17:45
@github-actions
Copy link
Contributor

github-actions bot commented Dec 11, 2025

SQLGlot Integration Test Results

Comparing:

  • this branch (sqlglot:tori/map-float-to-double-snowflake, sqlglot version: tori/map-float-to-double-snowflake)
  • baseline (main, sqlglot version: 28.1.1.dev72)

⚠️ Limited to dialects: snowflake

By Dialect

dialect main sqlglot:tori/map-float-to-double-snowflake difference links
snowflake -> duckdb 49/1583 passed (3.1%) 49/1583 passed (3.1%) No change full result / delta
snowflake -> snowflake 88/1583 passed (5.6%) 88/1583 passed (5.6%) No change full result / delta

Overall

main: 3166 total, 137 passed (pass rate: 4.3%), sqlglot version: 28.1.1.dev72

sqlglot:tori/map-float-to-double-snowflake: 3166 total, 137 passed (pass rate: 4.3%), sqlglot version: tori/map-float-to-double-snowflake

Difference: No change

@georgesittas
Copy link
Collaborator

One comment, feel free to merge otherwise.

@georgesittas georgesittas merged commit 71e7630 into main Dec 11, 2025
9 checks passed
@georgesittas georgesittas deleted the tori/map-float-to-double-snowflake branch December 11, 2025 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants