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

[BP-1.17][FLINK-32565][table] Support Cast From NUMBER to BYTES #23189

Conversation

hanyuzheng7
Copy link
Contributor

What is the purpose of the change

Implement CAST from NUMBER to BINARY/VARBINART/BYTES

Brief change log

CAST from NUMBER to BINARY/VARBINART/BYTES for Table API and SQL

Syntax:
CAST(BYTES AS NUMBER)

Examples:

Flink SQL> select cast(1 as BYTES);
res: x'31'

Flink SQL> select cast(cast(1 as DOUBLE) as BYTES);
res: x'312e30'

Flink SQL> select cast(cast(1 as BIGINT) as BYTES);
res: x'31'

Verifying this change

  • This change added tests in CastFunctionITCase.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @public(Evolving): (yes)
  • The serializers: (no)
  • The runtime per-record code paths (performance sensitive): (no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
  • The S3 file system connector: (no)

Documentation

  • Does this pull request introduce a new feature? (yes)
  • If yes, how is the feature documented? (docs)

binary-to-number & number-to-binary
@flinkbot
Copy link
Collaborator

flinkbot commented Aug 10, 2023

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@MartijnVisser
Copy link
Contributor

Closing this PR since we don't backport new features into existing releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants