-
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
[Feature][transform] transform support explode #7928
Conversation
cc @corgy-w |
cc @YuriyGavrilov as well. |
seatunnel-api/src/main/java/org/apache/seatunnel/api/transform/SeaTunnelMultiRowTransform.java
Outdated
Show resolved
Hide resolved
* @param row the data need be transformed. | ||
* @return transformed data. | ||
*/ | ||
List<T> flatMap(T row); |
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.
cc @hailin0
...erver/src/main/java/org/apache/seatunnel/engine/server/task/flow/TransformFlowLifeCycle.java
Outdated
Show resolved
Hide resolved
...erver/src/main/java/org/apache/seatunnel/engine/server/task/flow/TransformFlowLifeCycle.java
Show resolved
Hide resolved
@Hisoka-X @liunaijie @corgy-w please cc SELECT * FROM fake |
Hi Guys, I can't cover all review, just to inform when we rotate data on 90 degrees we should have possibilities to limit row count due to it can course to problem on next step. For my case we will take 10 or 20 rows per each table and will send this data to llm. Output will be fixed or knowable length size. Columns as rows with description as option (maybe) and llm output (as json perhaps) Many thanks 🙏 for making all of this happening. It is amazing job. |
@YuriyGavrilov This pr does not include what you mentioned, your needs are still in progress |
|
||
select ARRAY('test1','test2','test3') as arrays | ||
|
||
### SPLIT |
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 split method should be string function. Please move it to https://github.com/apache/seatunnel/blob/dev/docs/en/transform-v2/sql-functions.md#string-functions
return; | ||
} | ||
for (Object fieldValue : (Object[]) splitFieldValue) { | ||
Object value = keepValueType ? fieldValue : String.valueOf(fieldValue); |
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.
if the fieldValue is null, it will be convert to "null"
by String.valueOf(fieldValue)
. The value will be wrong.
} | ||
} | ||
|
||
private SeaTunnelRow copySeaTunnelRow( |
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.
private SeaTunnelRow copySeaTunnelRow( | |
private SeaTunnelRow copySeaTunnelRowWithNewValue( |
...nel-transforms-v2/src/main/java/org/apache/seatunnel/transform/sql/zeta/ZetaSQLFunction.java
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. Thanks @CosmosNi and @corgy-w @liunaijie @YuriyGavrilov for review!
We need a sql function named |
like slice(field,start,end)? |
yes. |
row_rules = [ | ||
{ | ||
rule_type = MAX_ROW | ||
rule_value = 24 |
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.
name×pk_id×age×array 2×2×2×2+2×1×1×2+1×2×1×2 = 24
#7926
support explode transform function
Purpose of this pull request
Does this PR introduce any user-facing change?
How was this patch tested?
Check list
New License Guide
release-note
.