You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "hanyuzheng7 (via GitHub)" <gi...@apache.org> on 2023/07/28 05:50:49 UTC
[GitHub] [flink] hanyuzheng7 opened a new pull request, #23097: [FLINK-32564][table] Support Cast From BYTES to NUMBER
hanyuzheng7 opened a new pull request, #23097:
URL: https://github.com/apache/flink/pull/23097
### What is the purpose of the change
Implement` CAST` from `BINARY`/`VARBINART`/`BYTES `to `NUMBER`
### Brief change log
` CAST` from `BINARY`/`VARBINART`/`BYTES `to `NUMBER` for Table API and SQL
Syntax:
`
CAST(NUMBER AS BYTES)
`
Examples:
```
Flink SQL> select cast(cast('1234' as BYTES) as BIGINT);;
res: 1234
Flink SQL> select cast(cast('1234' as BYTES) as DOUBLE);
res: 1234.0
select cast(cast('123' as BYTES) as TINYINT);
res: 123
Flink SQL> select cast(cast('123' as BYTES) as INT);
res:123
Flink SQL> select cast(cast('123' as BYTES) as FLOAT);
res:123.0
Flink SQL> select cast(cast('123' as BYTES) as SMALLINT);
res:123
```
### 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)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] hanyuzheng7 closed pull request #23097: [FLINK-32564][table] Support Cast From BYTES to NUMBER
Posted by "hanyuzheng7 (via GitHub)" <gi...@apache.org>.
hanyuzheng7 closed pull request #23097: [FLINK-32564][table] Support Cast From BYTES to NUMBER
URL: https://github.com/apache/flink/pull/23097
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org