-
Notifications
You must be signed in to change notification settings - Fork 25
feat(format): optimize avro read performance and support reading various nested types #76
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
Open
zjw1111
wants to merge
16
commits into
alibaba:main
Choose a base branch
from
zjw1111:support_avro_read
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,743
−1,098
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
d5862ef
feat(format): optimize avro read performance and support reading vari…
zjw1111 30e67a2
add inte test & ut
zjw1111 f304337
Merge branch 'main' into support_avro_read
zjw1111 1697e7e
fix
zjw1111 f2c649a
fix
zjw1111 976f4e9
fix2
zjw1111 9946600
Merge branch 'main' into support_avro_read
zjw1111 1376cb3
fix review
zjw1111 705ce20
Merge branch 'main' into support_avro_read
zjw1111 90a43f6
fix review 2
zjw1111 83934d6
fix3
zjw1111 152003a
fix4
zjw1111 f0ad19f
Merge branch 'main' into support_avro_read
zjw1111 8690d65
fix
zjw1111 a88e1b9
fix
zjw1111 07ce3a3
fix
zjw1111 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| /* | ||
| * Copyright 2026-present Alibaba Inc. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| #include "paimon/common/utils/arrow/arrow_utils.h" | ||
|
|
||
| #include "arrow/api.h" | ||
| #include "gtest/gtest.h" | ||
| #include "paimon/common/types/data_field.h" | ||
|
|
||
| namespace paimon::test { | ||
|
|
||
| TEST(ArrowUtilsTest, TestCreateProjection) { | ||
| std::vector<DataField> read_fields = {DataField(1, arrow::field("k1", arrow::int32())), | ||
| DataField(3, arrow::field("p1", arrow::int32())), | ||
| DataField(5, arrow::field("s1", arrow::utf8())), | ||
| DataField(6, arrow::field("v0", arrow::float64())), | ||
| DataField(7, arrow::field("v1", arrow::boolean()))}; | ||
| auto read_schema = DataField::ConvertDataFieldsToArrowSchema(read_fields); | ||
|
|
||
| std::vector<DataField> file_fields = {DataField(0, arrow::field("k0", arrow::int32())), | ||
| DataField(1, arrow::field("k1", arrow::int32())), | ||
| DataField(3, arrow::field("p1", arrow::int32())), | ||
| DataField(5, arrow::field("s1", arrow::utf8())), | ||
| DataField(6, arrow::field("v0", arrow::float64())), | ||
| DataField(7, arrow::field("v1", arrow::boolean())), | ||
| DataField(4, arrow::field("s0", arrow::utf8()))}; | ||
| auto file_schema = DataField::ConvertDataFieldsToArrowSchema(file_fields); | ||
|
|
||
| auto projection = ArrowUtils::CreateProjection(file_schema, read_schema->fields()); | ||
| std::vector<int32_t> expected_projection = {1, 2, 3, 4, 5}; | ||
| ASSERT_EQ(projection, expected_projection); | ||
| } | ||
|
|
||
| } // namespace paimon::test |
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
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
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
This file was deleted.
Oops, something went wrong.
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.
This TODO is already resolved.