1

From the config there is a few options, of \", [ etc.

However is it possible for calcite to parse identifiers without quotes? like

select * from a.b?

Now I must write

select * from \"a\".\"b\"

and it's kind of annoying.

PeiSong
  • 871
  • 1
  • 7
  • 12

1 Answers1

3

Quotes are never required but you may need to change how Calcite handles the casing of identifiers depending on your application. By default, unquoted identifiers are converted to uppercase and quoted identifiers are left unchanged. So if you have lowercase identifiers, they need to be quoted by default.

To change this behaviour, you need to modify the config you pass to SqlParser so that the case of unquoted identifiers is also unchanged.

SqlParser.Config = SqlParser.configBuilder().setUnquotedCasing(Casing.Unchanged);
SqlParser parser = SqlParser.create(/* what you're parsing here */, config);
Michael Mior
  • 28,107
  • 9
  • 89
  • 113