Skip to content

[Improve] support flex column update for flink sql#646

Open
JNSimba wants to merge 1 commit intoapache:masterfrom
JNSimba:support_flex_column
Open

[Improve] support flex column update for flink sql#646
JNSimba wants to merge 1 commit intoapache:masterfrom
JNSimba:support_flex_column

Conversation

@JNSimba
Copy link
Copy Markdown
Member

@JNSimba JNSimba commented Mar 19, 2026

Proposed changes

Support flex column update for flink sql

Checklist(Required)

  1. Does it affect the original behavior: (Yes/No/I Don't know)
  2. Has unit tests been added: (Yes/No/No Need)
  3. Has document been added or modified: (Yes/No/No Need)
  4. Does it need to update dependencies: (Yes/No)
  5. Are there any changes that cannot be rolled back: (Yes/No)

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@JNSimba
Copy link
Copy Markdown
Member Author

JNSimba commented Mar 19, 2026

In FlinkSQL scenarios, when concatenating RowData, it's essential to adhere to the Flink table's schema. For example, if the Flink schema is [id, a, b, c, d], even if the upstream only sends id and a, the RowData will still be concatenated according to the schema, resulting in displayed concatenations of c=null and d=null. This would then modify the data in c and d.

However, if the Flink schema only defines id and a, then partial column updates can achieve the desired result.

But if the upstream might send [id, a], [id, b], [id, c], then you must use DataStream's SimpleStringSerializer to write the data in JSON format.

Furthermore, it's crucial to ensure that the columns passed from the upstream are truly only these few columns. For instance, it's uncertain whether FlinkSQL or Kafka will add null columns to align with the source schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant