Skip to content

Fix more generated code for private stack types#29129

Merged
dain merged 1 commit intomasterfrom
user/dain/private-plugin-type-array-map
Apr 19, 2026
Merged

Fix more generated code for private stack types#29129
dain merged 1 commit intomasterfrom
user/dain/private-plugin-type-array-map

Conversation

@dain
Copy link
Copy Markdown
Member

@dain dain commented Apr 15, 2026

Fixes #29126

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.

@dain dain requested a review from wendigo April 15, 2026 19:58
@cla-bot cla-bot Bot added the cla-signed label Apr 15, 2026
@dain dain force-pushed the user/dain/private-plugin-type-array-map branch from 824689f to 9384b1a Compare April 15, 2026 22:06
@gertjanal
Copy link
Copy Markdown
Contributor

Verified, works 🥳

@wendigo wendigo force-pushed the user/dain/private-plugin-type-array-map branch from 9384b1a to 0a39cb5 Compare April 16, 2026 09:14
@wendigo
Copy link
Copy Markdown
Contributor

wendigo commented Apr 16, 2026

(rebased and resolved conflicts after row compiler changes from @raunaqmorarka)

@wendigo wendigo requested a review from raunaqmorarka April 16, 2026 09:19
@dain dain force-pushed the user/dain/private-plugin-type-array-map branch from 0a39cb5 to 2f78147 Compare April 16, 2026 15:54
@dain
Copy link
Copy Markdown
Member Author

dain commented Apr 16, 2026

@wendigo I read your message wrong, and I rebased an pushed over the branch. Sorry about that

@raunaqmorarka
Copy link
Copy Markdown
Member

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 19, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 19, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9f653535-130b-4fd2-a2bd-091fa647499c

📥 Commits

Reviewing files that changed from the base of the PR and between a10f96a and 2f78147.

⛔ Files ignored due to path filters (15)
  • core/trino-main/src/main/java/io/trino/sql/gen/AndCodeGenerator.java is excluded by !**/gen/**
  • core/trino-main/src/main/java/io/trino/sql/gen/ArrayConstructorCodeGenerator.java is excluded by !**/gen/**
  • core/trino-main/src/main/java/io/trino/sql/gen/ArrayMapBytecodeExpression.java is excluded by !**/gen/**
  • core/trino-main/src/main/java/io/trino/sql/gen/BetweenCodeGenerator.java is excluded by !**/gen/**
  • core/trino-main/src/main/java/io/trino/sql/gen/CoalesceCodeGenerator.java is excluded by !**/gen/**
  • core/trino-main/src/main/java/io/trino/sql/gen/DereferenceCodeGenerator.java is excluded by !**/gen/**
  • core/trino-main/src/main/java/io/trino/sql/gen/InputReferenceCompiler.java is excluded by !**/gen/**
  • core/trino-main/src/main/java/io/trino/sql/gen/IsNullCodeGenerator.java is excluded by !**/gen/**
  • core/trino-main/src/main/java/io/trino/sql/gen/LambdaBytecodeGenerator.java is excluded by !**/gen/**
  • core/trino-main/src/main/java/io/trino/sql/gen/NullIfCodeGenerator.java is excluded by !**/gen/**
  • core/trino-main/src/main/java/io/trino/sql/gen/OrCodeGenerator.java is excluded by !**/gen/**
  • core/trino-main/src/main/java/io/trino/sql/gen/RowConstructorCodeGenerator.java is excluded by !**/gen/**
  • core/trino-main/src/main/java/io/trino/sql/gen/SqlTypeBytecodeExpression.java is excluded by !**/gen/**
  • core/trino-main/src/main/java/io/trino/sql/gen/SwitchCodeGenerator.java is excluded by !**/gen/**
  • core/trino-main/src/test/java/io/trino/sql/gen/TestPageFunctionCompiler.java is excluded by !**/gen/**
📒 Files selected for processing (4)
  • core/trino-main/src/main/java/io/trino/operator/scalar/ArrayTransformFunction.java
  • core/trino-main/src/main/java/io/trino/operator/scalar/MapFilterFunction.java
  • core/trino-main/src/main/java/io/trino/operator/scalar/MapTransformKeysFunction.java
  • core/trino-main/src/main/java/io/trino/operator/scalar/MapTransformValuesFunction.java

📝 Walkthrough

Walkthrough

The pull request modifies four scalar array and map transformation functions to resolve Java element types through CallSiteBinder.getAccessibleType(...) instead of directly using Primitives.wrap(...). This ensures that generated bytecode uses types accessible from the correct class loader context. The corresponding value casting operations are updated to use the binder-resolved types, aligning element casts and variable declarations with the accessible runtime types.

Assessment against linked issues

Objective Addressed Explanation
Fix ClassCastException in array/map transformation functions caused by class loader mismatch [#29126]

Out-of-scope changes

No out-of-scope changes detected. All modifications are directly related to addressing the class loader mismatch issue in transformation functions by using binder.getAccessibleType() for type resolution in the generated bytecode.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dain dain merged commit fcce026 into master Apr 19, 2026
208 of 210 checks passed
@dain dain deleted the user/dain/private-plugin-type-array-map branch April 19, 2026 20:51
@github-actions github-actions Bot added this to the 481 milestone Apr 19, 2026
@ebyhr ebyhr mentioned this pull request Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

class org.locationtech.jts.geom.Point cannot be cast to class org.locationtech.jts.geom.Geometry

4 participants