dkranchii opened a new pull request, #18512: URL: https://github.com/apache/pinot/pull/18512
## Summary `SchemaUtils.validate(...)` correctly rejects a schema where a column produced by one transform function is reused as an argument to another transform, but the error message previously rendered as `"Columns: true are a result of transformations, and cannot be used as arguments to other transform functions"` (or `false`). The cause: `Set#retainAll` returns a `boolean`, and that boolean was passed where the formatted intersection set should have been. The message is surfaced through the controller's schema REST endpoint, so operators currently see `"Invalid schema: <name>. Reason: Columns: true ..."` and have no way to tell which columns actually conflict. ## What this PR changes - Compute the intersection into a fresh `HashSet` and pass that set to `Preconditions.checkState`, producing `"Columns: [x] are a result of transformations, ..."`. - Removes a latent side effect (`retainAll` was mutating `transformedColumns` regardless of validation outcome). - Drops the now-unused `import java.util.Collections`. ## Testing - Added `SchemaUtilsTest#testChainedTransformErrorMessageListsConflictingColumns`, which asserts the full expected error message so the bug cannot regress silently. - Pre-existing `testValidateTransformFunctionArguments` continues to cover the validation outcome. - Local: `./mvnw -pl pinot-core -Dtest=SchemaUtilsTest test` — `Tests run: 12, Failures: 0, Errors: 0`. ## Risk - Low: change is one static utility method in `pinot-segment-local` plus one new test in `pinot-core`. - No public API changes, no dependency changes, no wire-format / rolling-upgrade implications. Only the human-readable error text changes for an already-failing input. -- 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]
