Conversation
Reuse borrowed Flink MapData inside the existing import/evaluate/export lifetime, recursively admitting declared non-null MAP keys and MULTISET elements while preserving nullable values. Compare nested collection contents in the parity harness instead of Java array identities, without losing changelog kinds. No additional JSON parser or per-row JNI call is introduced. 70 focused SQL, bridge and comparison cases pass, including 5003 input rows across filtered batches; all 32 unchanged upstream Calc cases pass with three actual native execution contracts. Release+mimalloc 2M-row measurements are slower than Flink: 0.652x map serialization, 0.466x nested output and 0.705x JSON-filter/grouped-count composition, including both transposes. Preserve every measured trial and keep this as a draft coverage prototype pending a stronger performance case; do not claim an optimization. Advances investigation for #91.
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.
Prototype MAP and MULTISET inputs/results through the existing generated JSON Calc batch bridge. Keys/elements must be declared non-null; nullable values and nested arrays/rows remain supported. Borrowed MapData stays within the imported batch lifetime, results own their Arrow buffers, and JNI remains one call per batch.
Stacked on #199. This is a draft investigation for #91, not a performance improvement, and should not be automatically merged merely when CI is green.
Validation: 70 focused SQL/bridge/comparison cases and 32 unchanged upstream Calc cases passed, including three actual native-execution contracts. A 5,003-row case verifies filtering, nested map ownership and native row counters across batches. Nullable map keys/multiset elements retain explicit fallback. Integer-keyed maps can cross the boundary, but Flink's unsupported JSON serialization of those maps is not claimed.
Release+mimalloc benchmarks (2M rows, 2 warmups, 5 interleaved trials, both transposes) are slower than Flink: 0.652x for MAP serialization and 0.466x for MAP-bearing results. A JSON filter followed by grouped COUNT was also slower at 0.705x (native 4.774s vs Flink 3.365s). Raw trials are committed. Hold this prototype pending a demonstrated useful composition or further performance work.
CI is cancelled while this draft is held for the measured performance regressions. It must be rerun in full before any ready/merge decision; the required checks remain unchanged.