Skip to content

[flink] fix blob type conversion#7405

Merged
JingsongLi merged 2 commits intoapache:masterfrom
steFaiz:fix_flink_blob_conversion
Mar 12, 2026
Merged

[flink] fix blob type conversion#7405
JingsongLi merged 2 commits intoapache:masterfrom
steFaiz:fix_flink_blob_conversion

Conversation

@steFaiz
Copy link
Copy Markdown
Contributor

@steFaiz steFaiz commented Mar 11, 2026

Purpose

Currently in Flink, we need to specify blob type through config and set the corresponding Flink Type as Bytes i.e. VARBINARY(MAX_LENGTH).

However, when converting back, the varbinary length is set to BlobType.DEFAULT_LENGTH, which will be inconsistent in some situations.

Tests

API and Format

See Blob Test

Documentation

Generative AI tooling

The test code is generated by Claude Opus 4.6 and reviewed by me.

@steFaiz steFaiz marked this pull request as draft March 11, 2026 10:31
@steFaiz steFaiz closed this Mar 11, 2026
@steFaiz steFaiz reopened this Mar 11, 2026
@steFaiz steFaiz marked this pull request as ready for review March 11, 2026 11:28
@steFaiz
Copy link
Copy Markdown
Contributor Author

steFaiz commented Mar 11, 2026

I'm not sure whether it's expected. If we create a table through flink sql gateway then call SHOW CREATE TABLE, the blob column type will be changed from BYTES to VARBINARY(1048576)

Copy link
Copy Markdown
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

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

+1

@JingsongLi JingsongLi merged commit e2aec56 into apache:master Mar 12, 2026
24 checks passed
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.

2 participants