embucket-labs icon indicating copy to clipboard operation
embucket-labs copied to clipboard

engine: `"DEFAULT"` UPPERCASE LOWERCASE mismatch

Open DanCodedThis opened this issue 3 months ago • 4 comments

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

DanCodedThis avatar Sep 01 '25 17:09 DanCodedThis

Remark:

  • "" is used since DEFAULT is a keyword
  • You're allowed to create a table with the keyword as column, without specifying ""
  • For querying, the "" must be specified

DanCodedThis avatar Sep 01 '25 17:09 DanCodedThis

For now, it seems the issue is much deeper.

DanCodedThis avatar Sep 08 '25 14:09 DanCodedThis

We can add double quotes for Expr:Column during plan optimization

osipovartem avatar Sep 08 '25 14:09 osipovartem

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.

DanCodedThis avatar Sep 08 '25 17:09 DanCodedThis