-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Paimon]support projection for paimon source #6343
Conversation
...el-connector-v2-e2e/connector-paimon-e2e/src/test/resources/paimon_projection_to_assert.conf
Outdated
Show resolved
Hide resolved
# Conflicts: # seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/config/PaimonConfig.java
PTAL @Hisoka-X @EricJoy2048 |
cc @dailai |
Please support projection by field name. |
Fixed. Thanks. |
LGTM |
@@ -40,6 +41,10 @@ The table you want to access | |||
|
|||
The file path of `hdfs-site.xml` | |||
|
|||
### projection [string] |
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.
### projection [string] | |
### read_columns [string] |
How about like other connectors, named read_columns
https://seatunnel.apache.org/docs/connector-v2/source/LocalFile#read_columns-list
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.
Hi @TaoZex , could you solve the conflict? |
Of course. |
@@ -23,6 +23,7 @@ Read data from Apache Paimon. | |||
| database | String | Yes | - | | |||
| table | String | Yes | - | | |||
| hdfs_site_path | String | No | - | | |||
| projection | String | No | - | |
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.
please change the document too
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.
Fixed, thanks.
@TaoZex I think 'read_columns' can be overlaid in 'query sql'. Can we transform this pr based on sql? |
I had a discussion with @dailai on wechat. Currently his pr only supports select * sql queries. I will wait for his pr to merge, and modify this pr code to select id, name sql query (Assuming multiple fields, but only two fields are queried by projection) |
cc @dailai |
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.
LGTM. wating @dailai
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.
LGTM @hailin0
...he/seatunnel/connectors/seatunnel/paimon/source/converter/SqlToPaimonPredicateConverter.java
Outdated
Show resolved
Hide resolved
...he/seatunnel/connectors/seatunnel/paimon/source/converter/SqlToPaimonPredicateConverter.java
Outdated
Show resolved
Hide resolved
...ava/org/apache/seatunnel/connectors/seatunnel/paimon/source/PaimonSourceSplitEnumerator.java
Show resolved
Hide resolved
Thanks for review. Done. |
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.
LGTM
Purpose of this pull request
support projection for paimon source
Does this PR introduce any user-facing change?
How was this patch tested?
Check list
New License Guide
release-note
.