Copilot commented on code in PR #18723:
URL: https://github.com/apache/pinot/pull/18723#discussion_r3384879935
##########
pinot-sql-ddl/src/main/java/org/apache/pinot/sql/ddl/compile/DdlCompiler.java:
##########
@@ -110,6 +120,18 @@ public static MaterializedViewDdlHandler
getMaterializedViewDdlHandler() {
return _materializedViewDdlHandler;
}
+ /// Installs the [CreateTableWithOptionsHandler] used for all subsequent
options-defined
+ /// `CREATE TABLE ... WITH (...)` compilations. Call once at controller
startup; defaults to
+ /// [DefaultCreateTableWithOptionsHandler], which rejects the form.
+ public static void
setCreateTableWithOptionsHandler(CreateTableWithOptionsHandler handler) {
+ _createTableWithOptionsHandler = handler;
+ }
Review Comment:
`setCreateTableWithOptionsHandler` (and the existing
`setMaterializedViewDdlHandler`) allow installing a null handler, but the
corresponding getters are documented as “never null”. If a null handler is
installed accidentally, the next DDL compilation will fail with a confusing NPE
when the handler is dereferenced. Add a defensive null check in the setter(s)
with a clear exception message so misconfiguration fails fast at startup.
--
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]