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

[Improve][transform-v2] Support dynamic types for array function #8139

Merged
merged 15 commits into from
Dec 26, 2024

Conversation

CosmosNi
Copy link
Contributor

Array function support string, double, long, int types.
Currently, sql parse does not support float and boolean.

Purpose of this pull request

Does this PR introduce any user-facing change?

How was this patch tested?

Check list

@@ -25,11 +25,10 @@ env {

source {
FakeSource {
plugin_output = "fake"
result_table_name = "fake"
Copy link
Member

Choose a reason for hiding this comment

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

we use plugin_output at now.

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.

I find current code doesn't support create an array with table field, for example:

The fake table contains:

id name age
1 tom 20
2 jack 21

The sql is

SELECT Array('c_1', age) as string_array from fake,

The result should be:

string_array
['c_1', '20']
['c_1', '21']

@CosmosNi
Copy link
Contributor Author

@Hisoka-X I've also considered.I'm still looking for how to get field value

@CosmosNi
Copy link
Contributor Author

@Hisoka-X PTAL

@Hisoka-X
Copy link
Member

Please resolve conflict. Thanks

…_array_function

# Conflicts:
#	seatunnel-e2e/seatunnel-transforms-v2-e2e/seatunnel-transforms-v2-e2e-part-2/src/test/resources/sql_transform/func_array.conf
@github-actions github-actions bot removed the api label Dec 24, 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. Thanks @CosmosNi ! cc @rewerma

@Hisoka-X Hisoka-X merged commit eae369b into apache:dev Dec 26, 2024
5 checks passed
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.

3 participants