-
Notifications
You must be signed in to change notification settings - Fork 1k
feat(duckDB)!: Add support for shorthand struct array literals in duckDB. #6233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(duckDB)!: Add support for shorthand struct array literals in duckDB. #6233
Conversation
|
@fivetran-amrutabhimsenayachit this looks good, but upon reviewing it I realized that the issue is more general and doesn't only affect BigQuery –> DuckDB. For instance, if we wanted to target Snowflake, the same issue would occur: There are two ways I see for solving this properly:
I'd probably implement (2) for now because it's a smaller lift and safer. Let me know if I should clarify anything. |
This makes sense to me @georgesittas. I think the 2nd approach is generic and would support all the dialects in future. |
It's trivial to use it in the other dialects as well: snowflake, presto, duckdb, hive, spark2. It's basically adding a preprocess entry in |
|
@georgesittas : Test queries:
✅ What's Working (8 dialects - verified):
❌ What's Not Working (5 dialects - pre-existing bugs):
|
The current transpilation converts MAX_BY to ARG_MAX but loses struct field names, causing incorrect results in DuckDB.
After testing the new code changes: