-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Adding MergeStats support for Composite Engine #20318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
bharath-techie
merged 5 commits into
opensearch-project:feature/datafusion
from
darjisagar7:MergeStats
Jan 7, 2026
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a31b846
Initial changes for getting record count on ArrowWriter close
raghuvanshraj ae43b28
Adding getFileMetadata JNI
raghuvanshraj 389633e
ongoing
raghuvanshraj 8557d79
Changing ParquetFileMetadata to record
raghuvanshraj 51343dc
[Merge] Adding MergeStats support for Composite Engine
darjisagar7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
78 changes: 78 additions & 0 deletions
78
...t-data-format/src/main/java/com/parquet/parquetdataformat/bridge/ParquetFileMetadata.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| package com.parquet.parquetdataformat.bridge; | ||
|
|
||
| /** | ||
| * Represents metadata information for a Parquet file. | ||
| * <p> | ||
| * This class holds the essential metadata extracted from a Parquet file | ||
| * when the writer is closed, providing visibility into the file's characteristics. | ||
| */ | ||
| public record ParquetFileMetadata(int version, long numRows, String createdBy) { | ||
| /** | ||
| * Constructs a new ParquetFileMetadata instance. | ||
| * | ||
| * @param version the Parquet format version used | ||
| * @param numRows the total number of rows in the file | ||
| * @param createdBy the application/library that created the file (can be null) | ||
| */ | ||
| public ParquetFileMetadata { | ||
| } | ||
|
|
||
| /** | ||
| * Gets the Parquet format version. | ||
| * | ||
| * @return the version number | ||
| */ | ||
| @Override | ||
| public int version() { | ||
| return version; | ||
| } | ||
|
|
||
| /** | ||
| * Gets the total number of rows in the Parquet file. | ||
| * | ||
| * @return the number of rows | ||
| */ | ||
| @Override | ||
| public long numRows() { | ||
| return numRows; | ||
| } | ||
|
|
||
| /** | ||
| * Gets information about what created this Parquet file. | ||
| * | ||
| * @return the creator information, or null if not available | ||
| */ | ||
| @Override | ||
| public String createdBy() { | ||
| return createdBy; | ||
| } | ||
|
|
||
| @Override | ||
| public String toString() { | ||
| return "ParquetFileMetadata{" + | ||
| "version=" + version + | ||
| ", numRows=" + numRows + | ||
| ", createdBy='" + createdBy + '\'' + | ||
| '}'; | ||
| } | ||
|
|
||
| @Override | ||
| public boolean equals(Object o) { | ||
| if (this == o) return true; | ||
| if (o == null || getClass() != o.getClass()) return false; | ||
|
|
||
| ParquetFileMetadata that = (ParquetFileMetadata) o; | ||
|
|
||
| if (version != that.version) return false; | ||
| if (numRows != that.numRows) return false; | ||
| return createdBy != null ? createdBy.equals(that.createdBy) : that.createdBy == null; | ||
| } | ||
|
|
||
| @Override | ||
| public int hashCode() { | ||
| int result = version; | ||
| result = 31 * result + (int) (numRows ^ (numRows >>> 32)); | ||
| result = 31 * result + (createdBy != null ? createdBy.hashCode() : 0); | ||
| return result; | ||
| } | ||
| } |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not add the entire metadata? We can reuse it later to store checksums as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ParquetFileMetadata is created in plugin and this code is in core.