Fix NotUdf loading and refresh stale UDF snapshots - #19108
Open
spapin wants to merge 2 commits into
Open
Conversation
LogicalFunctions.not() was changed to accept @nullable Boolean (boxed) for three-valued NULL semantics, but NotUdf still looked up the method with boolean.class (primitive). ServiceLoader threw NoSuchMethodException at construction time, making the entire UdfTest suite fail during setUp. Change the Class.getMethod() call to use Boolean.class to match the actual method signature.
Regenerate all-functions.yaml and abs.yaml so the UdfTest snapshot comparison matches current code: add the recently registered scalar functions (trigonometric, bitwise, IP, string helpers), fix the `and` entry that still showed `scalar: null`, and update `abs` from "3.0" to the integer-typed "3" produced by the now-polymorphic implementation. These snapshots were stale and failed the suite regardless of fork count.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19108 +/- ##
============================================
+ Coverage 65.49% 65.51% +0.01%
Complexity 1423 1423
============================================
Files 3430 3430
Lines 218010 218010
Branches 34648 34648
============================================
+ Hits 142784 142821 +37
+ Misses 63666 63631 -35
+ Partials 11560 11558 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review. those tests don't run in CI, that's why they were broken and missed. next PR I'll re-enable them. |
spapin
marked this pull request as ready for review
July 29, 2026 19:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NotUdffails to load viaServiceLoaderbecause its reflection lookup is out of sync withLogicalFunctions.not()'s signature, which was changed toBoolean(boxed) for three-valued NULL semantics but the UDF lookup still usesboolean.class(primitive). This throwsNoSuchMethodExceptionat construction time, breakingUdfTestatsetUp().This PR:
NotUdf'sgetMethodlookup to useBoolean.class, matching the actual signature.abs.yaml/all-functions.yamlsnapshot fixtures soUdfTest's snapshot comparison matches the currently-registered scalar functions (adds recently-added trig/bitwise/IP/string helpers, fixes a staleandentry, updatesabsfrom"3.0"to the integer-typed"3").Test plan
UdfTestcurrently fails onmasterwithNoSuchMethodExceptionbefore even reaching the snapshot comparisons it's meant to run. Reproduce with:With this fix applied, the suite passes.
Note: this test class currently isn't picked up by either CI integration-test shard (
integration-tests-set-1/integration-tests-set-2inpinot-integration-tests/pom.xml), since its package (org.apache.pinot.integration.tests.udf) isn't matched by the shard include globs. That's a separate, pre-existing gap to be addressed independently.