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/08/13 16:42:13 UTC
[GitHub] [flink] hanyuzheng7 opened a new pull request, #23202: bytes-to-number & number-to-bytes
hanyuzheng7 opened a new pull request, #23202:
URL: https://github.com/apache/flink/pull/23202
### What is the purpose of the change
Implement` CAST` from `BINARY`/`VARBINART`/`BYTES `to `NUMBER`
Implement` CAST` from `NUMBER` to `BINARY`/`VARBINART`/`BYTES `
### Brief change log
` CAST` from `BINARY`/`VARBINART`/`BYTES `to `NUMBER` for Table API and SQL
` CAST` from `NUMBER` to `BINARY`/`VARBINART`/`BYTES ` for Table API and SQL
Syntax:
`
CAST(NUMBER AS BYTES)
CAST(BYTEs AS NUMBER)
`
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
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)
--
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] flinkbot commented on pull request #23202: [FLINK-32564][table]bytes-to-number & number-to-bytes
Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #23202:
URL: https://github.com/apache/flink/pull/23202#issuecomment-1676408995
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "bca6a27cd3cb23e87a8da345891f783ecb06c632",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "bca6a27cd3cb23e87a8da345891f783ecb06c632",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* bca6a27cd3cb23e87a8da345891f783ecb06c632 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run azure` re-run the last Azure build
</details>
--
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
Re: [PR] [FLINK-32564][table]bytes-to-number & number-to-bytes [flink]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #23202: [FLINK-32564][table]bytes-to-number & number-to-bytes
URL: https://github.com/apache/flink/pull/23202
--
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
Re: [PR] [FLINK-32564][table]bytes-to-number & number-to-bytes [flink]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23202:
URL: https://github.com/apache/flink/pull/23202#issuecomment-2596379697
This PR is being marked as stale since it has not had any activity in the last 180 days.
If you would like to keep this PR alive, please leave a comment asking for a review.
If the PR has merge conflicts, update it with the latest from the base branch.
If you are having difficulty finding a reviewer, please reach out to the
community, contact details can be found here: https://flink.apache.org/what-is-flink/community/
If this PR is no longer valid or desired, please feel free to close it.
If no activity occurs in the next 90 days, it will be automatically closed.
--
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
Re: [PR] [FLINK-32564][table]bytes-to-number & number-to-bytes [flink]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23202:
URL: https://github.com/apache/flink/pull/23202#issuecomment-2771461441
This PR has been closed since it has not had any activity in 120 days.
If you feel like this was a mistake, or you would like to continue working on it,
please feel free to re-open the PR and ask for a review.
--
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