-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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][transforms-v2][SQL] Support can use column.a, column['a'], and column[0] to get the data #5402
Conversation
Good features, Please wait CI complete. |
seatunnel-transforms-v2/src/main/java/org/apache/seatunnel/transform/sql/zeta/ZetaSQLType.java
Outdated
Show resolved
Hide resolved
...2e/seatunnel-transforms-v2-e2e-part-2/src/test/resources/sql_transform/sql_complex_type.conf
Outdated
Show resolved
Hide resolved
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
@rewerma PATL |
What is this mistake? Did I cause it |
No, it's not you problem. Can you rebase the dev branch and push again ? |
Ok, tonight |
db2adcb
to
bb1371a
Compare
Is this how it is done? |
It seems some thing is wrong. Some modifications that should not be submitted in this PR. |
How to rebase?
|
@EricJoy2048 |
@wu-a-ge PTAL. I have found that you have extensive experience in this field. Can you help review this PR? |
@rewerma PTAL |
@EricJoy2048
FakeSource does not specify the I changed the map length of the test file to 5 |
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.
The map and array values in the test case are only strings, can we consider other types? For example,null,int,date,timestamp
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.
Are you saying that the key of the map cannot be certain to be a string
This is indeed a problem
I think Visitor
should be used to access it
Because it is JSON serialization, the key will be parsed as a string, even if it is an int
The type is taken from upstream, I think there should be no problem
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.
What I am talking about is the value, and it is necessary to consider that after these values are taken out, the downstream sink can write correctly
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.
The generics of array can only be basic types
If the value type of a map is date, time, or timestamp, the underlying type is actually a Java8 time type
Jackson will report an error during serialization and needs to register the JavaTimeModule module
Specific dependencies need to be added as well
I added a Visitor to obtain the key or index I think the parameter |
…and column[0] to get the data
…and column[0] to get the data
Hi, Way are you close this pr? |
I think the visitor mode extension is better Referring to |
hello ,has the pr been submitted? |
#5245
Purpose of this pull request
Check list
New License Guide
release-note
.