You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/02/11 11:53:33 UTC
[GitHub] [flink] wangxlong opened a new pull request #11058:
[FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
wangxlong opened a new pull request #11058: [FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
URL: https://github.com/apache/flink/pull/11058
## What is the purpose of the change
Change TO_BASE64 sql operator defination
## Brief change log
1. Change SqlTypeFamily.ANY to OperandTypes.family(SqlTypeFamily.STRING)
2. Change VARCHAR_2000_NULLABLE to ReturnTypes.cascade(ReturnTypes.explicit(SqlTypeName.VARCHAR), SqlTypeTransforms.TO_NULLABLE) to align with legency planner
## Verifying this change
This change is a trivial rework without any test coverage.
## 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)`: (no)
- The serializers: (no)
- The runtime per-record code paths (performance sensitive): (no)
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
- The S3 file system connector: (no)
## Documentation
- Does this pull request introduce a new feature? (no)
- If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11058:
[FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11058: [FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
URL: https://github.com/apache/flink/pull/11058#issuecomment-584608498
<!--
Meta data
Hash:66514df47c1dcf00cb12be4f26a7ed26ee97da1f Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/148365411 TriggerType:PUSH TriggerID:66514df47c1dcf00cb12be4f26a7ed26ee97da1f
Hash:66514df47c1dcf00cb12be4f26a7ed26ee97da1f Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5051 TriggerType:PUSH TriggerID:66514df47c1dcf00cb12be4f26a7ed26ee97da1f
Hash:615c6ca6c5212d8638734e6f7fffb6f22bed9602 Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5060 TriggerType:PUSH TriggerID:615c6ca6c5212d8638734e6f7fffb6f22bed9602
Hash:615c6ca6c5212d8638734e6f7fffb6f22bed9602 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/148380579 TriggerType:PUSH TriggerID:615c6ca6c5212d8638734e6f7fffb6f22bed9602
-->
## CI report:
* 66514df47c1dcf00cb12be4f26a7ed26ee97da1f Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/148365411) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5051)
* 615c6ca6c5212d8638734e6f7fffb6f22bed9602 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/148380579) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5060)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] wangxlong commented on a change in pull request #11058:
[FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
Posted by GitBox <gi...@apache.org>.
wangxlong commented on a change in pull request #11058: [FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
URL: https://github.com/apache/flink/pull/11058#discussion_r377610046
##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/functions/sql/FlinkSqlOperatorTable.java
##########
@@ -574,9 +574,9 @@ public SqlMonotonicity getMonotonicity(SqlOperatorBinding call) {
public static final SqlFunction TO_BASE64 = new SqlFunction(
"TO_BASE64",
SqlKind.OTHER_FUNCTION,
- VARCHAR_2000_NULLABLE,
+ ReturnTypes.cascade(ReturnTypes.explicit(SqlTypeName.VARCHAR), SqlTypeTransforms.TO_NULLABLE),
null,
- OperandTypes.ANY,
+ OperandTypes.family(SqlTypeFamily.STRING),
Review comment:
Thank you @wuchong @libenchao. We change from OperandTypes.ANY to OperandTypes.family(SqlTypeFamily.STRING). If user apply int type to to_base function. For the before, it will throw runtimeException. And for now, it will fail in validation.
So, if we should add a test, I think we can add it to org.apache.flink.table.planner.expressions.validation.ScalarFunctionsValidationTest to verify fail in validation stage. For the org.apache.flink.table.expressions#testToBase64, it already has test to verify the correct arguments.
is It right?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] wangxlong commented on a change in pull request #11058:
[FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
Posted by GitBox <gi...@apache.org>.
wangxlong commented on a change in pull request #11058: [FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
URL: https://github.com/apache/flink/pull/11058#discussion_r377610046
##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/functions/sql/FlinkSqlOperatorTable.java
##########
@@ -574,9 +574,9 @@ public SqlMonotonicity getMonotonicity(SqlOperatorBinding call) {
public static final SqlFunction TO_BASE64 = new SqlFunction(
"TO_BASE64",
SqlKind.OTHER_FUNCTION,
- VARCHAR_2000_NULLABLE,
+ ReturnTypes.cascade(ReturnTypes.explicit(SqlTypeName.VARCHAR), SqlTypeTransforms.TO_NULLABLE),
null,
- OperandTypes.ANY,
+ OperandTypes.family(SqlTypeFamily.STRING),
Review comment:
Thank you @wuchong @libenchao. We change from OperandTypes.ANY to OperandTypes.family(SqlTypeFamily.STRING). If user apply int type to to_base function. For the before, it will throw runtimeException. And for now, it will fail in validation.
So, if we should add a test, I think we can add it to org.apache.flink.table.planner.expressions.ScalarFunctionsTest to verify fail in validation stage. For the org.apache.flink.table.expressions#testToBase64, it already has test to verify the correct arguments.
It is right?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] wangxlong commented on issue #11058:
[FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
Posted by GitBox <gi...@apache.org>.
wangxlong commented on issue #11058: [FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
URL: https://github.com/apache/flink/pull/11058#issuecomment-584972644
@flinkbot run travis
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11058:
[FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11058: [FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
URL: https://github.com/apache/flink/pull/11058#issuecomment-584608498
<!--
Meta data
Hash:66514df47c1dcf00cb12be4f26a7ed26ee97da1f Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/148365411 TriggerType:PUSH TriggerID:66514df47c1dcf00cb12be4f26a7ed26ee97da1f
Hash:66514df47c1dcf00cb12be4f26a7ed26ee97da1f Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5051 TriggerType:PUSH TriggerID:66514df47c1dcf00cb12be4f26a7ed26ee97da1f
Hash:615c6ca6c5212d8638734e6f7fffb6f22bed9602 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:615c6ca6c5212d8638734e6f7fffb6f22bed9602
-->
## CI report:
* 66514df47c1dcf00cb12be4f26a7ed26ee97da1f Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/148365411) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5051)
* 615c6ca6c5212d8638734e6f7fffb6f22bed9602 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11058:
[FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11058: [FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
URL: https://github.com/apache/flink/pull/11058#issuecomment-584608498
<!--
Meta data
Hash:66514df47c1dcf00cb12be4f26a7ed26ee97da1f Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/148365411 TriggerType:PUSH TriggerID:66514df47c1dcf00cb12be4f26a7ed26ee97da1f
Hash:66514df47c1dcf00cb12be4f26a7ed26ee97da1f Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5051 TriggerType:PUSH TriggerID:66514df47c1dcf00cb12be4f26a7ed26ee97da1f
Hash:615c6ca6c5212d8638734e6f7fffb6f22bed9602 Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5060 TriggerType:PUSH TriggerID:615c6ca6c5212d8638734e6f7fffb6f22bed9602
Hash:615c6ca6c5212d8638734e6f7fffb6f22bed9602 Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/148380579 TriggerType:PUSH TriggerID:615c6ca6c5212d8638734e6f7fffb6f22bed9602
-->
## CI report:
* 66514df47c1dcf00cb12be4f26a7ed26ee97da1f Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/148365411) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5051)
* 615c6ca6c5212d8638734e6f7fffb6f22bed9602 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/148380579) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5060)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] flinkbot commented on issue #11058:
[FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11058: [FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
URL: https://github.com/apache/flink/pull/11058#issuecomment-584608498
<!--
Meta data
Hash:66514df47c1dcf00cb12be4f26a7ed26ee97da1f Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:66514df47c1dcf00cb12be4f26a7ed26ee97da1f
-->
## CI report:
* 66514df47c1dcf00cb12be4f26a7ed26ee97da1f UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] flinkbot commented on issue #11058:
[FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11058: [FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
URL: https://github.com/apache/flink/pull/11058#issuecomment-584601158
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.
## Automated Checks
Last check on commit 66514df47c1dcf00cb12be4f26a7ed26ee97da1f (Tue Feb 11 11:56:42 UTC 2020)
**Warnings:**
* No documentation files were touched! Remember to keep the Flink docs up to date!
* **This pull request references an unassigned [Jira ticket](https://issues.apache.org/jira/browse/FLINK-15995).** According to the [code contribution guide](https://flink.apache.org/contributing/contribute-code.html), tickets need to be assigned before starting with the implementation work.
<sub>Mention the bot in a comment to re-run the automated checks.</sub>
## Review Progress
* ❓ 1. The [description] looks good.
* ❓ 2. There is [consensus] that the contribution should go into to Flink.
* ❓ 3. Needs [attention] from.
* ❓ 4. The change fits into the overall [architecture].
* ❓ 5. Overall code [quality] is good.
Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
- `@flinkbot approve all` to approve all aspects
- `@flinkbot approve-until architecture` to approve everything until `architecture`
- `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
- `@flinkbot disapprove architecture` to remove an approval you gave earlier
</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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] wuchong merged pull request #11058:
[FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
Posted by GitBox <gi...@apache.org>.
wuchong merged pull request #11058: [FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
URL: https://github.com/apache/flink/pull/11058
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] libenchao commented on issue #11058:
[FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
Posted by GitBox <gi...@apache.org>.
libenchao commented on issue #11058: [FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
URL: https://github.com/apache/flink/pull/11058#issuecomment-584656500
@wangxlong Thanks for your contribution.
LGTM. +1 for the merging.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11058:
[FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11058: [FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
URL: https://github.com/apache/flink/pull/11058#issuecomment-584608498
<!--
Meta data
Hash:66514df47c1dcf00cb12be4f26a7ed26ee97da1f Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/148365411 TriggerType:PUSH TriggerID:66514df47c1dcf00cb12be4f26a7ed26ee97da1f
Hash:66514df47c1dcf00cb12be4f26a7ed26ee97da1f Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5051 TriggerType:PUSH TriggerID:66514df47c1dcf00cb12be4f26a7ed26ee97da1f
Hash:615c6ca6c5212d8638734e6f7fffb6f22bed9602 Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5060 TriggerType:PUSH TriggerID:615c6ca6c5212d8638734e6f7fffb6f22bed9602
Hash:615c6ca6c5212d8638734e6f7fffb6f22bed9602 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/148380579 TriggerType:PUSH TriggerID:615c6ca6c5212d8638734e6f7fffb6f22bed9602
Hash:615c6ca6c5212d8638734e6f7fffb6f22bed9602 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/148380579 TriggerType:MANUAL TriggerID:584972644
-->
## CI report:
* 66514df47c1dcf00cb12be4f26a7ed26ee97da1f Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/148365411) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5051)
* 615c6ca6c5212d8638734e6f7fffb6f22bed9602 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/148380579) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5060)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] libenchao commented on a change in pull request #11058:
[FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
Posted by GitBox <gi...@apache.org>.
libenchao commented on a change in pull request #11058: [FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
URL: https://github.com/apache/flink/pull/11058#discussion_r377592907
##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/functions/sql/FlinkSqlOperatorTable.java
##########
@@ -574,9 +574,9 @@ public SqlMonotonicity getMonotonicity(SqlOperatorBinding call) {
public static final SqlFunction TO_BASE64 = new SqlFunction(
"TO_BASE64",
SqlKind.OTHER_FUNCTION,
- VARCHAR_2000_NULLABLE,
+ ReturnTypes.cascade(ReturnTypes.explicit(SqlTypeName.VARCHAR), SqlTypeTransforms.TO_NULLABLE),
null,
- OperandTypes.ANY,
+ OperandTypes.family(SqlTypeFamily.STRING),
Review comment:
Thanks for your contribution~
Could you add a test for this, like the one you described in jira?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] wuchong commented on a change in pull request #11058:
[FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #11058: [FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
URL: https://github.com/apache/flink/pull/11058#discussion_r377618225
##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/functions/sql/FlinkSqlOperatorTable.java
##########
@@ -574,9 +574,9 @@ public SqlMonotonicity getMonotonicity(SqlOperatorBinding call) {
public static final SqlFunction TO_BASE64 = new SqlFunction(
"TO_BASE64",
SqlKind.OTHER_FUNCTION,
- VARCHAR_2000_NULLABLE,
+ ReturnTypes.cascade(ReturnTypes.explicit(SqlTypeName.VARCHAR), SqlTypeTransforms.TO_NULLABLE),
null,
- OperandTypes.ANY,
+ OperandTypes.family(SqlTypeFamily.STRING),
Review comment:
You are right. I messed it with another fromBase64 PR.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11058:
[FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11058: [FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
URL: https://github.com/apache/flink/pull/11058#issuecomment-584608498
<!--
Meta data
Hash:66514df47c1dcf00cb12be4f26a7ed26ee97da1f Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/148365411 TriggerType:PUSH TriggerID:66514df47c1dcf00cb12be4f26a7ed26ee97da1f
Hash:66514df47c1dcf00cb12be4f26a7ed26ee97da1f Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5051 TriggerType:PUSH TriggerID:66514df47c1dcf00cb12be4f26a7ed26ee97da1f
-->
## CI report:
* 66514df47c1dcf00cb12be4f26a7ed26ee97da1f Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/148365411) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5051)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11058:
[FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11058: [FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
URL: https://github.com/apache/flink/pull/11058#issuecomment-584608498
<!--
Meta data
Hash:66514df47c1dcf00cb12be4f26a7ed26ee97da1f Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/148365411 TriggerType:PUSH TriggerID:66514df47c1dcf00cb12be4f26a7ed26ee97da1f
Hash:66514df47c1dcf00cb12be4f26a7ed26ee97da1f Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5051 TriggerType:PUSH TriggerID:66514df47c1dcf00cb12be4f26a7ed26ee97da1f
Hash:615c6ca6c5212d8638734e6f7fffb6f22bed9602 Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5060 TriggerType:PUSH TriggerID:615c6ca6c5212d8638734e6f7fffb6f22bed9602
Hash:615c6ca6c5212d8638734e6f7fffb6f22bed9602 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/148380579 TriggerType:PUSH TriggerID:615c6ca6c5212d8638734e6f7fffb6f22bed9602
Hash:615c6ca6c5212d8638734e6f7fffb6f22bed9602 Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/148380579 TriggerType:MANUAL TriggerID:584972644
-->
## CI report:
* 66514df47c1dcf00cb12be4f26a7ed26ee97da1f Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/148365411) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5051)
* 615c6ca6c5212d8638734e6f7fffb6f22bed9602 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/148380579) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5060)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] wuchong commented on a change in pull request #11058:
[FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #11058: [FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
URL: https://github.com/apache/flink/pull/11058#discussion_r377595239
##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/functions/sql/FlinkSqlOperatorTable.java
##########
@@ -574,9 +574,9 @@ public SqlMonotonicity getMonotonicity(SqlOperatorBinding call) {
public static final SqlFunction TO_BASE64 = new SqlFunction(
"TO_BASE64",
SqlKind.OTHER_FUNCTION,
- VARCHAR_2000_NULLABLE,
+ ReturnTypes.cascade(ReturnTypes.explicit(SqlTypeName.VARCHAR), SqlTypeTransforms.TO_NULLABLE),
null,
- OperandTypes.ANY,
+ OperandTypes.family(SqlTypeFamily.STRING),
Review comment:
You can add tests to `org.apache.flink.table.expressions.ScalarFunctionsTest#testToBase64`。
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] wangxlong commented on a change in pull request #11058:
[FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
Posted by GitBox <gi...@apache.org>.
wangxlong commented on a change in pull request #11058: [FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
URL: https://github.com/apache/flink/pull/11058#discussion_r377634657
##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/functions/sql/FlinkSqlOperatorTable.java
##########
@@ -574,9 +574,9 @@ public SqlMonotonicity getMonotonicity(SqlOperatorBinding call) {
public static final SqlFunction TO_BASE64 = new SqlFunction(
"TO_BASE64",
SqlKind.OTHER_FUNCTION,
- VARCHAR_2000_NULLABLE,
+ ReturnTypes.cascade(ReturnTypes.explicit(SqlTypeName.VARCHAR), SqlTypeTransforms.TO_NULLABLE),
null,
- OperandTypes.ANY,
+ OperandTypes.family(SqlTypeFamily.STRING),
Review comment:
👌, Updated.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11058:
[FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11058: [FLINK-15995][Table-planner-blink] Change TO_BASE64 sql operator defination
URL: https://github.com/apache/flink/pull/11058#issuecomment-584608498
<!--
Meta data
Hash:66514df47c1dcf00cb12be4f26a7ed26ee97da1f Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/148365411 TriggerType:PUSH TriggerID:66514df47c1dcf00cb12be4f26a7ed26ee97da1f
Hash:66514df47c1dcf00cb12be4f26a7ed26ee97da1f Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5051 TriggerType:PUSH TriggerID:66514df47c1dcf00cb12be4f26a7ed26ee97da1f
-->
## CI report:
* 66514df47c1dcf00cb12be4f26a7ed26ee97da1f Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/148365411) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5051)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services