Skip to content

Handle Object-returning scalar transform functions#18628

Open
wolfkill wants to merge 1 commit into
apache:masterfrom
wolfkill:fix/object-scalar-result-type
Open

Handle Object-returning scalar transform functions#18628
wolfkill wants to merge 1 commit into
apache:masterfrom
wolfkill:fix/object-scalar-result-type

Conversation

@wolfkill
Copy link
Copy Markdown
Contributor

Summary

  • handle scalar transform functions whose Java return type is Object without exposing ColumnDataType.OBJECT through transform result metadata
  • fetch values for scalar function parameters declared as Object from child transform functions
  • add coverage for nullIf with an Object result and an Object parameter

Fixes #11743

Tests

  • JAVA_HOME=/opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk/Contents/Home ./mvnw -pl pinot-core -am -Dtest=ScalarTransformFunctionWrapperTest#testObjectResultScalarTransformFunction+testObjectParameterScalarTransformFunction -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false test
  • JAVA_HOME=/opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk/Contents/Home ./mvnw -pl pinot-core -am -Dtest=ScalarTransformFunctionWrapperTest -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false test
  • git diff --check

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 29, 2026

Codecov Report

❌ Patch coverage is 21.05263% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.38%. Comparing base (a762254) to head (693e431).

Files with missing lines Patch % Lines
...sform/function/ScalarTransformFunctionWrapper.java 21.05% 28 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18628      +/-   ##
============================================
- Coverage     64.40%   64.38%   -0.02%     
  Complexity     1137     1137              
============================================
  Files          3337     3337              
  Lines        206069   206106      +37     
  Branches      32128    32135       +7     
============================================
- Hits         132710   132707       -3     
- Misses        62726    62766      +40     
  Partials      10633    10633              
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-21 64.38% <21.05%> (-0.02%) ⬇️
temurin 64.38% <21.05%> (-0.02%) ⬇️
unittests 64.38% <21.05%> (-0.02%) ⬇️
unittests1 56.80% <21.05%> (-0.02%) ⬇️
unittests2 36.92% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wolfkill wolfkill marked this pull request as ready for review May 29, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ScalarTransformFunctionWrapper throws exception for Object return type

2 participants