gortiz commented on code in PR #16658:
URL: https://github.com/apache/pinot/pull/16658#discussion_r2300598955
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/QueryEnvironment.java:
##########
@@ -147,20 +147,30 @@ public QueryEnvironment(Config config) {
String database = config.getDatabase();
_catalog = new PinotCatalog(config.getTableCache(), database);
CalciteSchema rootSchema = CalciteSchema.createRootSchema(false, false,
database, _catalog);
- _config =
Frameworks.newConfigBuilder().traitDefs().operatorTable(PinotOperatorTable.instance())
-
.defaultSchema(rootSchema.plus()).sqlToRelConverterConfig(PinotRuleUtils.PINOT_SQL_TO_REL_CONFIG).build();
+ _config = Frameworks.newConfigBuilder()
+ .traitDefs()
+
.operatorTable(PinotOperatorTable.instance(config.isNullHandlingEnabled()))
+ .defaultSchema(rootSchema.plus())
+ .sqlToRelConverterConfig(PinotRuleUtils.PINOT_SQL_TO_REL_CONFIG)
+ .build();
_catalogReader = new PinotCatalogReader(
rootSchema, List.of(database), _typeFactory, CONNECTION_CONFIG,
config.isCaseSensitive());
// default optProgram with no skip rule options and no use rule options
_optProgram = getOptProgram(Set.of(), Set.of());
}
public QueryEnvironment(String database, TableCache tableCache, @Nullable
WorkerManager workerManager) {
+ this(database, tableCache, workerManager, true);
Review Comment:
Here we don't have access to that config. The callers are the one that
should take care about that. The main reason I have to introduce this
constructor is because the integration tests use this method and they keep a
single queryEnvironment for the whole execution. And some tests already expect
the standard IS NULL/IS NOT NULL behavior.
A proper solution would need to rewrite all these tests and make them
allocate a new QueryEnvironment depending on whether null handling is enabled
or not (which depends on a query option). I'll try to do that refactor when I
have more time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]