xiangfu0 commented on code in PR #19235:
URL: https://github.com/apache/pinot/pull/19235#discussion_r4625552613


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/TableConfigValidationUtils.java:
##########
@@ -80,6 +82,23 @@ public static EnumSet<ValidationType> 
parseValidationTypesToSkip(@Nullable Strin
     }
   }
 
+  /// Rejects legacy FieldSpec Groovy transforms before schema validation can 
compile them.
+  @SuppressWarnings("deprecation") // FieldSpec transforms remain supported in 
stored schemas.
+  static void validateSchemaGroovy(Schema schema, ControllerConf 
controllerConf) {
+    if (controllerConf.isDisableIngestionGroovy()) {
+      String groovyPrefix = 
GroovyFunctionEvaluator.getGroovyExpressionPrefix() + "(";
+      for (FieldSpec fieldSpec : schema.getAllFieldSpecs()) {
+        String transformFunction = fieldSpec.getTransformFunction();
+        if (transformFunction != null
+            && transformFunction.regionMatches(true, 0, groovyPrefix, 0, 
groovyPrefix.length())) {

Review Comment:
   Rebased onto current master in ba89757b04ca, which includes #19887. The 
implicit `__KEYS`/`__VALUES` fallback now uses the Java map evaluator and no 
longer constructs Groovy. Added a REST regression for both suffixes with an 
empty transform, a virtual-column provider, and ingestion compilation 
explicitly disabled.
   
   All seven focused test invocations passed on JDK 25, including the new 
regression, schema/tableConfigs policy, startup policy and authorization 
ordering. Scoped formatting, Checkstyle, license checks and warning-enabled 
compilation also passed; no warnings on added lines. Current-head hosted CI is 
starting.



-- 
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]

Reply via email to