Right. Something like
SqlParser.configBuilder(SqlParser.Config.DEFAULT)
.withCharLiteralStyles(EnumSet.of(CharLiteralStyle.BQ_DOUBLE))
.build();
will do the trick. Or use lex=BIG_QUERY, as I mentioned previously.
Julian
> On Dec 18, 2020, at 2:12 AM, Stamatis Zampetakis <[email protected]> wrote:
>
> Hi,
>
> The message is a bit hard to understand since there are many HTML character
> entity references; next time try to use plain text if possible.
>
> As Julian mentioned, what you need is probably covered by CALCITE-4247 [1].
>
> Best,
> Stamatis
>
> [1] https://issues.apache.org/jira/browse/CALCITE-4247
>
> On Fri, Dec 18, 2020 at 10:13 AM 莫失莫忘 <[email protected]> wrote:
>
>> not like this。I said string contant
>> 。 setQuoting(Quoting.DOUBLE_QUOTE)
>> affect identifiers,like column name、table name。not
>> affect string contant
>> setQuoting(Quoting.DOUBLE_QUOTE) make
>> select * from table1 where "column1" = 'word' Ok
>>
>>
>>
>>
>> ------------------ 原始邮件 ------------------
>> 发件人:
>> "dev"
>> <
>> [email protected]>;
>> 发送时间: 2020年12月17日(星期四) 凌晨3:48
>> 收件人: "[email protected]"<[email protected]>;
>>
>> 主题: Re: how to set string representation in calcite SQL;
>>
>>
>>
>> Alessandro is correct. But also, you can set using connect-string
>> parameters: lex=BIG_QUERY will, I believe, have the desired effect.
>>
>> On Wed, Dec 16, 2020 at 3:13 AM Alessandro Solimando
>> <[email protected]> wrote:
>> >
>> > Hello,
>> > you can achieve what you want via the SqlParser configuration
>> > (.setQuoting() method), for instance:
>> >
>> > private static final SqlParser.Config SQL_PARSER_CONFIG =
>> >
>> > SqlParser.configBuilder(SqlParser.Config.DEFAULT)
>> > > .setCaseSensitive(false)
>> > > .setConformance(SqlConformanceEnum.DEFAULT)
>> > > .setQuoting(Quoting.DOUBLE_QUOTE) <----
>> > > .build();
>> >
>> >
>> > Hth,
>> > Alessandro
>> >
>> > On Wed, 16 Dec 2020 at 09:55, 莫失莫忘 <[email protected]> wrote:
>> >
>> > > Default ,String representation is apostrophe in calcite SQL
>> > > ,like&nbsp;'word'. how do I set this to Double quotes
>> ,like&nbsp;"word".
>> > >
>> > > Default is :
>> > > select * from table1 where column1 = 'word'
>> > > I hope to support:
>> > > select * from table1 where column1 = "word"