Skip to content
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

Merged
merged 19 commits into from
Jun 14, 2024
Merged

Conversation

TaoZex
Copy link
Contributor

@TaoZex TaoZex commented Feb 7, 2024

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

TaoZex added 2 commits April 11, 2024 03:57
# Conflicts:
#	seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/config/PaimonConfig.java
@TaoZex
Copy link
Contributor Author

TaoZex commented Apr 11, 2024

PTAL @Hisoka-X @EricJoy2048

@Hisoka-X
Copy link
Member

cc @dailai

@dailai
Copy link
Contributor

dailai commented Apr 11, 2024

Please support projection by field name.

@TaoZex
Copy link
Contributor Author

TaoZex commented Apr 11, 2024

Please support projection by field name.

Fixed. Thanks.

@dailai
Copy link
Contributor

dailai commented Apr 12, 2024

LGTM

@@ -40,6 +41,10 @@ The table you want to access

The file path of `hdfs-site.xml`

### projection [string]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### 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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Hisoka-X @hailin0 I have fixed it as suggested, please review it again.

@Hisoka-X
Copy link
Member

Hisoka-X commented Jun 4, 2024

Hi @TaoZex , could you solve the conflict?

@TaoZex
Copy link
Contributor Author

TaoZex commented Jun 4, 2024

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 | - |
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks.

Hisoka-X
Hisoka-X previously approved these changes Jun 6, 2024
@Carl-Zhou-CN
Copy link
Member

For #6887
There also seems to be an intention to cover the projection, at which point we will have two projection parameters,Do we need to keep both? @Hisoka-X @TaoZex @dailai

@TaoZex
Copy link
Contributor Author

TaoZex commented Jun 6, 2024

For #6887 There also seems to be an intention to cover the projection, at which point we will have two projection parameters,Do we need to keep both? @Hisoka-X @TaoZex @dailai

This pr implements the projection for paimon. After the pr was merged, #6887 can be further through SQL for the projection.

@Carl-Zhou-CN
Copy link
Member

For #6887 There also seems to be an intention to cover the projection, at which point we will have two projection parameters,Do we need to keep both? @Hisoka-X @TaoZex @dailai

This pr implements the projection for paimon. After the pr was merged, #6887 can be further through SQL for the projection.

@TaoZex I think 'read_columns' can be overlaid in 'query sql'. Can we transform this pr based on sql?

@TaoZex
Copy link
Contributor Author

TaoZex commented Jun 7, 2024

For #6887 There also seems to be an intention to cover the projection, at which point we will have two projection parameters,Do we need to keep both? @Hisoka-X @TaoZex @dailai

This pr implements the projection for paimon. After the pr was merged, #6887 can be further through SQL for the projection.

@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 @hailin0 @Hisoka-X

@hailin0
Copy link
Member

hailin0 commented Jun 12, 2024

this pr #6887 is merged
@TaoZex

@TaoZex
Copy link
Contributor Author

TaoZex commented Jun 13, 2024

this pr #6887 is merged @TaoZex

I have changed the code. PTAL. @Hisoka-X @hailin0

@hailin0
Copy link
Member

hailin0 commented Jun 13, 2024

cc @dailai

Hisoka-X
Hisoka-X previously approved these changes Jun 14, 2024
Copy link
Member

@Hisoka-X Hisoka-X left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. wating @dailai

Copy link
Contributor

@dailai dailai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM @hailin0

@TaoZex
Copy link
Contributor Author

TaoZex commented Jun 14, 2024

LGTM @hailin0

Thanks for review. Done.

@TaoZex TaoZex requested a review from hailin0 June 14, 2024 11:44
Copy link
Member

@hailin0 hailin0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hailin0 hailin0 merged commit 6c15772 into apache:dev Jun 14, 2024
6 checks passed
chaorongzhi pushed a commit to chaorongzhi/seatunnel that referenced this pull request Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants