You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by Dmitry Sysolyatin <dm...@gmail.com> on 2025/08/29 07:39:03 UTC

[Question] Should identifierExpansion be true by default in SqlValidator.Config.DEFAULT?

I created a bug related to identifierExpansion [1], and there was another
similar bug [2].

But my question is not about the bugs, though it’s related. My question is:
should identifierExpansion be true by default instead of false?

As a library user, I would expect that using public components with default
configs means using the most tested behavior. But currently, that’s not the
case. Almost all tests assume identifierExpansion = true. Either the test
overrides it, or it uses PlannerImpl, which also sets it to true.

Another question: what is the future of identifierExpansion? Should we
focus on cases when it is false and eventually make false the default
everywhere?

[1] https://issues.apache.org/jira/browse/CALCITE-7151
[2] https://issues.apache.org/jira/browse/CALCITE-6853

Re: [Question] Should identifierExpansion be true by default in SqlValidator.Config.DEFAULT?

Posted by Mihai Budiu <mb...@gmail.com>.
We also set expansion to true in our compiler.

The question I have "why would you NOT set expansion?"

In the absence of expansion the meaning of the query remains ambiguous - or maybe there is an expectation that the query will be submitted for further processing to some other stages that will disambiguate names again.

Mihai

________________________________
From: Dmitry Sysolyatin <dm...@gmail.com>
Sent: Friday, August 29, 2025 12:39 AM
To: dev@calcite.apache.org <de...@calcite.apache.org>
Subject: [Question] Should identifierExpansion be true by default in SqlValidator.Config.DEFAULT?

I created a bug related to identifierExpansion [1], and there was another
similar bug [2].

But my question is not about the bugs, though it’s related. My question is:
should identifierExpansion be true by default instead of false?

As a library user, I would expect that using public components with default
configs means using the most tested behavior. But currently, that’s not the
case. Almost all tests assume identifierExpansion = true. Either the test
overrides it, or it uses PlannerImpl, which also sets it to true.

Another question: what is the future of identifierExpansion? Should we
focus on cases when it is false and eventually make false the default
everywhere?

[1] https://issues.apache.org/jira/browse/CALCITE-7151
[2] https://issues.apache.org/jira/browse/CALCITE-6853