embucket-labs
embucket-labs copied to clipboard
engine: `"DEFAULT"` UPPERCASE LOWERCASE mismatch
dbt-gitlab
3 010001 (02000): SQL compilation error: column 'DEFAULT' not found
Example
- Snowflake:
create or replace TABLE testing_super AS SELECT 'yes' as DEFAULT;
SELECT "DEFAULT" FROM testing_super;
->
yes
- Embucket (no double quotes to get the same result, otherwise error):
create or replace TABLE testing_super AS SELECT 'yes' as DEFAULT;
SELECT DEFAULT FROM testing_super;
->
yes
Possible solution
Treat all double quoted strings add identifier?
cc @osipovartem @Vedin @rampage644
Remark:
""is used sinceDEFAULTis a keyword- You're allowed to create a table with the keyword as column, without specifying
"" - For querying, the
""must be specified
For now, it seems the issue is much deeper.
We can add double quotes for Expr:Column during plan optimization
We can add double quotes for Expr:Column during plan optimization
Sorry, I changed the name of the issue. It's just upper-lower case mismatch. To fix it properly would mean to break everything else. To fix it hacky may break something and take time.