Add fluss-codegen module for runtime code generation#2399
Open
platinumhamburg wants to merge 1 commit intoapache:mainfrom
Open
Add fluss-codegen module for runtime code generation#2399platinumhamburg wants to merge 1 commit intoapache:mainfrom
platinumhamburg wants to merge 1 commit intoapache:mainfrom
Conversation
39268fc to
0ec0b0f
Compare
This commit introduces a new fluss-codegen module that provides runtime code generation capabilities using Janino compiler. Core framework: - CodeGeneratorContext: Manages reusable code fragments and member variables - JavaCodeBuilder: Type-safe builder for constructing Java source code with support for modifiers, parameters, and various code constructs - CompileUtils: Compiles generated source code using Janino with caching - GeneratedClass: Wrapper for generated class with source and compiled class - CodeGenException: Exception for code generation failures Code generators: - EqualiserCodeGenerator: Generates RecordEqualiser implementations for comparing InternalRow instances, supporting all Fluss data types Key features: - Type-safe API with Modifier enum, PrimitiveType enum, and Param class - Comprehensive support for all Fluss data types including nested types - Field projection support for partial row comparison - Compiled class caching for performance - Janino dependency shaded to avoid classpath conflicts Testing: - Comprehensive unit tests for all components - Generated code snapshot tests for reviewer understanding - 297 test cases covering edge cases and error handling License: - Janino (BSD 3-Clause) license included in META-INF/licenses/
0ec0b0f to
7f887b1
Compare
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.
This commit introduces a new fluss-codegen module that provides runtime code generation capabilities using Janino compiler.
Core framework:
Code generators:
Key features:
Testing:
License:
Purpose
Linked issue: close #2398 2398
Brief change log
Tests
API and Format
Documentation