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 2021/11/03 10:40:14 UTC
[GitHub] [flink] slinkydeveloper opened a new pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
slinkydeveloper opened a new pull request #17658:
URL: https://github.com/apache/flink/pull/17658
<!--
*Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
*Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.*
## Contribution Checklist
- Make sure that the pull request corresponds to a [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
- Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] [docs] Fix typo in event time introduction` or `[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
- Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
- Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can set up Azure Pipelines CI to do that following [this guide](https://cwiki.apache.org/confluence/display/FLINK/Azure+Pipelines#AzurePipelines-Tutorial:SettingupAzurePipelinesforaforkoftheFlinkrepository).
- Each pull request should address only one issue, not mix up code from multiple issues.
- Each commit in the pull request has a meaningful commit message (including the JIRA id)
- Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
**(The sections below can be removed for hotfixes of typos)**
-->
## What is the purpose of the change
This PR ports all the "to string" casting logic to the new `CastRule` stack, as discussed https://issues.apache.org/jira/browse/FLINK-24684.
## Brief change log
### Major PR changes
- Port all cast to string logic to the new `CastRule` stack
- Cleaned up old logic in `ScalarOperatorGens` for to string casting
- Now `CastRuleUtils` provides a `CodeWriter` to simplify and organize code generation using java
### Included minor changes
- Write in the code generated functions a comment to identify which rule was used for generating that specific code
- Add logging in `OperatorCodeGen` to debug codegen issues
- Now `ExpressionTestBase` provides more verbose assertion error logging
## Verifying this change
Each new rule is tested with new test cases in `CastRulesTest`, and then they are covered inside integration tests provided by `CastFunctionsITCase`.
## 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, Kubernetes/Yarn, 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
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* e9e7c13e49a07f2e8a2185db90ad4d95741beb87 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895)
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
<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
[GitHub] [flink] flinkbot commented on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958883702
--
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] matriv commented on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
matriv commented on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-959587919
--
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] matriv commented on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
matriv commented on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-959587919
> @matriv regarding testing the rules in `CastFunctionsITCase`, I effectively found out that the row, array and map rules doesn't work, because some validation steps before (`SqlValidatorImpl` and `LogicalTypeCasts`) thinks the cast combination is invalid. Because the goal of this PR is to simply port the logic from `ScalarOperatorGens` to the new rules, perhaps should we tackle the issue of "exposing" the rules in the context of https://issues.apache.org/jira/browse/FLINK-21456?
Yes of course, my mistake, thought those casts work end to end now.
--
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] twalthr commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
twalthr commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r742622302
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/CastRuleProvider.java
##########
@@ -44,10 +54,25 @@
private static final CastRuleProvider INSTANCE = new CastRuleProvider();
static {
- INSTANCE.addRule(TimestampToStringCastRule.INSTANCE)
- .addRule(IdentityCastRule.INSTANCE)
+ INSTANCE
+ // Numeric rules
.addRule(UpcastToBigIntCastRule.INSTANCE)
- .addRule(ArrayToArrayCastRule.INSTANCE);
+ // To string rules
+ .addRule(NumberToStringCastRule.INSTANCE)
Review comment:
nit: can we use our type root and type family terminology if possible? `NumericToVarchar` or at least `NumericToString`?
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/CastRuleUtils.java
##########
@@ -36,4 +49,141 @@ static String functionCall(String functionName, Object... args) {
static String functionCall(Method staticMethod, Object... args) {
return functionCall(CodeGenUtils.qualifyMethod(staticMethod), args);
}
+
+ static String constructorCall(Class<?> clazz, Object... args) {
+ return functionCall("new " + className(clazz), args);
+ }
+
+ static String methodCall(String instanceTerm, String methodName, Object... args) {
+ return functionCall(instanceTerm + "." + methodName, args);
+ }
+
+ static String newArray(String innerType, String arraySize) {
+ return "new " + innerType + "[" + arraySize + "]";
+ }
+
+ static String stringConcat(Object... args) {
+ return Arrays.stream(args).map(Object::toString).collect(Collectors.joining(" + "));
+ }
+
+ static String accessStaticField(Class<?> clazz, String fieldName) {
+ return className(clazz) + "." + fieldName;
+ }
+
+ static String ternaryOperator(String condition, String ifTrue, String ifFalse) {
+ return "((" + condition + ") ? (" + ifTrue + ") : (" + ifFalse + "))";
+ }
+
+ static String strLiteral() {
+ return "\"\"";
+ }
+
+ static String strLiteral(String str) {
+ return "\"" + StringEscapeUtils.escapeJava(str) + "\"";
+ }
+
+ static final class CodeWriter {
Review comment:
very nice!
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -60,39 +112,142 @@
.fromCase(SMALLINT(), (short) 10, 10L)
.fromCase(TINYINT(), (byte) 10, 10L),
CastTestSpecBuilder.testCastTo(STRING())
+ .fromCase(STRING(), null, null)
+ .fromCase(
+ CHAR(3), StringData.fromString("foo"), StringData.fromString("foo"))
+ .fromCase(
+ VARCHAR(5),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ VARCHAR(10),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ STRING(),
+ StringData.fromString("Apache Flink"),
+ StringData.fromString("Apache Flink"))
+ .fromCase(BOOLEAN(), true, StringData.fromString("true"))
+ .fromCase(BOOLEAN(), false, StringData.fromString("false"))
+ .fromCase(
+ BINARY(2), new byte[] {0, 1}, StringData.fromString("\u0000\u0001"))
+ .fromCase(
+ VARBINARY(3),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ VARBINARY(5),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ BYTES(),
+ new byte[] {0, 1, 2, 3, 4},
+ StringData.fromString("\u0000\u0001\u0002\u0003\u0004"))
+ .fromCase(
+ DECIMAL(4, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 4, 3),
+ StringData.fromString("9.870"))
+ .fromCase(
+ DECIMAL(5, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 5, 3),
+ StringData.fromString("9.870"))
Review comment:
This should have leading zeros, no?
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToArrayCastRule.java
##########
@@ -68,63 +70,61 @@ protected String generateCodeBlockInternal(
String returnVariable,
LogicalType inputLogicalType,
LogicalType targetLogicalType) {
- LogicalType innerInputType = ((ArrayType) inputLogicalType).getElementType();
- LogicalType innerTargetType = ((ArrayType) targetLogicalType).getElementType();
-
- String innerTargetTypeTerm = arrayElementType(innerTargetType);
- String arraySize = inputTerm + ".size()";
- String objArrayTerm = newName("objArray");
-
- StringBuilder result = new StringBuilder();
- result.append(
- innerTargetTypeTerm
- + "[] "
- + objArrayTerm
- + " = new "
- + innerTargetTypeTerm
- + "["
- + arraySize
- + "];\n");
-
- result.append("for (int i = 0; i < " + arraySize + "; i++) {\n");
- CastCodeBlock codeBlock =
- CastRuleProvider.generateCodeBlock(
- context,
- rowFieldReadAccess("i", inputTerm, innerInputType),
- functionCall(inputTerm + ".isNullAt", "i"),
- innerInputType.copy(false), // Null check is done at the array access level
- innerTargetType);
-
- String innerElementCode =
- codeBlock.getCode()
- + "\n"
- + objArrayTerm
- + "[i] = "
- + codeBlock.getReturnTerm()
- + ";\n";
+ final LogicalType innerInputType = ((ArrayType) inputLogicalType).getElementType();
+ final LogicalType innerTargetType =
+ sanitizeTargetType((ArrayType) inputLogicalType, (ArrayType) targetLogicalType);
+
+ final String innerTargetTypeTerm = arrayElementType(innerTargetType);
+ final String arraySize = methodCall(inputTerm, "size");
+ final String objArrayTerm = newName("objArray");
+
+ return new CastRuleUtils.CodeWriter()
+ .declStmt(
+ innerTargetTypeTerm + "[]",
+ objArrayTerm,
+ newArray(innerTargetTypeTerm, arraySize))
+ .forStmt(
+ arraySize,
+ (index, loopWriter) -> {
+ CastCodeBlock codeBlock =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ rowFieldReadAccess(index, inputTerm, innerInputType),
+ "false",
+ // Null check is done at the array access level
+ innerInputType.copy(false),
+ innerTargetType);
+
+ if (innerTargetType.isNullable()) {
+ loopWriter.ifStmt(
+ "!" + functionCall(inputTerm + ".isNullAt", index),
Review comment:
I find the name `functionCall` vs. `methodCall` confusing. How about `staticCall` for `functionCall`?
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("(");
+ int f0Value$2 = -1;
+ boolean f0IsNull$3 = _myInput.isNullAt(0);
+ if (!f0IsNull$3) {
+ f0Value$2 = _myInput.getInt(0);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + f0Value$2);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(",");
+ org.apache.flink.table.data.binary.BinaryStringData f1Value$4 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean f1IsNull$5 = _myInput.isNullAt(1);
+ if (!f1IsNull$5) {
+ f1Value$4 = ((org.apache.flink.table.data.binary.BinaryStringData) _myInput.getString(1));
+ builder$1.append(f1Value$4);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(")");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final List<LogicalType> fields =
+ ((RowType) inputLogicalType)
+ .getFields().stream()
+ .map(RowType.RowField::getType)
+ .collect(Collectors.toList());
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final CastRuleUtils.CodeWriter writer =
+ new CastRuleUtils.CodeWriter()
+ .stmt(
+ methodCall(
+ builderTerm,
+ "delete",
+ 0,
+ methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("(")));
Review comment:
maybe document why we chose this representation, because I was just thinking about if we should synchronize this with the `Row.toString`. but maybe `( )` is ok to distinguish it from arrays and rows with `+I[]` where we also have a change flag
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/BinaryToStringCastRule.java
##########
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+
+import java.nio.charset.StandardCharsets;
+
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.accessStaticField;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+
+/**
+ * {@link LogicalTypeFamily#BINARY_STRING} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule.
+ */
+public class BinaryToStringCastRule extends AbstractCharacterFamilyTargetRule<byte[]> {
Review comment:
don't forget to mark all rules `@Internal` or even better package private
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/IdentityCastRule.java
##########
@@ -23,17 +23,32 @@
import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
-import java.util.Objects;
-
-/** Identity casting rule. */
+/**
+ * Identity cast rule. For more details on when the rule is applied, check {@link
+ * #isIdentityCast(LogicalType, LogicalType)}
+ */
@Internal
public class IdentityCastRule extends AbstractCodeGeneratorCastRule<Object, Object> {
public static final IdentityCastRule INSTANCE = new IdentityCastRule();
private IdentityCastRule() {
- super(CastRulePredicate.builder().predicate(Objects::equals).build());
+ super(CastRulePredicate.builder().predicate(IdentityCastRule::isIdentityCast).build());
+ }
+
+ private static boolean isIdentityCast(
+ LogicalType inputLogicalType, LogicalType targetLogicalType) {
+ // TODO string to string casting now behaves like string casting.
+ // the discussion in FLINK-24413 will address it
+ if (inputLogicalType.is(LogicalTypeFamily.CHARACTER_STRING)
+ && targetLogicalType.is(LogicalTypeFamily.CHARACTER_STRING)) {
+ return true;
+ }
+
+ // Identity cast applies if the two types are equals, except nullability
+ return inputLogicalType.copy(true).equals(targetLogicalType.copy(true));
Review comment:
use `org.apache.flink.table.types.logical.utils.LogicalTypeCasts#supportsAvoidingCast` here. Nullability is not the only property that can be skipped.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/CastRuleUtils.java
##########
@@ -36,4 +49,141 @@ static String functionCall(String functionName, Object... args) {
static String functionCall(Method staticMethod, Object... args) {
return functionCall(CodeGenUtils.qualifyMethod(staticMethod), args);
}
+
+ static String constructorCall(Class<?> clazz, Object... args) {
+ return functionCall("new " + className(clazz), args);
+ }
+
+ static String methodCall(String instanceTerm, String methodName, Object... args) {
+ return functionCall(instanceTerm + "." + methodName, args);
+ }
+
+ static String newArray(String innerType, String arraySize) {
+ return "new " + innerType + "[" + arraySize + "]";
+ }
+
+ static String stringConcat(Object... args) {
+ return Arrays.stream(args).map(Object::toString).collect(Collectors.joining(" + "));
+ }
+
+ static String accessStaticField(Class<?> clazz, String fieldName) {
+ return className(clazz) + "." + fieldName;
+ }
+
+ static String ternaryOperator(String condition, String ifTrue, String ifFalse) {
+ return "((" + condition + ") ? (" + ifTrue + ") : (" + ifFalse + "))";
+ }
+
+ static String strLiteral() {
+ return "\"\"";
+ }
+
+ static String strLiteral(String str) {
+ return "\"" + StringEscapeUtils.escapeJava(str) + "\"";
+ }
+
+ static final class CodeWriter {
+ StringBuilder builder = new StringBuilder();
+
+ public CodeWriter declStmt(String varType, String varName, String value) {
+ return stmt(varType + " " + varName + " = " + value);
+ }
+
+ public CodeWriter declStmt(Class<?> clazz, String varName, String value) {
+ return declStmt(className(clazz), varName, value);
+ }
+
+ public CodeWriter declPrimitiveStmt(LogicalType logicalType, String varName, String value) {
+ return declStmt(primitiveTypeTermForType(logicalType), varName, value);
+ }
+
+ public CodeWriter declPrimitiveStmt(LogicalType logicalType, String varName) {
+ return declStmt(
+ primitiveTypeTermForType(logicalType),
+ varName,
+ primitiveDefaultValue(logicalType));
+ }
+
+ public CodeWriter declStmt(String varType, String varName) {
+ return stmt(varType + " " + varName);
+ }
+
+ public CodeWriter declStmt(Class<?> clazz, String varName) {
+ return declStmt(className(clazz), varName);
+ }
+
+ public CodeWriter assignStmt(String varName, String value) {
+ return stmt(varName + " = " + value);
+ }
+
+ public CodeWriter assignArrayStmt(String varName, String index, String value) {
+ return stmt(varName + "[" + index + "] = " + value);
+ }
+
+ public CodeWriter stmt(String stmt) {
+ builder.append(stmt).append(';').append('\n');
+ return this;
+ }
+
+ public CodeWriter forStmt(
+ String upperBound, BiConsumer<String, CodeWriter> bodyWriterConsumer) {
+ final String indexTerm = newName("i");
+ final CodeWriter innerWriter = new CodeWriter();
+
+ builder.append("for (int ")
+ .append(indexTerm)
+ .append(" = 0; ")
+ .append(indexTerm)
+ .append(" < ")
+ .append(upperBound)
+ .append("; ")
+ .append(indexTerm)
+ .append("++) {\n");
+ bodyWriterConsumer.accept(indexTerm, innerWriter);
+ builder.append(innerWriter).append("}\n");
+
+ return this;
+ }
+
+ public CodeWriter ifStmt(String condition, Consumer<CodeWriter> bodyWriterConsumer) {
+ final CodeWriter innerWriter = new CodeWriter();
+
+ builder.append("if (").append(condition).append(") {\n");
+ bodyWriterConsumer.accept(innerWriter);
+ builder.append(innerWriter).append("}\n");
+
+ return this;
+ }
+
+ public CodeWriter ifStmt(
+ String condition,
+ Consumer<CodeWriter> thenWriterConsumer,
+ Consumer<CodeWriter> elseWriterConsumer) {
+ final CodeWriter thenWriter = new CodeWriter();
+ final CodeWriter elseWriter = new CodeWriter();
+
+ builder.append("if (").append(condition).append(") {\n");
+ thenWriterConsumer.accept(thenWriter);
+ builder.append(thenWriter).append("} else {\n");
+ elseWriterConsumer.accept(elseWriter);
+ builder.append(elseWriter).append("}\n");
+
+ return this;
+ }
+
+ public CodeWriter append(CastCodeBlock codeBlock) {
+ builder.append(codeBlock.getCode());
+ return this;
+ }
+
+ public CodeWriter append(String codeBlock) {
Review comment:
`appendBlock`?
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/BooleanToStringCastRule.java
##########
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.stringConcat;
+
+/** {@link LogicalTypeRoot#BOOLEAN} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class BooleanToStringCastRule extends AbstractCharacterFamilyTargetRule<Object> {
+
+ public static final BooleanToStringCastRule INSTANCE = new BooleanToStringCastRule();
+
+ private BooleanToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .input(LogicalTypeRoot.BOOLEAN)
+ .target(LogicalTypeFamily.CHARACTER_STRING)
+ .build());
+ }
+
+ @Override
+ public String generateStringExpression(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ return stringConcat(strLiteral(), inputTerm);
Review comment:
maybe a constant `EMPTY_STRING` or `strLiteralEmpty()`?
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/CastRuleUtils.java
##########
@@ -36,4 +49,141 @@ static String functionCall(String functionName, Object... args) {
static String functionCall(Method staticMethod, Object... args) {
return functionCall(CodeGenUtils.qualifyMethod(staticMethod), args);
}
+
+ static String constructorCall(Class<?> clazz, Object... args) {
+ return functionCall("new " + className(clazz), args);
+ }
+
+ static String methodCall(String instanceTerm, String methodName, Object... args) {
+ return functionCall(instanceTerm + "." + methodName, args);
+ }
+
+ static String newArray(String innerType, String arraySize) {
+ return "new " + innerType + "[" + arraySize + "]";
+ }
+
+ static String stringConcat(Object... args) {
+ return Arrays.stream(args).map(Object::toString).collect(Collectors.joining(" + "));
+ }
+
+ static String accessStaticField(Class<?> clazz, String fieldName) {
+ return className(clazz) + "." + fieldName;
+ }
+
+ static String ternaryOperator(String condition, String ifTrue, String ifFalse) {
+ return "((" + condition + ") ? (" + ifTrue + ") : (" + ifFalse + "))";
+ }
+
+ static String strLiteral() {
+ return "\"\"";
+ }
+
+ static String strLiteral(String str) {
+ return "\"" + StringEscapeUtils.escapeJava(str) + "\"";
Review comment:
we actually try to avoid to many external deps, you can use `org.apache.flink.table.utils.EncodingUtils#escapeJava`
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToStringCastRule.java
##########
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.ArrayType;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ARRAY} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class ArrayToStringCastRule
+ extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final ArrayToStringCastRule INSTANCE = new ArrayToStringCastRule();
+
+ private ArrayToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ARRAY)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((ArrayType) input).getElementType(),
+ target))
+ .build());
+ }
+
+ /* Example generated code for ARRAY<INT>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("[");
+ for (int i$2 = 0; i$2 < _myInput.size(); i$2++) {
+ if (i$2 != 0) {
+ builder$1.append(", ");
+ }
+ int element$3 = -1;
+ boolean elementIsNull$4 = _myInput.isNullAt(i$2);
+ if (!elementIsNull$4) {
+ element$3 = _myInput.getInt(i$2);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + element$3);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ }
+ builder$1.append("]");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType innerInputType = ((ArrayType) inputLogicalType).getElementType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ return new CastRuleUtils.CodeWriter()
+ .stmt(methodCall(builderTerm, "delete", 0, methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("[")))
+ .forStmt(
+ methodCall(inputTerm, "size"),
+ (indexTerm, loopBodyWriter) -> {
+ String elementTerm = newName("element");
+ String elementIsNullTerm = newName("elementIsNull");
+
+ CastCodeBlock codeBlock =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ elementTerm,
+ "false",
+ // Null check is done at the array access level
+ innerInputType.copy(false),
+ targetLogicalType);
+
+ loopBodyWriter
+ // Write the comma
+ .ifStmt(
+ indexTerm + " != 0",
+ thenBodyWriter ->
+ thenBodyWriter.stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ strLiteral(", "))))
+ // Extract element from array
+ .declPrimitiveStmt(innerInputType, elementTerm)
+ .declStmt(
+ boolean.class,
+ elementIsNullTerm,
+ methodCall(inputTerm, "isNullAt", indexTerm))
+ .ifStmt(
+ "!" + elementIsNullTerm,
+ thenBodyWriter ->
+ thenBodyWriter
+ // If element not null, extract it and
+ // execute the cast
+ .assignStmt(
+ elementTerm,
+ rowFieldReadAccess(
+ indexTerm,
+ inputTerm,
+ innerInputType))
+ .append(codeBlock)
+ .stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ codeBlock
+ .getReturnTerm())),
+ elseBodyWriter ->
+ // If element is null, just write NULL
+ elseBodyWriter.stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ strLiteral("NULL"))));
Review comment:
global constant for this? maybe in `CastRuleUtils`?
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToStringCastRule.java
##########
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.ArrayType;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ARRAY} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class ArrayToStringCastRule
+ extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final ArrayToStringCastRule INSTANCE = new ArrayToStringCastRule();
+
+ private ArrayToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ARRAY)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((ArrayType) input).getElementType(),
+ target))
+ .build());
+ }
+
+ /* Example generated code for ARRAY<INT>:
Review comment:
very good idea. make the code understandable!
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToStringCastRule.java
##########
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.ArrayType;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ARRAY} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class ArrayToStringCastRule
+ extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final ArrayToStringCastRule INSTANCE = new ArrayToStringCastRule();
+
+ private ArrayToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ARRAY)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((ArrayType) input).getElementType(),
+ target))
+ .build());
+ }
+
+ /* Example generated code for ARRAY<INT>:
+
+ isNull$0 = _myInputIsNull;
Review comment:
use `<pre>`?
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/TimestampToStringCastRule.java
##########
@@ -53,11 +53,11 @@ public String generateStringExpression(
String inputTerm,
LogicalType inputLogicalType,
LogicalType targetLogicalType) {
- String zoneId =
+ final String zoneId =
(inputLogicalType.is(LogicalTypeRoot.TIMESTAMP_WITH_LOCAL_TIME_ZONE))
? context.getSessionTimeZoneTerm()
- : className(DateTimeUtils.class) + ".UTC_ZONE";
Review comment:
Maybe use the old method for performance? I don't see a reason to declare and access a time zone for a time zone less type.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("(");
+ int f0Value$2 = -1;
+ boolean f0IsNull$3 = _myInput.isNullAt(0);
+ if (!f0IsNull$3) {
+ f0Value$2 = _myInput.getInt(0);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + f0Value$2);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(",");
+ org.apache.flink.table.data.binary.BinaryStringData f1Value$4 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean f1IsNull$5 = _myInput.isNullAt(1);
+ if (!f1IsNull$5) {
+ f1Value$4 = ((org.apache.flink.table.data.binary.BinaryStringData) _myInput.getString(1));
+ builder$1.append(f1Value$4);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(")");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final List<LogicalType> fields =
+ ((RowType) inputLogicalType)
+ .getFields().stream()
+ .map(RowType.RowField::getType)
+ .collect(Collectors.toList());
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final CastRuleUtils.CodeWriter writer =
+ new CastRuleUtils.CodeWriter()
+ .stmt(
+ methodCall(
+ builderTerm,
+ "delete",
+ 0,
+ methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("(")));
+
+ for (int i = 0; i < fields.size(); i++) {
+ final int fieldIndex = i;
+ final LogicalType fieldType = fields.get(fieldIndex);
+
+ final String fieldTerm = newName("f" + fieldIndex + "Value");
+ final String fieldIsNullTerm = newName("f" + fieldIndex + "IsNull");
+
+ final CastCodeBlock codeBlock =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ fieldTerm,
+ fieldIsNullTerm,
+ // Null check is done at the row access level
+ fieldType.copy(false),
+ targetLogicalType);
+
+ // Write the comma
+ if (fieldIndex != 0) {
+ writer.stmt(methodCall(builderTerm, "append", strLiteral(",")));
Review comment:
use a space after the comma
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToArrayCastRule.java
##########
@@ -68,63 +70,61 @@ protected String generateCodeBlockInternal(
String returnVariable,
LogicalType inputLogicalType,
LogicalType targetLogicalType) {
- LogicalType innerInputType = ((ArrayType) inputLogicalType).getElementType();
- LogicalType innerTargetType = ((ArrayType) targetLogicalType).getElementType();
-
- String innerTargetTypeTerm = arrayElementType(innerTargetType);
- String arraySize = inputTerm + ".size()";
- String objArrayTerm = newName("objArray");
-
- StringBuilder result = new StringBuilder();
- result.append(
- innerTargetTypeTerm
- + "[] "
- + objArrayTerm
- + " = new "
- + innerTargetTypeTerm
- + "["
- + arraySize
- + "];\n");
-
- result.append("for (int i = 0; i < " + arraySize + "; i++) {\n");
- CastCodeBlock codeBlock =
- CastRuleProvider.generateCodeBlock(
- context,
- rowFieldReadAccess("i", inputTerm, innerInputType),
- functionCall(inputTerm + ".isNullAt", "i"),
- innerInputType.copy(false), // Null check is done at the array access level
- innerTargetType);
-
- String innerElementCode =
- codeBlock.getCode()
- + "\n"
- + objArrayTerm
- + "[i] = "
- + codeBlock.getReturnTerm()
- + ";\n";
+ final LogicalType innerInputType = ((ArrayType) inputLogicalType).getElementType();
+ final LogicalType innerTargetType =
+ sanitizeTargetType((ArrayType) inputLogicalType, (ArrayType) targetLogicalType);
+
+ final String innerTargetTypeTerm = arrayElementType(innerTargetType);
+ final String arraySize = methodCall(inputTerm, "size");
+ final String objArrayTerm = newName("objArray");
+
+ return new CastRuleUtils.CodeWriter()
+ .declStmt(
+ innerTargetTypeTerm + "[]",
+ objArrayTerm,
+ newArray(innerTargetTypeTerm, arraySize))
+ .forStmt(
+ arraySize,
+ (index, loopWriter) -> {
+ CastCodeBlock codeBlock =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ rowFieldReadAccess(index, inputTerm, innerInputType),
+ "false",
+ // Null check is done at the array access level
+ innerInputType.copy(false),
+ innerTargetType);
+
+ if (innerTargetType.isNullable()) {
+ loopWriter.ifStmt(
+ "!" + functionCall(inputTerm + ".isNullAt", index),
+ thenWriter ->
+ thenWriter
+ .append(codeBlock)
+ .assignArrayStmt(
+ objArrayTerm,
+ index,
+ codeBlock.getReturnTerm()));
+ } else {
+ loopWriter
+ .append(codeBlock)
+ .assignArrayStmt(
+ objArrayTerm, index, codeBlock.getReturnTerm());
+ }
+ })
+ .assignStmt(returnVariable, constructorCall(GenericArrayData.class, objArrayTerm))
+ .toString();
+ }
- // Add null check if inner type is nullable
- if (innerInputType.isNullable()) {
- result.append("if (" + inputTerm + ".isNullAt(i)) {\n")
- .append(objArrayTerm + "[i] = null;\n")
- .append("} else {\n")
- .append(innerElementCode)
- .append("}\n");
- } else {
- result.append(innerElementCode);
+ private static LogicalType sanitizeTargetType(
+ ArrayType inputArrayType, ArrayType targetArrayType) {
+ LogicalType innerTargetType = targetArrayType.getElementType();
+ // TODO this seems rather a bug of the planner that generates/allows/doesn't sanitize
Review comment:
See `LogicalTypeCasts`:
```
private static boolean supportsCasting(
LogicalType sourceType, LogicalType targetType, boolean allowExplicit) {
// a NOT NULL type cannot store a NULL type
// but it might be useful to cast explicitly with knowledge about the data
if (sourceType.isNullable() && !targetType.isNullable() && !allowExplicit) {
return false;
}
// ignore nullability during compare
if (sourceType.copy(true).equals(targetType.copy(true))) {
return true;
}
```
For explicit casts, this is totally fine if the user knows the data.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
Review comment:
this is very hard to read. I know this is due to our coding format but you could introduce a little static helper method for readability in this case.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/BinaryToStringCastRule.java
##########
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+
+import java.nio.charset.StandardCharsets;
+
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.accessStaticField;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+
+/**
+ * {@link LogicalTypeFamily#BINARY_STRING} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule.
+ */
+public class BinaryToStringCastRule extends AbstractCharacterFamilyTargetRule<byte[]> {
+
+ public static final BinaryToStringCastRule INSTANCE = new BinaryToStringCastRule();
+
+ private BinaryToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .input(LogicalTypeFamily.BINARY_STRING)
+ .target(LogicalTypeFamily.CHARACTER_STRING)
+ .build());
+ }
+
+ @Override
+ public String generateStringExpression(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ return constructorCall(
Review comment:
this is not helpful for the user, we should print the byte array instead similar to `ArrayToString`.
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -60,39 +112,142 @@
.fromCase(SMALLINT(), (short) 10, 10L)
.fromCase(TINYINT(), (byte) 10, 10L),
CastTestSpecBuilder.testCastTo(STRING())
+ .fromCase(STRING(), null, null)
+ .fromCase(
+ CHAR(3), StringData.fromString("foo"), StringData.fromString("foo"))
+ .fromCase(
+ VARCHAR(5),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ VARCHAR(10),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ STRING(),
+ StringData.fromString("Apache Flink"),
+ StringData.fromString("Apache Flink"))
+ .fromCase(BOOLEAN(), true, StringData.fromString("true"))
+ .fromCase(BOOLEAN(), false, StringData.fromString("false"))
+ .fromCase(
+ BINARY(2), new byte[] {0, 1}, StringData.fromString("\u0000\u0001"))
+ .fromCase(
+ VARBINARY(3),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ VARBINARY(5),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ BYTES(),
+ new byte[] {0, 1, 2, 3, 4},
+ StringData.fromString("\u0000\u0001\u0002\u0003\u0004"))
+ .fromCase(
+ DECIMAL(4, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 4, 3),
+ StringData.fromString("9.870"))
+ .fromCase(
+ DECIMAL(5, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 5, 3),
+ StringData.fromString("9.870"))
+ .fromCase(TINYINT(), (byte) -125, StringData.fromString("-125"))
+ .fromCase(SMALLINT(), (short) 32767, StringData.fromString("32767"))
+ .fromCase(INT(), -12345678, StringData.fromString("-12345678"))
+ .fromCase(BIGINT(), 1234567891234L, StringData.fromString("1234567891234"))
+ .fromCase(FLOAT(), -123.456f, StringData.fromString("-123.456"))
+ .fromCase(DOUBLE(), 12345.678901d, StringData.fromString("12345.678901"))
+ .fromCase(
+ FLOAT(),
+ Float.MAX_VALUE,
+ StringData.fromString(String.valueOf(Float.MAX_VALUE)))
+ .fromCase(
+ DOUBLE(),
+ Double.MAX_VALUE,
+ StringData.fromString(String.valueOf(Double.MAX_VALUE)))
.fromCase(
STRING(),
StringData.fromString("Hello"),
StringData.fromString("Hello"))
+ .fromCase(TIMESTAMP(), TIMESTAMP, TIMESTAMP_STRING)
+ .fromCase(TIMESTAMP_LTZ(), CET_CONTEXT, TIMESTAMP, TIMESTAMP_STRING_CET)
+ .fromCase(DATE(), DATE, DATE_STRING)
+ .fromCase(TIME(5), TIME, TIME_STRING)
+ .fromCase(INTERVAL(YEAR()), 84, StringData.fromString("+7-00"))
+ .fromCase(INTERVAL(MONTH()), 5, StringData.fromString("+0-05"))
+ .fromCase(INTERVAL(MONTH()), 123, StringData.fromString("+10-03"))
+ .fromCase(INTERVAL(MONTH()), 12334, StringData.fromString("+1027-10"))
+ .fromCase(INTERVAL(DAY()), 10L, StringData.fromString("+0 00:00:00.010"))
+ .fromCase(
+ INTERVAL(DAY()),
+ 123456789L,
+ StringData.fromString("+1 10:17:36.789"))
+ .fromCase(
+ INTERVAL(DAY()),
+ Duration.ofHours(36).toMillis(),
+ StringData.fromString("+1 12:00:00.000"))
+ .fromCase(
+ ARRAY(INTERVAL(MONTH())),
+ new GenericArrayData(new int[] {-123, 123}),
+ StringData.fromString("[-10-03, +10-03]"))
.fromCase(
- TIMESTAMP(),
- TimestampData.fromLocalDateTime(
- LocalDateTime.parse("2021-09-24T12:34:56.123456")),
- StringData.fromString("2021-09-24 12:34:56.123456"))
- .fromCase(
- TIMESTAMP_LTZ(),
- CastRule.Context.create(
- ZoneId.of("CET"),
- Thread.currentThread().getContextClassLoader()),
- TimestampData.fromLocalDateTime(
- LocalDateTime.parse("2021-09-24T12:34:56.123456")),
- StringData.fromString("2021-09-24 14:34:56.123456")),
+ ARRAY(INT()),
+ new GenericArrayData(new int[] {-123, 456}),
+ StringData.fromString("[-123, 456]"))
+ .fromCase(
+ ARRAY(INT().nullable()),
+ new GenericArrayData(new Integer[] {null, 456}),
+ StringData.fromString("[NULL, 456]"))
+ .fromCase(
+ ARRAY(INT()),
+ new GenericArrayData(new Integer[] {}),
+ StringData.fromString("[]"))
+ .fromCase(
+ MAP(STRING(), INTERVAL(MONTH())),
+ mapData(
+ entry(StringData.fromString("a"), -123),
+ entry(StringData.fromString("b"), 123)),
+ StringData.fromString("{a=-10-03, b=+10-03}"))
+ .fromCase(
+ MAP(STRING().nullable(), INTERVAL(MONTH()).nullable()),
+ mapData(entry(null, -123), entry(StringData.fromString("b"), null)),
+ StringData.fromString("{NULL=-10-03, b=NULL}"))
+ .fromCase(
+ MAP(STRING().nullable(), INTERVAL(MONTH()).nullable()),
+ mapData(entry(null, null)),
+ StringData.fromString("{NULL=NULL}"))
+ .fromCase(
+ MAP(STRING(), INTERVAL(MONTH())),
+ mapData(),
+ StringData.fromString("{}"))
+ .fromCase(
+ ROW(FIELD("f0", INT()), FIELD("f1", STRING())),
+ GenericRowData.of(123, StringData.fromString("abc")),
+ StringData.fromString("(123,abc)"))
+ .fromCase(
+ ROW(FIELD("f0", INT().nullable()), FIELD("f1", STRING())),
+ GenericRowData.of(null, StringData.fromString("abc")),
+ StringData.fromString("(NULL,abc)"))
+ .fromCase(ROW(), GenericRowData.of(), StringData.fromString("()"))
+ .fromCase(
+ RAW(LocalDateTime.class, new LocalDateTimeSerializer()),
+ RawValueData.fromObject(
+ LocalDateTime.parse("2020-11-11T18:08:01.123")),
+ StringData.fromString("2020-11-11T18:08:01.123")),
Review comment:
please also add test for the `NULL` type, `MULTISET`, and structured types. Structured types have the speciality that they can either be backed by a POJO (in which case we call `toString` on them) or `Row` in which case I would use the `RowData` representation.
--
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] twalthr commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
twalthr commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r744501858
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -350,34 +356,63 @@ private static CastTestSpecBuilder testCastTo(DataType targetType) {
}
private CastTestSpecBuilder fromCase(DataType dataType, Object src, Object target) {
- this.inputTypes.add(dataType);
- this.inputData.add(src);
- this.expectedValues.add(target);
- this.castContexts.add(
+ return fromCase(
+ dataType,
CastRule.Context.create(
- ZoneId.systemDefault(),
Review comment:
Let's use UTC here instead. Relying on system defaults makes tests non-deterministic in different CI systems.
--
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] slinkydeveloper commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
slinkydeveloper commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r743569331
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/BinaryToStringCastRule.java
##########
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+
+import java.nio.charset.StandardCharsets;
+
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.accessStaticField;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+
+/**
+ * {@link LogicalTypeFamily#BINARY_STRING} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule.
+ */
+public class BinaryToStringCastRule extends AbstractCharacterFamilyTargetRule<byte[]> {
Review comment:
They can't be package private because `CastRuleProvider` is in rules package.
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043)
* cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051)
* e9d39e4981e0daf3aa8678d15cbe23e44cc829ac 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f 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
[GitHub] [flink] twalthr commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
twalthr commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r743701893
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("(");
+ int f0Value$2 = -1;
+ boolean f0IsNull$3 = _myInput.isNullAt(0);
+ if (!f0IsNull$3) {
+ f0Value$2 = _myInput.getInt(0);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + f0Value$2);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(",");
+ org.apache.flink.table.data.binary.BinaryStringData f1Value$4 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean f1IsNull$5 = _myInput.isNullAt(1);
+ if (!f1IsNull$5) {
+ f1Value$4 = ((org.apache.flink.table.data.binary.BinaryStringData) _myInput.getString(1));
+ builder$1.append(f1Value$4);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(")");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final List<LogicalType> fields =
+ ((RowType) inputLogicalType)
+ .getFields().stream()
+ .map(RowType.RowField::getType)
+ .collect(Collectors.toList());
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final CastRuleUtils.CodeWriter writer =
+ new CastRuleUtils.CodeWriter()
+ .stmt(
+ methodCall(
+ builderTerm,
+ "delete",
+ 0,
+ methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("(")));
+
+ for (int i = 0; i < fields.size(); i++) {
+ final int fieldIndex = i;
+ final LogicalType fieldType = fields.get(fieldIndex);
+
+ final String fieldTerm = newName("f" + fieldIndex + "Value");
+ final String fieldIsNullTerm = newName("f" + fieldIndex + "IsNull");
+
+ final CastCodeBlock codeBlock =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ fieldTerm,
+ fieldIsNullTerm,
+ // Null check is done at the row access level
+ fieldType.copy(false),
+ targetLogicalType);
+
+ // Write the comma
+ if (fieldIndex != 0) {
+ writer.stmt(methodCall(builderTerm, "append", strLiteral(",")));
Review comment:
A row is not a collection type. But let me create a bunch of issues to not forget about it.
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
}, {
"hash" : "0fe4cd3226a442010437c705a1d49b038b5f0cc9",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "0fe4cd3226a442010437c705a1d49b038b5f0cc9",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 9de90269f89a3d997b4f6083ad68dbe1570b228d Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129)
* 0fe4cd3226a442010437c705a1d49b038b5f0cc9 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "bbeab6ee08cb3e8ff732b7f604f26636842a01f9",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "bbeab6ee08cb3e8ff732b7f604f26636842a01f9",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* aabf462c9d34554539b5ca391419779d191bc0b8 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871)
* bbeab6ee08cb3e8ff732b7f604f26636842a01f9 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* aabf462c9d34554539b5ca391419779d191bc0b8 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871)
* 6bc3aa42681630f25d03acebb2ba186377ec2c22 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
[GitHub] [flink] matriv commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
matriv commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r742149962
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
Review comment:
ah, The loop is happening in `generateCodeBlockInternal`, please ignore.
--
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] matriv commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
matriv commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r742153572
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -76,7 +155,77 @@
Thread.currentThread().getContextClassLoader()),
TimestampData.fromLocalDateTime(
LocalDateTime.parse("2021-09-24T12:34:56.123456")),
- StringData.fromString("2021-09-24 14:34:56.123456")),
+ StringData.fromString("2021-09-24 14:34:56.123456"))
Review comment:
thank you!
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "bbeab6ee08cb3e8ff732b7f604f26636842a01f9",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "bbeab6ee08cb3e8ff732b7f604f26636842a01f9",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* aabf462c9d34554539b5ca391419779d191bc0b8 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871)
* bbeab6ee08cb3e8ff732b7f604f26636842a01f9 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* aabf462c9d34554539b5ca391419779d191bc0b8 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871)
<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
[GitHub] [flink] slinkydeveloper commented on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
slinkydeveloper commented on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-959568529
@matriv regarding testing the rules in `CastFunctionsITCase`, I effectively found out that the row, array and map rules doesn't work, because some validation steps before (`SqlValidatorImpl` and `LogicalTypeCasts`) thinks the cast combination is invalid. Because the goal of this PR is to simply port the logic from `ScalarOperatorGens` to the new rules, perhaps should we tackle the issue of "exposing" the rules in the context of https://issues.apache.org/jira/browse/FLINK-21456?
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123)
* 9de90269f89a3d997b4f6083ad68dbe1570b228d 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123)
* 9de90269f89a3d997b4f6083ad68dbe1570b228d Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 9de90269f89a3d997b4f6083ad68dbe1570b228d Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129)
<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
[GitHub] [flink] twalthr commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
twalthr commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r743516392
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -60,39 +112,142 @@
.fromCase(SMALLINT(), (short) 10, 10L)
.fromCase(TINYINT(), (byte) 10, 10L),
CastTestSpecBuilder.testCastTo(STRING())
+ .fromCase(STRING(), null, null)
+ .fromCase(
+ CHAR(3), StringData.fromString("foo"), StringData.fromString("foo"))
+ .fromCase(
+ VARCHAR(5),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ VARCHAR(10),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ STRING(),
+ StringData.fromString("Apache Flink"),
+ StringData.fromString("Apache Flink"))
+ .fromCase(BOOLEAN(), true, StringData.fromString("true"))
+ .fromCase(BOOLEAN(), false, StringData.fromString("false"))
+ .fromCase(
+ BINARY(2), new byte[] {0, 1}, StringData.fromString("\u0000\u0001"))
+ .fromCase(
+ VARBINARY(3),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ VARBINARY(5),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ BYTES(),
+ new byte[] {0, 1, 2, 3, 4},
+ StringData.fromString("\u0000\u0001\u0002\u0003\u0004"))
+ .fromCase(
+ DECIMAL(4, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 4, 3),
+ StringData.fromString("9.870"))
+ .fromCase(
+ DECIMAL(5, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 5, 3),
+ StringData.fromString("9.870"))
Review comment:
ignore this comment
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("(");
+ int f0Value$2 = -1;
+ boolean f0IsNull$3 = _myInput.isNullAt(0);
+ if (!f0IsNull$3) {
+ f0Value$2 = _myInput.getInt(0);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + f0Value$2);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(",");
+ org.apache.flink.table.data.binary.BinaryStringData f1Value$4 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean f1IsNull$5 = _myInput.isNullAt(1);
+ if (!f1IsNull$5) {
+ f1Value$4 = ((org.apache.flink.table.data.binary.BinaryStringData) _myInput.getString(1));
+ builder$1.append(f1Value$4);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(")");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final List<LogicalType> fields =
+ ((RowType) inputLogicalType)
+ .getFields().stream()
+ .map(RowType.RowField::getType)
+ .collect(Collectors.toList());
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final CastRuleUtils.CodeWriter writer =
+ new CastRuleUtils.CodeWriter()
+ .stmt(
+ methodCall(
+ builderTerm,
+ "delete",
+ 0,
+ methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("(")));
+
+ for (int i = 0; i < fields.size(); i++) {
+ final int fieldIndex = i;
+ final LogicalType fieldType = fields.get(fieldIndex);
+
+ final String fieldTerm = newName("f" + fieldIndex + "Value");
+ final String fieldIsNullTerm = newName("f" + fieldIndex + "IsNull");
+
+ final CastCodeBlock codeBlock =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ fieldTerm,
+ fieldIsNullTerm,
+ // Null check is done at the row access level
+ fieldType.copy(false),
+ targetLogicalType);
+
+ // Write the comma
+ if (fieldIndex != 0) {
+ writer.stmt(methodCall(builderTerm, "append", strLiteral(",")));
Review comment:
A row is not a collection type. But let me create a bunch of issues to not forget about it.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/BinaryToStringCastRule.java
##########
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+
+import java.nio.charset.StandardCharsets;
+
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.accessStaticField;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+
+/**
+ * {@link LogicalTypeFamily#BINARY_STRING} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule.
+ */
+public class BinaryToStringCastRule extends AbstractCharacterFamilyTargetRule<byte[]> {
+
+ public static final BinaryToStringCastRule INSTANCE = new BinaryToStringCastRule();
+
+ private BinaryToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .input(LogicalTypeFamily.BINARY_STRING)
+ .target(LogicalTypeFamily.CHARACTER_STRING)
+ .build());
+ }
+
+ @Override
+ public String generateStringExpression(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ return constructorCall(
Review comment:
I opened FLINK-24803
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("(");
+ int f0Value$2 = -1;
+ boolean f0IsNull$3 = _myInput.isNullAt(0);
+ if (!f0IsNull$3) {
+ f0Value$2 = _myInput.getInt(0);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + f0Value$2);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(",");
+ org.apache.flink.table.data.binary.BinaryStringData f1Value$4 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean f1IsNull$5 = _myInput.isNullAt(1);
+ if (!f1IsNull$5) {
+ f1Value$4 = ((org.apache.flink.table.data.binary.BinaryStringData) _myInput.getString(1));
+ builder$1.append(f1Value$4);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(")");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final List<LogicalType> fields =
+ ((RowType) inputLogicalType)
+ .getFields().stream()
+ .map(RowType.RowField::getType)
+ .collect(Collectors.toList());
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final CastRuleUtils.CodeWriter writer =
+ new CastRuleUtils.CodeWriter()
+ .stmt(
+ methodCall(
+ builderTerm,
+ "delete",
+ 0,
+ methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("(")));
+
+ for (int i = 0; i < fields.size(); i++) {
+ final int fieldIndex = i;
+ final LogicalType fieldType = fields.get(fieldIndex);
+
+ final String fieldTerm = newName("f" + fieldIndex + "Value");
+ final String fieldIsNullTerm = newName("f" + fieldIndex + "IsNull");
+
+ final CastCodeBlock codeBlock =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ fieldTerm,
+ fieldIsNullTerm,
+ // Null check is done at the row access level
+ fieldType.copy(false),
+ targetLogicalType);
+
+ // Write the comma
+ if (fieldIndex != 0) {
+ writer.stmt(methodCall(builderTerm, "append", strLiteral(",")));
Review comment:
I opened FLINK-24802.
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* e9e7c13e49a07f2e8a2185db90ad4d95741beb87 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895)
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d 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
[GitHub] [flink] matriv commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
matriv commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r741950725
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/AbstractCodeGeneratorCastRule.java
##########
@@ -148,9 +147,10 @@ protected AbstractCodeGeneratorCastRule(CastRulePredicate predicate) {
classCode)
.getConstructors()[0]
.newInstance(constructorArgs);
- } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
+ } catch (Throwable e) {
Review comment:
If possible, would be better to keep listing all possible exceptions.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/AbstractNullAwareCodeGeneratorCastRule.java
##########
@@ -57,41 +57,37 @@ public CastCodeBlock generateCodeBlock(
String inputIsNullTerm,
LogicalType inputType,
LogicalType targetType) {
- StringBuilder resultCode = new StringBuilder();
+ CastRuleUtils.CodeWriter writer = new CastRuleUtils.CodeWriter();
Review comment:
could also be final
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -60,6 +94,51 @@
.fromCase(SMALLINT(), (short) 10, 10L)
.fromCase(TINYINT(), (byte) 10, 10L),
CastTestSpecBuilder.testCastTo(STRING())
+ .fromCase(STRING(), null, null)
+ .fromCase(
+ CHAR(3), StringData.fromString("foo"), StringData.fromString("foo"))
+ .fromCase(
+ VARCHAR(5),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ VARCHAR(10),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ STRING(),
+ StringData.fromString("Apache Flink"),
+ StringData.fromString("Apache Flink"))
+ .fromCase(STRING(), null, null)
+ .fromCase(BOOLEAN(), true, StringData.fromString("true"))
Review comment:
since this is now unit testing, maybe we could test both boolean values.
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -76,7 +155,77 @@
Thread.currentThread().getContextClassLoader()),
TimestampData.fromLocalDateTime(
LocalDateTime.parse("2021-09-24T12:34:56.123456")),
- StringData.fromString("2021-09-24 14:34:56.123456")),
+ StringData.fromString("2021-09-24 14:34:56.123456"))
Review comment:
Maybe you could extract those dates/time/timestamps to static vars, similar to `CastFunctionITCase` so we can always have those default tests, and then use some other date/time values if needed to test some other cases, or edge cases.
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -60,6 +94,51 @@
.fromCase(SMALLINT(), (short) 10, 10L)
.fromCase(TINYINT(), (byte) 10, 10L),
CastTestSpecBuilder.testCastTo(STRING())
+ .fromCase(STRING(), null, null)
+ .fromCase(
+ CHAR(3), StringData.fromString("foo"), StringData.fromString("foo"))
+ .fromCase(
+ VARCHAR(5),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ VARCHAR(10),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ STRING(),
+ StringData.fromString("Apache Flink"),
+ StringData.fromString("Apache Flink"))
+ .fromCase(STRING(), null, null)
Review comment:
this is duplicate
##########
File path: flink-table/flink-table-planner/src/test/resources/log4j2-test.properties
##########
@@ -26,3 +26,9 @@ appender.testlogger.type = CONSOLE
appender.testlogger.target = SYSTEM_ERR
appender.testlogger.layout.type = PatternLayout
appender.testlogger.layout.pattern = %-4r [%t] %-5p %c %x - %m%n
+
+# Uncomment to enable codegen logging
Review comment:
nice!
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -143,9 +308,20 @@ public void run() throws Exception {
this.castContext,
this.inputType.getLogicalType(),
this.targetType.getLogicalType());
- assertNotNull(executor);
+ assertNotNull(
+ executor,
+ "Cannot resolve an executor for input "
+ + this.inputType
+ + " and target "
+ + this.targetType);
assertEquals(this.expectedData, executor.cast(this.inputData));
+
+ // Run twice to make sure rules are reusable without causing issues
+ assertEquals(
Review comment:
nice!
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/MapToStringCastRule.java
##########
@@ -0,0 +1,189 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.MapType;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#MAP} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class MapToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final MapToStringCastRule INSTANCE = new MapToStringCastRule();
+
+ private MapToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.MAP)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((MapType) input).getKeyType(), target)
+ && CastRuleProvider.exists(
+ ((MapType) input).getValueType(), target))
+ .build());
+ }
+
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType keyType = ((MapType) inputLogicalType).getKeyType();
+ final LogicalType valueType = ((MapType) inputLogicalType).getValueType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final String keyArrayTerm = newName("keys");
+ final String valueArrayTerm = newName("values");
+
+ return new CastRuleUtils.CodeWriter()
Review comment:
Could you maybe add a sample generated code for this?
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ @Override
+ protected String generateCodeBlockInternal(
Review comment:
Also here, some generated code example would be nice.
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -60,6 +94,51 @@
.fromCase(SMALLINT(), (short) 10, 10L)
.fromCase(TINYINT(), (byte) 10, 10L),
CastTestSpecBuilder.testCastTo(STRING())
+ .fromCase(STRING(), null, null)
+ .fromCase(
+ CHAR(3), StringData.fromString("foo"), StringData.fromString("foo"))
+ .fromCase(
+ VARCHAR(5),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ VARCHAR(10),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ STRING(),
+ StringData.fromString("Apache Flink"),
+ StringData.fromString("Apache Flink"))
+ .fromCase(STRING(), null, null)
+ .fromCase(BOOLEAN(), true, StringData.fromString("true"))
+ .fromCase(
+ BINARY(2), new byte[] {0, 1}, StringData.fromString("\u0000\u0001"))
+ .fromCase(
+ VARBINARY(3),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ VARBINARY(5),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ BYTES(),
+ new byte[] {0, 1, 2, 3, 4},
+ StringData.fromString("\u0000\u0001\u0002\u0003\u0004"))
+ .fromCase(
+ DECIMAL(4, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 4, 3),
+ StringData.fromString("9.870"))
+ .fromCase(
+ DECIMAL(5, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 5, 3),
+ StringData.fromString("9.870"))
+ .fromCase(TINYINT(), (byte) -125, StringData.fromString("-125"))
+ .fromCase(SMALLINT(), (short) 32767, StringData.fromString("32767"))
+ .fromCase(INT(), -12345678, StringData.fromString("-12345678"))
+ .fromCase(BIGINT(), 1234567891234L, StringData.fromString("1234567891234"))
+ .fromCase(FLOAT(), -123.456f, StringData.fromString("-123.456"))
Review comment:
For float and double maybe check some longer values that will end up with the scientific representation.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToStringCastRule.java
##########
@@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.ArrayType;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ARRAY} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class ArrayToStringCastRule
+ extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final ArrayToStringCastRule INSTANCE = new ArrayToStringCastRule();
+
+ private ArrayToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ARRAY)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((ArrayType) input).getElementType(),
+ target))
+ .build());
+ }
+
+ @Override
+ protected String generateCodeBlockInternal(
Review comment:
Also a sample generated code if you could please.
##########
File path: flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/calls/ScalarOperatorGens.scala
##########
@@ -967,10 +969,20 @@ object ScalarOperatorGens {
inputType,
targetType
)
+
+ val castCode = if (castCodeBlock.getCode.isEmpty) {
+ ""
+ } else {
+ s"\n" +
Review comment:
Maybe worths keeping the comments anyway, to be even more clear that there is no code generated?
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToStringCastRule.java
##########
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.ArrayType;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ARRAY} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class ArrayToStringCastRule
+ extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final ArrayToStringCastRule INSTANCE = new ArrayToStringCastRule();
+
+ private ArrayToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ARRAY)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((ArrayType) input).getElementType(),
+ target))
+ .build());
+ }
+
+ /* Example generated code for ARRAY<INT>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("[");
+ for (int i$2 = 0; i$2 < _myInput.size(); i$2++) {
+ if (i$2 != 0) {
+ builder$1.append(", ");
+ }
+ int element$3 = -1;
+ boolean elementIsNull$4 = _myInput.isNullAt(i$2);
+ if (!elementIsNull$4) {
+ element$3 = _myInput.getInt(i$2);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + element$3);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ }
+ builder$1.append("]");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType innerInputType = ((ArrayType) inputLogicalType).getElementType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ return new CastRuleUtils.CodeWriter()
+ .stmt(methodCall(builderTerm, "delete", 0, methodCall(builderTerm, "length")))
Review comment:
`setLength(0)` could be used instead.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToStringCastRule.java
##########
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.ArrayType;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ARRAY} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class ArrayToStringCastRule
+ extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final ArrayToStringCastRule INSTANCE = new ArrayToStringCastRule();
+
+ private ArrayToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ARRAY)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((ArrayType) input).getElementType(),
+ target))
+ .build());
+ }
+
+ /* Example generated code for ARRAY<INT>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("[");
+ for (int i$2 = 0; i$2 < _myInput.size(); i$2++) {
+ if (i$2 != 0) {
+ builder$1.append(", ");
+ }
+ int element$3 = -1;
+ boolean elementIsNull$4 = _myInput.isNullAt(i$2);
+ if (!elementIsNull$4) {
+ element$3 = _myInput.getInt(i$2);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + element$3);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ }
+ builder$1.append("]");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType innerInputType = ((ArrayType) inputLogicalType).getElementType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ return new CastRuleUtils.CodeWriter()
+ .stmt(methodCall(builderTerm, "delete", 0, methodCall(builderTerm, "length")))
Review comment:
`setLength(0)` could be used instead. I see that delete makes an array copy, where the setLength(0) just "truncates" the buffer.
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -60,6 +94,51 @@
.fromCase(SMALLINT(), (short) 10, 10L)
.fromCase(TINYINT(), (byte) 10, 10L),
CastTestSpecBuilder.testCastTo(STRING())
+ .fromCase(STRING(), null, null)
+ .fromCase(
+ CHAR(3), StringData.fromString("foo"), StringData.fromString("foo"))
+ .fromCase(
+ VARCHAR(5),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ VARCHAR(10),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ STRING(),
+ StringData.fromString("Apache Flink"),
+ StringData.fromString("Apache Flink"))
+ .fromCase(STRING(), null, null)
+ .fromCase(BOOLEAN(), true, StringData.fromString("true"))
+ .fromCase(
+ BINARY(2), new byte[] {0, 1}, StringData.fromString("\u0000\u0001"))
+ .fromCase(
+ VARBINARY(3),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ VARBINARY(5),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ BYTES(),
+ new byte[] {0, 1, 2, 3, 4},
+ StringData.fromString("\u0000\u0001\u0002\u0003\u0004"))
+ .fromCase(
+ DECIMAL(4, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 4, 3),
+ StringData.fromString("9.870"))
+ .fromCase(
+ DECIMAL(5, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 5, 3),
+ StringData.fromString("9.870"))
+ .fromCase(TINYINT(), (byte) -125, StringData.fromString("-125"))
+ .fromCase(SMALLINT(), (short) 32767, StringData.fromString("32767"))
+ .fromCase(INT(), -12345678, StringData.fromString("-12345678"))
+ .fromCase(BIGINT(), 1234567891234L, StringData.fromString("1234567891234"))
+ .fromCase(FLOAT(), -123.456f, StringData.fromString("-123.456"))
Review comment:
not addressed ? or I'm missing something?
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
Review comment:
Is there something missing here? I don't see a for loop.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
Review comment:
ah, The loop is happening in `generateCodeBlockInternal`, please ignore.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/MapToStringCastRule.java
##########
@@ -0,0 +1,227 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.MapType;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#MAP} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class MapToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final MapToStringCastRule INSTANCE = new MapToStringCastRule();
+
+ private MapToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.MAP)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((MapType) input).getKeyType(), target)
+ && CastRuleProvider.exists(
+ ((MapType) input).getValueType(), target))
+ .build());
+ }
+
+ /* Example generated code for MAP<STRING, INTERVAL MONTH>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ org.apache.flink.table.data.ArrayData keys$2 = _myInput.keyArray();
+ org.apache.flink.table.data.ArrayData values$3 = _myInput.valueArray();
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("{");
+ for (int i$4 = 0; i$4 < _myInput.size(); i$4++) {
+ if (i$4 != 0) {
+ builder$1.append(", ");
+ }
+ org.apache.flink.table.data.binary.BinaryStringData key$5 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean keyIsNull$6 = keys$2.isNullAt(i$4);
+ int value$7 = -1;
+ boolean valueIsNull$8 = values$3.isNullAt(i$4);
+ if (!keyIsNull$6) {
+ key$5 = ((org.apache.flink.table.data.binary.BinaryStringData) keys$2.getString(i$4));
+ builder$1.append(key$5);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append("=");
+ if (!valueIsNull$8) {
+ value$7 = values$3.getInt(i$4);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString(org.apache.flink.table.utils.DateTimeUtils.intervalYearMonthToString(value$7));
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ }
+ builder$1.append("}");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType keyType = ((MapType) inputLogicalType).getKeyType();
+ final LogicalType valueType = ((MapType) inputLogicalType).getValueType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final String keyArrayTerm = newName("keys");
+ final String valueArrayTerm = newName("values");
+
+ return new CastRuleUtils.CodeWriter()
+ .declStmt(ArrayData.class, keyArrayTerm, methodCall(inputTerm, "keyArray"))
+ .declStmt(ArrayData.class, valueArrayTerm, methodCall(inputTerm, "valueArray"))
+ .stmt(methodCall(builderTerm, "delete", 0, methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("{")))
+ .forStmt(
+ methodCall(inputTerm, "size"),
+ (indexTerm, loopBodyWriter) -> {
+ String keyTerm = newName("key");
+ String keyIsNullTerm = newName("keyIsNull");
+ String valueTerm = newName("value");
+ String valueIsNullTerm = newName("valueIsNull");
+
+ CastCodeBlock keyCast =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ keyTerm,
+ keyIsNullTerm,
+ // Null check is done at the key array access level
+ keyType.copy(false),
+ targetLogicalType);
+ CastCodeBlock valueCast =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ valueTerm,
+ valueIsNullTerm,
+ // Null check is done at the value array access level
+ valueType.copy(false),
+ targetLogicalType);
+
+ loopBodyWriter
+ // Write the comma
+ .ifStmt(
+ indexTerm + " != 0",
+ thenBodyWriter ->
+ thenBodyWriter.stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ strLiteral(", "))))
+ // Declare key and values variables
+ .declPrimitiveStmt(keyType, keyTerm)
+ .declStmt(
+ boolean.class,
+ keyIsNullTerm,
+ methodCall(keyArrayTerm, "isNullAt", indexTerm))
+ .declPrimitiveStmt(valueType, valueTerm)
+ .declStmt(
+ boolean.class,
+ valueIsNullTerm,
+ methodCall(valueArrayTerm, "isNullAt", indexTerm))
+ // Execute casting if inner key/value not null
+ .ifStmt(
+ "!" + keyIsNullTerm,
+ thenBodyWriter ->
+ thenBodyWriter
+ // If key not null, extract it and
+ // execute the cast
+ .assignStmt(
+ keyTerm,
+ rowFieldReadAccess(
+ indexTerm,
+ keyArrayTerm,
+ keyType))
+ .append(keyCast)
+ .stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ keyCast
+ .getReturnTerm())),
+ elseBodyWriter ->
+ elseBodyWriter.stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ strLiteral("NULL"))))
Review comment:
Could you please extract all usages `NULL`, `<NULL>`, etc. to constants in the superclass?
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -76,7 +155,77 @@
Thread.currentThread().getContextClassLoader()),
TimestampData.fromLocalDateTime(
LocalDateTime.parse("2021-09-24T12:34:56.123456")),
- StringData.fromString("2021-09-24 14:34:56.123456")),
+ StringData.fromString("2021-09-24 14:34:56.123456"))
Review comment:
thank you!
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/AbstractCodeGeneratorCastRule.java
##########
@@ -148,9 +147,10 @@ protected AbstractCodeGeneratorCastRule(CastRulePredicate predicate) {
classCode)
.getConstructors()[0]
.newInstance(constructorArgs);
- } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
+ } catch (Throwable e) {
Review comment:
If possible, would be better to keep listing all possible exceptions.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/AbstractNullAwareCodeGeneratorCastRule.java
##########
@@ -57,41 +57,37 @@ public CastCodeBlock generateCodeBlock(
String inputIsNullTerm,
LogicalType inputType,
LogicalType targetType) {
- StringBuilder resultCode = new StringBuilder();
+ CastRuleUtils.CodeWriter writer = new CastRuleUtils.CodeWriter();
Review comment:
could also be final
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -60,6 +94,51 @@
.fromCase(SMALLINT(), (short) 10, 10L)
.fromCase(TINYINT(), (byte) 10, 10L),
CastTestSpecBuilder.testCastTo(STRING())
+ .fromCase(STRING(), null, null)
+ .fromCase(
+ CHAR(3), StringData.fromString("foo"), StringData.fromString("foo"))
+ .fromCase(
+ VARCHAR(5),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ VARCHAR(10),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ STRING(),
+ StringData.fromString("Apache Flink"),
+ StringData.fromString("Apache Flink"))
+ .fromCase(STRING(), null, null)
+ .fromCase(BOOLEAN(), true, StringData.fromString("true"))
Review comment:
since this is now unit testing, maybe we could test both boolean values.
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -76,7 +155,77 @@
Thread.currentThread().getContextClassLoader()),
TimestampData.fromLocalDateTime(
LocalDateTime.parse("2021-09-24T12:34:56.123456")),
- StringData.fromString("2021-09-24 14:34:56.123456")),
+ StringData.fromString("2021-09-24 14:34:56.123456"))
Review comment:
Maybe you could extract those dates/time/timestamps to static vars, similar to `CastFunctionITCase` so we can always have those default tests, and then use some other date/time values if needed to test some other cases, or edge cases.
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -60,6 +94,51 @@
.fromCase(SMALLINT(), (short) 10, 10L)
.fromCase(TINYINT(), (byte) 10, 10L),
CastTestSpecBuilder.testCastTo(STRING())
+ .fromCase(STRING(), null, null)
+ .fromCase(
+ CHAR(3), StringData.fromString("foo"), StringData.fromString("foo"))
+ .fromCase(
+ VARCHAR(5),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ VARCHAR(10),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ STRING(),
+ StringData.fromString("Apache Flink"),
+ StringData.fromString("Apache Flink"))
+ .fromCase(STRING(), null, null)
Review comment:
this is duplicate
##########
File path: flink-table/flink-table-planner/src/test/resources/log4j2-test.properties
##########
@@ -26,3 +26,9 @@ appender.testlogger.type = CONSOLE
appender.testlogger.target = SYSTEM_ERR
appender.testlogger.layout.type = PatternLayout
appender.testlogger.layout.pattern = %-4r [%t] %-5p %c %x - %m%n
+
+# Uncomment to enable codegen logging
Review comment:
nice!
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -143,9 +308,20 @@ public void run() throws Exception {
this.castContext,
this.inputType.getLogicalType(),
this.targetType.getLogicalType());
- assertNotNull(executor);
+ assertNotNull(
+ executor,
+ "Cannot resolve an executor for input "
+ + this.inputType
+ + " and target "
+ + this.targetType);
assertEquals(this.expectedData, executor.cast(this.inputData));
+
+ // Run twice to make sure rules are reusable without causing issues
+ assertEquals(
Review comment:
nice!
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/MapToStringCastRule.java
##########
@@ -0,0 +1,189 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.MapType;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#MAP} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class MapToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final MapToStringCastRule INSTANCE = new MapToStringCastRule();
+
+ private MapToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.MAP)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((MapType) input).getKeyType(), target)
+ && CastRuleProvider.exists(
+ ((MapType) input).getValueType(), target))
+ .build());
+ }
+
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType keyType = ((MapType) inputLogicalType).getKeyType();
+ final LogicalType valueType = ((MapType) inputLogicalType).getValueType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final String keyArrayTerm = newName("keys");
+ final String valueArrayTerm = newName("values");
+
+ return new CastRuleUtils.CodeWriter()
Review comment:
Could you maybe add a sample generated code for this?
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ @Override
+ protected String generateCodeBlockInternal(
Review comment:
Also here, some generated code example would be nice.
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -60,6 +94,51 @@
.fromCase(SMALLINT(), (short) 10, 10L)
.fromCase(TINYINT(), (byte) 10, 10L),
CastTestSpecBuilder.testCastTo(STRING())
+ .fromCase(STRING(), null, null)
+ .fromCase(
+ CHAR(3), StringData.fromString("foo"), StringData.fromString("foo"))
+ .fromCase(
+ VARCHAR(5),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ VARCHAR(10),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ STRING(),
+ StringData.fromString("Apache Flink"),
+ StringData.fromString("Apache Flink"))
+ .fromCase(STRING(), null, null)
+ .fromCase(BOOLEAN(), true, StringData.fromString("true"))
+ .fromCase(
+ BINARY(2), new byte[] {0, 1}, StringData.fromString("\u0000\u0001"))
+ .fromCase(
+ VARBINARY(3),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ VARBINARY(5),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ BYTES(),
+ new byte[] {0, 1, 2, 3, 4},
+ StringData.fromString("\u0000\u0001\u0002\u0003\u0004"))
+ .fromCase(
+ DECIMAL(4, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 4, 3),
+ StringData.fromString("9.870"))
+ .fromCase(
+ DECIMAL(5, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 5, 3),
+ StringData.fromString("9.870"))
+ .fromCase(TINYINT(), (byte) -125, StringData.fromString("-125"))
+ .fromCase(SMALLINT(), (short) 32767, StringData.fromString("32767"))
+ .fromCase(INT(), -12345678, StringData.fromString("-12345678"))
+ .fromCase(BIGINT(), 1234567891234L, StringData.fromString("1234567891234"))
+ .fromCase(FLOAT(), -123.456f, StringData.fromString("-123.456"))
Review comment:
For float and double maybe check some longer values that will end up with the scientific representation.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToStringCastRule.java
##########
@@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.ArrayType;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ARRAY} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class ArrayToStringCastRule
+ extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final ArrayToStringCastRule INSTANCE = new ArrayToStringCastRule();
+
+ private ArrayToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ARRAY)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((ArrayType) input).getElementType(),
+ target))
+ .build());
+ }
+
+ @Override
+ protected String generateCodeBlockInternal(
Review comment:
Also a sample generated code if you could please.
##########
File path: flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/calls/ScalarOperatorGens.scala
##########
@@ -967,10 +969,20 @@ object ScalarOperatorGens {
inputType,
targetType
)
+
+ val castCode = if (castCodeBlock.getCode.isEmpty) {
+ ""
+ } else {
+ s"\n" +
Review comment:
Maybe worths keeping the comments anyway, to be even more clear that there is no code generated?
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToStringCastRule.java
##########
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.ArrayType;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ARRAY} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class ArrayToStringCastRule
+ extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final ArrayToStringCastRule INSTANCE = new ArrayToStringCastRule();
+
+ private ArrayToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ARRAY)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((ArrayType) input).getElementType(),
+ target))
+ .build());
+ }
+
+ /* Example generated code for ARRAY<INT>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("[");
+ for (int i$2 = 0; i$2 < _myInput.size(); i$2++) {
+ if (i$2 != 0) {
+ builder$1.append(", ");
+ }
+ int element$3 = -1;
+ boolean elementIsNull$4 = _myInput.isNullAt(i$2);
+ if (!elementIsNull$4) {
+ element$3 = _myInput.getInt(i$2);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + element$3);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ }
+ builder$1.append("]");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType innerInputType = ((ArrayType) inputLogicalType).getElementType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ return new CastRuleUtils.CodeWriter()
+ .stmt(methodCall(builderTerm, "delete", 0, methodCall(builderTerm, "length")))
Review comment:
`setLength(0)` could be used instead.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToStringCastRule.java
##########
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.ArrayType;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ARRAY} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class ArrayToStringCastRule
+ extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final ArrayToStringCastRule INSTANCE = new ArrayToStringCastRule();
+
+ private ArrayToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ARRAY)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((ArrayType) input).getElementType(),
+ target))
+ .build());
+ }
+
+ /* Example generated code for ARRAY<INT>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("[");
+ for (int i$2 = 0; i$2 < _myInput.size(); i$2++) {
+ if (i$2 != 0) {
+ builder$1.append(", ");
+ }
+ int element$3 = -1;
+ boolean elementIsNull$4 = _myInput.isNullAt(i$2);
+ if (!elementIsNull$4) {
+ element$3 = _myInput.getInt(i$2);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + element$3);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ }
+ builder$1.append("]");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType innerInputType = ((ArrayType) inputLogicalType).getElementType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ return new CastRuleUtils.CodeWriter()
+ .stmt(methodCall(builderTerm, "delete", 0, methodCall(builderTerm, "length")))
Review comment:
`setLength(0)` could be used instead. I see that delete makes an array copy, where the setLength(0) just "truncates" the buffer.
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -60,6 +94,51 @@
.fromCase(SMALLINT(), (short) 10, 10L)
.fromCase(TINYINT(), (byte) 10, 10L),
CastTestSpecBuilder.testCastTo(STRING())
+ .fromCase(STRING(), null, null)
+ .fromCase(
+ CHAR(3), StringData.fromString("foo"), StringData.fromString("foo"))
+ .fromCase(
+ VARCHAR(5),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ VARCHAR(10),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ STRING(),
+ StringData.fromString("Apache Flink"),
+ StringData.fromString("Apache Flink"))
+ .fromCase(STRING(), null, null)
+ .fromCase(BOOLEAN(), true, StringData.fromString("true"))
+ .fromCase(
+ BINARY(2), new byte[] {0, 1}, StringData.fromString("\u0000\u0001"))
+ .fromCase(
+ VARBINARY(3),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ VARBINARY(5),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ BYTES(),
+ new byte[] {0, 1, 2, 3, 4},
+ StringData.fromString("\u0000\u0001\u0002\u0003\u0004"))
+ .fromCase(
+ DECIMAL(4, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 4, 3),
+ StringData.fromString("9.870"))
+ .fromCase(
+ DECIMAL(5, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 5, 3),
+ StringData.fromString("9.870"))
+ .fromCase(TINYINT(), (byte) -125, StringData.fromString("-125"))
+ .fromCase(SMALLINT(), (short) 32767, StringData.fromString("32767"))
+ .fromCase(INT(), -12345678, StringData.fromString("-12345678"))
+ .fromCase(BIGINT(), 1234567891234L, StringData.fromString("1234567891234"))
+ .fromCase(FLOAT(), -123.456f, StringData.fromString("-123.456"))
Review comment:
not addressed ? or I'm missing something?
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
Review comment:
Is there something missing here? I don't see a for loop.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
Review comment:
ah, The loop is happening in `generateCodeBlockInternal`, please ignore.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/MapToStringCastRule.java
##########
@@ -0,0 +1,227 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.MapType;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#MAP} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class MapToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final MapToStringCastRule INSTANCE = new MapToStringCastRule();
+
+ private MapToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.MAP)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((MapType) input).getKeyType(), target)
+ && CastRuleProvider.exists(
+ ((MapType) input).getValueType(), target))
+ .build());
+ }
+
+ /* Example generated code for MAP<STRING, INTERVAL MONTH>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ org.apache.flink.table.data.ArrayData keys$2 = _myInput.keyArray();
+ org.apache.flink.table.data.ArrayData values$3 = _myInput.valueArray();
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("{");
+ for (int i$4 = 0; i$4 < _myInput.size(); i$4++) {
+ if (i$4 != 0) {
+ builder$1.append(", ");
+ }
+ org.apache.flink.table.data.binary.BinaryStringData key$5 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean keyIsNull$6 = keys$2.isNullAt(i$4);
+ int value$7 = -1;
+ boolean valueIsNull$8 = values$3.isNullAt(i$4);
+ if (!keyIsNull$6) {
+ key$5 = ((org.apache.flink.table.data.binary.BinaryStringData) keys$2.getString(i$4));
+ builder$1.append(key$5);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append("=");
+ if (!valueIsNull$8) {
+ value$7 = values$3.getInt(i$4);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString(org.apache.flink.table.utils.DateTimeUtils.intervalYearMonthToString(value$7));
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ }
+ builder$1.append("}");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType keyType = ((MapType) inputLogicalType).getKeyType();
+ final LogicalType valueType = ((MapType) inputLogicalType).getValueType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final String keyArrayTerm = newName("keys");
+ final String valueArrayTerm = newName("values");
+
+ return new CastRuleUtils.CodeWriter()
+ .declStmt(ArrayData.class, keyArrayTerm, methodCall(inputTerm, "keyArray"))
+ .declStmt(ArrayData.class, valueArrayTerm, methodCall(inputTerm, "valueArray"))
+ .stmt(methodCall(builderTerm, "delete", 0, methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("{")))
+ .forStmt(
+ methodCall(inputTerm, "size"),
+ (indexTerm, loopBodyWriter) -> {
+ String keyTerm = newName("key");
+ String keyIsNullTerm = newName("keyIsNull");
+ String valueTerm = newName("value");
+ String valueIsNullTerm = newName("valueIsNull");
+
+ CastCodeBlock keyCast =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ keyTerm,
+ keyIsNullTerm,
+ // Null check is done at the key array access level
+ keyType.copy(false),
+ targetLogicalType);
+ CastCodeBlock valueCast =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ valueTerm,
+ valueIsNullTerm,
+ // Null check is done at the value array access level
+ valueType.copy(false),
+ targetLogicalType);
+
+ loopBodyWriter
+ // Write the comma
+ .ifStmt(
+ indexTerm + " != 0",
+ thenBodyWriter ->
+ thenBodyWriter.stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ strLiteral(", "))))
+ // Declare key and values variables
+ .declPrimitiveStmt(keyType, keyTerm)
+ .declStmt(
+ boolean.class,
+ keyIsNullTerm,
+ methodCall(keyArrayTerm, "isNullAt", indexTerm))
+ .declPrimitiveStmt(valueType, valueTerm)
+ .declStmt(
+ boolean.class,
+ valueIsNullTerm,
+ methodCall(valueArrayTerm, "isNullAt", indexTerm))
+ // Execute casting if inner key/value not null
+ .ifStmt(
+ "!" + keyIsNullTerm,
+ thenBodyWriter ->
+ thenBodyWriter
+ // If key not null, extract it and
+ // execute the cast
+ .assignStmt(
+ keyTerm,
+ rowFieldReadAccess(
+ indexTerm,
+ keyArrayTerm,
+ keyType))
+ .append(keyCast)
+ .stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ keyCast
+ .getReturnTerm())),
+ elseBodyWriter ->
+ elseBodyWriter.stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ strLiteral("NULL"))))
Review comment:
Could you please extract all usages `NULL`, `<NULL>`, etc. to constants in the superclass?
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -76,7 +155,77 @@
Thread.currentThread().getContextClassLoader()),
TimestampData.fromLocalDateTime(
LocalDateTime.parse("2021-09-24T12:34:56.123456")),
- StringData.fromString("2021-09-24 14:34:56.123456")),
+ StringData.fromString("2021-09-24 14:34:56.123456"))
Review comment:
thank you!
--
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] slinkydeveloper commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
slinkydeveloper commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r742034054
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/AbstractCodeGeneratorCastRule.java
##########
@@ -148,9 +147,10 @@ protected AbstractCodeGeneratorCastRule(CastRulePredicate predicate) {
classCode)
.getConstructors()[0]
.newInstance(constructorArgs);
- } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
+ } catch (Throwable e) {
Review comment:
IIRC I converted to `Throwable` to catch also `Error`s and not just `Exception`. I can revert if you want, but I think it's better to keep it this way because invoking this constructor should never fail, for any reason, and we need to catch it immediately if it fails in order to wrap it with the code associated.
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -76,7 +155,77 @@
Thread.currentThread().getContextClassLoader()),
TimestampData.fromLocalDateTime(
LocalDateTime.parse("2021-09-24T12:34:56.123456")),
- StringData.fromString("2021-09-24 14:34:56.123456")),
+ StringData.fromString("2021-09-24 14:34:56.123456"))
Review comment:
Check now
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
Review comment:
There isn't any loop, because the row has a type defined arity where in each index you already know what "extractor" you need to get the field. The code generator loops through each field and generates a cast for each field.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/MapToStringCastRule.java
##########
@@ -0,0 +1,227 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.MapType;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#MAP} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class MapToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final MapToStringCastRule INSTANCE = new MapToStringCastRule();
+
+ private MapToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.MAP)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((MapType) input).getKeyType(), target)
+ && CastRuleProvider.exists(
+ ((MapType) input).getValueType(), target))
+ .build());
+ }
+
+ /* Example generated code for MAP<STRING, INTERVAL MONTH>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ org.apache.flink.table.data.ArrayData keys$2 = _myInput.keyArray();
+ org.apache.flink.table.data.ArrayData values$3 = _myInput.valueArray();
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("{");
+ for (int i$4 = 0; i$4 < _myInput.size(); i$4++) {
+ if (i$4 != 0) {
+ builder$1.append(", ");
+ }
+ org.apache.flink.table.data.binary.BinaryStringData key$5 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean keyIsNull$6 = keys$2.isNullAt(i$4);
+ int value$7 = -1;
+ boolean valueIsNull$8 = values$3.isNullAt(i$4);
+ if (!keyIsNull$6) {
+ key$5 = ((org.apache.flink.table.data.binary.BinaryStringData) keys$2.getString(i$4));
+ builder$1.append(key$5);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append("=");
+ if (!valueIsNull$8) {
+ value$7 = values$3.getInt(i$4);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString(org.apache.flink.table.utils.DateTimeUtils.intervalYearMonthToString(value$7));
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ }
+ builder$1.append("}");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType keyType = ((MapType) inputLogicalType).getKeyType();
+ final LogicalType valueType = ((MapType) inputLogicalType).getValueType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final String keyArrayTerm = newName("keys");
+ final String valueArrayTerm = newName("values");
+
+ return new CastRuleUtils.CodeWriter()
+ .declStmt(ArrayData.class, keyArrayTerm, methodCall(inputTerm, "keyArray"))
+ .declStmt(ArrayData.class, valueArrayTerm, methodCall(inputTerm, "valueArray"))
+ .stmt(methodCall(builderTerm, "delete", 0, methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("{")))
+ .forStmt(
+ methodCall(inputTerm, "size"),
+ (indexTerm, loopBodyWriter) -> {
+ String keyTerm = newName("key");
+ String keyIsNullTerm = newName("keyIsNull");
+ String valueTerm = newName("value");
+ String valueIsNullTerm = newName("valueIsNull");
+
+ CastCodeBlock keyCast =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ keyTerm,
+ keyIsNullTerm,
+ // Null check is done at the key array access level
+ keyType.copy(false),
+ targetLogicalType);
+ CastCodeBlock valueCast =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ valueTerm,
+ valueIsNullTerm,
+ // Null check is done at the value array access level
+ valueType.copy(false),
+ targetLogicalType);
+
+ loopBodyWriter
+ // Write the comma
+ .ifStmt(
+ indexTerm + " != 0",
+ thenBodyWriter ->
+ thenBodyWriter.stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ strLiteral(", "))))
+ // Declare key and values variables
+ .declPrimitiveStmt(keyType, keyTerm)
+ .declStmt(
+ boolean.class,
+ keyIsNullTerm,
+ methodCall(keyArrayTerm, "isNullAt", indexTerm))
+ .declPrimitiveStmt(valueType, valueTerm)
+ .declStmt(
+ boolean.class,
+ valueIsNullTerm,
+ methodCall(valueArrayTerm, "isNullAt", indexTerm))
+ // Execute casting if inner key/value not null
+ .ifStmt(
+ "!" + keyIsNullTerm,
+ thenBodyWriter ->
+ thenBodyWriter
+ // If key not null, extract it and
+ // execute the cast
+ .assignStmt(
+ keyTerm,
+ rowFieldReadAccess(
+ indexTerm,
+ keyArrayTerm,
+ keyType))
+ .append(keyCast)
+ .stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ keyCast
+ .getReturnTerm())),
+ elseBodyWriter ->
+ elseBodyWriter.stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ strLiteral("NULL"))))
Review comment:
This PR doesn't deal with `<NULL>`, because that's user facing (see `PrintUtils#NULL_COLUMN`), the next PR (for FLINK-24685) will deal with it.
For `NULL`, I've added a constant in `PrintUtils`
--
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] matriv commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
matriv commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r742145307
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -60,6 +94,51 @@
.fromCase(SMALLINT(), (short) 10, 10L)
.fromCase(TINYINT(), (byte) 10, 10L),
CastTestSpecBuilder.testCastTo(STRING())
+ .fromCase(STRING(), null, null)
+ .fromCase(
+ CHAR(3), StringData.fromString("foo"), StringData.fromString("foo"))
+ .fromCase(
+ VARCHAR(5),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ VARCHAR(10),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ STRING(),
+ StringData.fromString("Apache Flink"),
+ StringData.fromString("Apache Flink"))
+ .fromCase(STRING(), null, null)
+ .fromCase(BOOLEAN(), true, StringData.fromString("true"))
+ .fromCase(
+ BINARY(2), new byte[] {0, 1}, StringData.fromString("\u0000\u0001"))
+ .fromCase(
+ VARBINARY(3),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ VARBINARY(5),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ BYTES(),
+ new byte[] {0, 1, 2, 3, 4},
+ StringData.fromString("\u0000\u0001\u0002\u0003\u0004"))
+ .fromCase(
+ DECIMAL(4, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 4, 3),
+ StringData.fromString("9.870"))
+ .fromCase(
+ DECIMAL(5, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 5, 3),
+ StringData.fromString("9.870"))
+ .fromCase(TINYINT(), (byte) -125, StringData.fromString("-125"))
+ .fromCase(SMALLINT(), (short) 32767, StringData.fromString("32767"))
+ .fromCase(INT(), -12345678, StringData.fromString("-12345678"))
+ .fromCase(BIGINT(), 1234567891234L, StringData.fromString("1234567891234"))
+ .fromCase(FLOAT(), -123.456f, StringData.fromString("-123.456"))
Review comment:
not addressed ? or I'm missing something?
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "bbeab6ee08cb3e8ff732b7f604f26636842a01f9",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "bbeab6ee08cb3e8ff732b7f604f26636842a01f9",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* aabf462c9d34554539b5ca391419779d191bc0b8 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871)
* bbeab6ee08cb3e8ff732b7f604f26636842a01f9 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
[GitHub] [flink] slinkydeveloper commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
slinkydeveloper commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r742034054
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/AbstractCodeGeneratorCastRule.java
##########
@@ -148,9 +147,10 @@ protected AbstractCodeGeneratorCastRule(CastRulePredicate predicate) {
classCode)
.getConstructors()[0]
.newInstance(constructorArgs);
- } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
+ } catch (Throwable e) {
Review comment:
IIRC I converted to `Throwable` to catch also `Error`s and not just `Exception`. I can revert if you want, but I think it's better to keep it this way because invoking this constructor should never fail, for any reason, and we need to catch it immediately if it fails in order to wrap it with the code associated.
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 6bc3aa42681630f25d03acebb2ba186377ec2c22 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878)
* 00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892)
* e9e7c13e49a07f2e8a2185db90ad4d95741beb87 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043)
* cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051)
* e9d39e4981e0daf3aa8678d15cbe23e44cc829ac 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051)
* e9d39e4981e0daf3aa8678d15cbe23e44cc829ac Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056)
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043)
* cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043)
* cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123)
* 9de90269f89a3d997b4f6083ad68dbe1570b228d 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
}, {
"hash" : "0fe4cd3226a442010437c705a1d49b038b5f0cc9",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "0fe4cd3226a442010437c705a1d49b038b5f0cc9",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 9de90269f89a3d997b4f6083ad68dbe1570b228d Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129)
* 0fe4cd3226a442010437c705a1d49b038b5f0cc9 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
[GitHub] [flink] slinkydeveloper commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
slinkydeveloper commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r743576814
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("(");
+ int f0Value$2 = -1;
+ boolean f0IsNull$3 = _myInput.isNullAt(0);
+ if (!f0IsNull$3) {
+ f0Value$2 = _myInput.getInt(0);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + f0Value$2);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(",");
+ org.apache.flink.table.data.binary.BinaryStringData f1Value$4 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean f1IsNull$5 = _myInput.isNullAt(1);
+ if (!f1IsNull$5) {
+ f1Value$4 = ((org.apache.flink.table.data.binary.BinaryStringData) _myInput.getString(1));
+ builder$1.append(f1Value$4);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(")");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final List<LogicalType> fields =
+ ((RowType) inputLogicalType)
+ .getFields().stream()
+ .map(RowType.RowField::getType)
+ .collect(Collectors.toList());
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final CastRuleUtils.CodeWriter writer =
+ new CastRuleUtils.CodeWriter()
+ .stmt(
+ methodCall(
+ builderTerm,
+ "delete",
+ 0,
+ methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("(")));
+
+ for (int i = 0; i < fields.size(); i++) {
+ final int fieldIndex = i;
+ final LogicalType fieldType = fields.get(fieldIndex);
+
+ final String fieldTerm = newName("f" + fieldIndex + "Value");
+ final String fieldIsNullTerm = newName("f" + fieldIndex + "IsNull");
+
+ final CastCodeBlock codeBlock =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ fieldTerm,
+ fieldIsNullTerm,
+ // Null check is done at the row access level
+ fieldType.copy(false),
+ targetLogicalType);
+
+ // Write the comma
+ if (fieldIndex != 0) {
+ writer.stmt(methodCall(builderTerm, "append", strLiteral(",")));
Review comment:
As for https://github.com/apache/flink/pull/17658#discussion_r743574564, choosing which representation to use is out of scope of this PR. We have an issue open for that already: https://issues.apache.org/jira/browse/FLINK-17321
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("(");
+ int f0Value$2 = -1;
+ boolean f0IsNull$3 = _myInput.isNullAt(0);
+ if (!f0IsNull$3) {
+ f0Value$2 = _myInput.getInt(0);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + f0Value$2);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(",");
+ org.apache.flink.table.data.binary.BinaryStringData f1Value$4 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean f1IsNull$5 = _myInput.isNullAt(1);
+ if (!f1IsNull$5) {
+ f1Value$4 = ((org.apache.flink.table.data.binary.BinaryStringData) _myInput.getString(1));
+ builder$1.append(f1Value$4);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(")");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final List<LogicalType> fields =
+ ((RowType) inputLogicalType)
+ .getFields().stream()
+ .map(RowType.RowField::getType)
+ .collect(Collectors.toList());
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final CastRuleUtils.CodeWriter writer =
+ new CastRuleUtils.CodeWriter()
+ .stmt(
+ methodCall(
+ builderTerm,
+ "delete",
+ 0,
+ methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("(")));
Review comment:
Same as above
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f 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
[GitHub] [flink] twalthr commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
twalthr commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r743708460
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("(");
+ int f0Value$2 = -1;
+ boolean f0IsNull$3 = _myInput.isNullAt(0);
+ if (!f0IsNull$3) {
+ f0Value$2 = _myInput.getInt(0);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + f0Value$2);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(",");
+ org.apache.flink.table.data.binary.BinaryStringData f1Value$4 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean f1IsNull$5 = _myInput.isNullAt(1);
+ if (!f1IsNull$5) {
+ f1Value$4 = ((org.apache.flink.table.data.binary.BinaryStringData) _myInput.getString(1));
+ builder$1.append(f1Value$4);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(")");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final List<LogicalType> fields =
+ ((RowType) inputLogicalType)
+ .getFields().stream()
+ .map(RowType.RowField::getType)
+ .collect(Collectors.toList());
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final CastRuleUtils.CodeWriter writer =
+ new CastRuleUtils.CodeWriter()
+ .stmt(
+ methodCall(
+ builderTerm,
+ "delete",
+ 0,
+ methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("(")));
+
+ for (int i = 0; i < fields.size(); i++) {
+ final int fieldIndex = i;
+ final LogicalType fieldType = fields.get(fieldIndex);
+
+ final String fieldTerm = newName("f" + fieldIndex + "Value");
+ final String fieldIsNullTerm = newName("f" + fieldIndex + "IsNull");
+
+ final CastCodeBlock codeBlock =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ fieldTerm,
+ fieldIsNullTerm,
+ // Null check is done at the row access level
+ fieldType.copy(false),
+ targetLogicalType);
+
+ // Write the comma
+ if (fieldIndex != 0) {
+ writer.stmt(methodCall(builderTerm, "append", strLiteral(",")));
Review comment:
I opened FLINK-24802.
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043)
* cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* aabf462c9d34554539b5ca391419779d191bc0b8 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 6bc3aa42681630f25d03acebb2ba186377ec2c22 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878)
<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
[GitHub] [flink] flinkbot commented on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* aabf462c9d34554539b5ca391419779d191bc0b8 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123)
* 9de90269f89a3d997b4f6083ad68dbe1570b228d 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123)
* 9de90269f89a3d997b4f6083ad68dbe1570b228d Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
}, {
"hash" : "0fe4cd3226a442010437c705a1d49b038b5f0cc9",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "0fe4cd3226a442010437c705a1d49b038b5f0cc9",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 9de90269f89a3d997b4f6083ad68dbe1570b228d Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129)
* 0fe4cd3226a442010437c705a1d49b038b5f0cc9 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
[GitHub] [flink] slinkydeveloper commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
slinkydeveloper commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r742258394
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
Review comment:
There isn't any loop, because the row has a type defined arity where in each index you already know what "extractor" you need to get the field. The code generator loops through each field and generates a cast for each field.
--
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] matriv commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
matriv commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r742821581
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/MapToStringCastRule.java
##########
@@ -0,0 +1,227 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.MapType;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#MAP} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class MapToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final MapToStringCastRule INSTANCE = new MapToStringCastRule();
+
+ private MapToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.MAP)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((MapType) input).getKeyType(), target)
+ && CastRuleProvider.exists(
+ ((MapType) input).getValueType(), target))
+ .build());
+ }
+
+ /* Example generated code for MAP<STRING, INTERVAL MONTH>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ org.apache.flink.table.data.ArrayData keys$2 = _myInput.keyArray();
+ org.apache.flink.table.data.ArrayData values$3 = _myInput.valueArray();
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("{");
+ for (int i$4 = 0; i$4 < _myInput.size(); i$4++) {
+ if (i$4 != 0) {
+ builder$1.append(", ");
+ }
+ org.apache.flink.table.data.binary.BinaryStringData key$5 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean keyIsNull$6 = keys$2.isNullAt(i$4);
+ int value$7 = -1;
+ boolean valueIsNull$8 = values$3.isNullAt(i$4);
+ if (!keyIsNull$6) {
+ key$5 = ((org.apache.flink.table.data.binary.BinaryStringData) keys$2.getString(i$4));
+ builder$1.append(key$5);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append("=");
+ if (!valueIsNull$8) {
+ value$7 = values$3.getInt(i$4);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString(org.apache.flink.table.utils.DateTimeUtils.intervalYearMonthToString(value$7));
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ }
+ builder$1.append("}");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType keyType = ((MapType) inputLogicalType).getKeyType();
+ final LogicalType valueType = ((MapType) inputLogicalType).getValueType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final String keyArrayTerm = newName("keys");
+ final String valueArrayTerm = newName("values");
+
+ return new CastRuleUtils.CodeWriter()
+ .declStmt(ArrayData.class, keyArrayTerm, methodCall(inputTerm, "keyArray"))
+ .declStmt(ArrayData.class, valueArrayTerm, methodCall(inputTerm, "valueArray"))
+ .stmt(methodCall(builderTerm, "delete", 0, methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("{")))
+ .forStmt(
+ methodCall(inputTerm, "size"),
+ (indexTerm, loopBodyWriter) -> {
+ String keyTerm = newName("key");
+ String keyIsNullTerm = newName("keyIsNull");
+ String valueTerm = newName("value");
+ String valueIsNullTerm = newName("valueIsNull");
+
+ CastCodeBlock keyCast =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ keyTerm,
+ keyIsNullTerm,
+ // Null check is done at the key array access level
+ keyType.copy(false),
+ targetLogicalType);
+ CastCodeBlock valueCast =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ valueTerm,
+ valueIsNullTerm,
+ // Null check is done at the value array access level
+ valueType.copy(false),
+ targetLogicalType);
+
+ loopBodyWriter
+ // Write the comma
+ .ifStmt(
+ indexTerm + " != 0",
+ thenBodyWriter ->
+ thenBodyWriter.stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ strLiteral(", "))))
+ // Declare key and values variables
+ .declPrimitiveStmt(keyType, keyTerm)
+ .declStmt(
+ boolean.class,
+ keyIsNullTerm,
+ methodCall(keyArrayTerm, "isNullAt", indexTerm))
+ .declPrimitiveStmt(valueType, valueTerm)
+ .declStmt(
+ boolean.class,
+ valueIsNullTerm,
+ methodCall(valueArrayTerm, "isNullAt", indexTerm))
+ // Execute casting if inner key/value not null
+ .ifStmt(
+ "!" + keyIsNullTerm,
+ thenBodyWriter ->
+ thenBodyWriter
+ // If key not null, extract it and
+ // execute the cast
+ .assignStmt(
+ keyTerm,
+ rowFieldReadAccess(
+ indexTerm,
+ keyArrayTerm,
+ keyType))
+ .append(keyCast)
+ .stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ keyCast
+ .getReturnTerm())),
+ elseBodyWriter ->
+ elseBodyWriter.stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ strLiteral("NULL"))))
Review comment:
thx
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043)
* cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051)
* e9d39e4981e0daf3aa8678d15cbe23e44cc829ac 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
[GitHub] [flink] twalthr commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
twalthr commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r743516392
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -60,39 +112,142 @@
.fromCase(SMALLINT(), (short) 10, 10L)
.fromCase(TINYINT(), (byte) 10, 10L),
CastTestSpecBuilder.testCastTo(STRING())
+ .fromCase(STRING(), null, null)
+ .fromCase(
+ CHAR(3), StringData.fromString("foo"), StringData.fromString("foo"))
+ .fromCase(
+ VARCHAR(5),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ VARCHAR(10),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ STRING(),
+ StringData.fromString("Apache Flink"),
+ StringData.fromString("Apache Flink"))
+ .fromCase(BOOLEAN(), true, StringData.fromString("true"))
+ .fromCase(BOOLEAN(), false, StringData.fromString("false"))
+ .fromCase(
+ BINARY(2), new byte[] {0, 1}, StringData.fromString("\u0000\u0001"))
+ .fromCase(
+ VARBINARY(3),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ VARBINARY(5),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ BYTES(),
+ new byte[] {0, 1, 2, 3, 4},
+ StringData.fromString("\u0000\u0001\u0002\u0003\u0004"))
+ .fromCase(
+ DECIMAL(4, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 4, 3),
+ StringData.fromString("9.870"))
+ .fromCase(
+ DECIMAL(5, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 5, 3),
+ StringData.fromString("9.870"))
Review comment:
ignore this comment
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("(");
+ int f0Value$2 = -1;
+ boolean f0IsNull$3 = _myInput.isNullAt(0);
+ if (!f0IsNull$3) {
+ f0Value$2 = _myInput.getInt(0);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + f0Value$2);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(",");
+ org.apache.flink.table.data.binary.BinaryStringData f1Value$4 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean f1IsNull$5 = _myInput.isNullAt(1);
+ if (!f1IsNull$5) {
+ f1Value$4 = ((org.apache.flink.table.data.binary.BinaryStringData) _myInput.getString(1));
+ builder$1.append(f1Value$4);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(")");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final List<LogicalType> fields =
+ ((RowType) inputLogicalType)
+ .getFields().stream()
+ .map(RowType.RowField::getType)
+ .collect(Collectors.toList());
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final CastRuleUtils.CodeWriter writer =
+ new CastRuleUtils.CodeWriter()
+ .stmt(
+ methodCall(
+ builderTerm,
+ "delete",
+ 0,
+ methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("(")));
+
+ for (int i = 0; i < fields.size(); i++) {
+ final int fieldIndex = i;
+ final LogicalType fieldType = fields.get(fieldIndex);
+
+ final String fieldTerm = newName("f" + fieldIndex + "Value");
+ final String fieldIsNullTerm = newName("f" + fieldIndex + "IsNull");
+
+ final CastCodeBlock codeBlock =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ fieldTerm,
+ fieldIsNullTerm,
+ // Null check is done at the row access level
+ fieldType.copy(false),
+ targetLogicalType);
+
+ // Write the comma
+ if (fieldIndex != 0) {
+ writer.stmt(methodCall(builderTerm, "append", strLiteral(",")));
Review comment:
A row is not a collection type. But let me create a bunch of issues to not forget about it.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/BinaryToStringCastRule.java
##########
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+
+import java.nio.charset.StandardCharsets;
+
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.accessStaticField;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+
+/**
+ * {@link LogicalTypeFamily#BINARY_STRING} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule.
+ */
+public class BinaryToStringCastRule extends AbstractCharacterFamilyTargetRule<byte[]> {
+
+ public static final BinaryToStringCastRule INSTANCE = new BinaryToStringCastRule();
+
+ private BinaryToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .input(LogicalTypeFamily.BINARY_STRING)
+ .target(LogicalTypeFamily.CHARACTER_STRING)
+ .build());
+ }
+
+ @Override
+ public String generateStringExpression(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ return constructorCall(
Review comment:
I opened FLINK-24803
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("(");
+ int f0Value$2 = -1;
+ boolean f0IsNull$3 = _myInput.isNullAt(0);
+ if (!f0IsNull$3) {
+ f0Value$2 = _myInput.getInt(0);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + f0Value$2);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(",");
+ org.apache.flink.table.data.binary.BinaryStringData f1Value$4 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean f1IsNull$5 = _myInput.isNullAt(1);
+ if (!f1IsNull$5) {
+ f1Value$4 = ((org.apache.flink.table.data.binary.BinaryStringData) _myInput.getString(1));
+ builder$1.append(f1Value$4);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(")");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final List<LogicalType> fields =
+ ((RowType) inputLogicalType)
+ .getFields().stream()
+ .map(RowType.RowField::getType)
+ .collect(Collectors.toList());
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final CastRuleUtils.CodeWriter writer =
+ new CastRuleUtils.CodeWriter()
+ .stmt(
+ methodCall(
+ builderTerm,
+ "delete",
+ 0,
+ methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("(")));
+
+ for (int i = 0; i < fields.size(); i++) {
+ final int fieldIndex = i;
+ final LogicalType fieldType = fields.get(fieldIndex);
+
+ final String fieldTerm = newName("f" + fieldIndex + "Value");
+ final String fieldIsNullTerm = newName("f" + fieldIndex + "IsNull");
+
+ final CastCodeBlock codeBlock =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ fieldTerm,
+ fieldIsNullTerm,
+ // Null check is done at the row access level
+ fieldType.copy(false),
+ targetLogicalType);
+
+ // Write the comma
+ if (fieldIndex != 0) {
+ writer.stmt(methodCall(builderTerm, "append", strLiteral(",")));
Review comment:
I opened FLINK-24802.
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051)
* e9d39e4981e0daf3aa8678d15cbe23e44cc829ac Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056)
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051)
* e9d39e4981e0daf3aa8678d15cbe23e44cc829ac Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056)
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
<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
[GitHub] [flink] matriv commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
matriv commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r743578729
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/BinaryToStringCastRule.java
##########
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+
+import java.nio.charset.StandardCharsets;
+
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.accessStaticField;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+
+/**
+ * {@link LogicalTypeFamily#BINARY_STRING} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule.
+ */
+public class BinaryToStringCastRule extends AbstractCharacterFamilyTargetRule<byte[]> {
+
+ public static final BinaryToStringCastRule INSTANCE = new BinaryToStringCastRule();
+
+ private BinaryToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .input(LogicalTypeFamily.BINARY_STRING)
+ .target(LogicalTypeFamily.CHARACTER_STRING)
+ .build());
+ }
+
+ @Override
+ public String generateStringExpression(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ return constructorCall(
Review comment:
I would say yes, imho, it's better not to mix this refactoring with addressing more issues.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/CastRuleUtils.java
##########
@@ -36,4 +49,141 @@ static String functionCall(String functionName, Object... args) {
static String functionCall(Method staticMethod, Object... args) {
return functionCall(CodeGenUtils.qualifyMethod(staticMethod), args);
}
+
+ static String constructorCall(Class<?> clazz, Object... args) {
+ return functionCall("new " + className(clazz), args);
+ }
+
+ static String methodCall(String instanceTerm, String methodName, Object... args) {
+ return functionCall(instanceTerm + "." + methodName, args);
+ }
+
+ static String newArray(String innerType, String arraySize) {
+ return "new " + innerType + "[" + arraySize + "]";
+ }
+
+ static String stringConcat(Object... args) {
+ return Arrays.stream(args).map(Object::toString).collect(Collectors.joining(" + "));
+ }
+
+ static String accessStaticField(Class<?> clazz, String fieldName) {
+ return className(clazz) + "." + fieldName;
+ }
+
+ static String ternaryOperator(String condition, String ifTrue, String ifFalse) {
+ return "((" + condition + ") ? (" + ifTrue + ") : (" + ifFalse + "))";
+ }
+
+ static String strLiteral() {
+ return "\"\"";
+ }
+
+ static String strLiteral(String str) {
+ return "\"" + StringEscapeUtils.escapeJava(str) + "\"";
+ }
+
+ static final class CodeWriter {
+ StringBuilder builder = new StringBuilder();
+
+ public CodeWriter declStmt(String varType, String varName, String value) {
+ return stmt(varType + " " + varName + " = " + value);
+ }
+
+ public CodeWriter declStmt(Class<?> clazz, String varName, String value) {
+ return declStmt(className(clazz), varName, value);
+ }
+
+ public CodeWriter declPrimitiveStmt(LogicalType logicalType, String varName, String value) {
+ return declStmt(primitiveTypeTermForType(logicalType), varName, value);
+ }
+
+ public CodeWriter declPrimitiveStmt(LogicalType logicalType, String varName) {
+ return declStmt(
+ primitiveTypeTermForType(logicalType),
+ varName,
+ primitiveDefaultValue(logicalType));
+ }
+
+ public CodeWriter declStmt(String varType, String varName) {
+ return stmt(varType + " " + varName);
+ }
+
+ public CodeWriter declStmt(Class<?> clazz, String varName) {
+ return declStmt(className(clazz), varName);
+ }
+
+ public CodeWriter assignStmt(String varName, String value) {
+ return stmt(varName + " = " + value);
+ }
+
+ public CodeWriter assignArrayStmt(String varName, String index, String value) {
+ return stmt(varName + "[" + index + "] = " + value);
+ }
+
+ public CodeWriter stmt(String stmt) {
+ builder.append(stmt).append(';').append('\n');
+ return this;
+ }
+
+ public CodeWriter forStmt(
+ String upperBound, BiConsumer<String, CodeWriter> bodyWriterConsumer) {
+ final String indexTerm = newName("i");
+ final CodeWriter innerWriter = new CodeWriter();
+
+ builder.append("for (int ")
+ .append(indexTerm)
+ .append(" = 0; ")
+ .append(indexTerm)
+ .append(" < ")
+ .append(upperBound)
+ .append("; ")
+ .append(indexTerm)
+ .append("++) {\n");
+ bodyWriterConsumer.accept(indexTerm, innerWriter);
+ builder.append(innerWriter).append("}\n");
+
+ return this;
+ }
+
+ public CodeWriter ifStmt(String condition, Consumer<CodeWriter> bodyWriterConsumer) {
+ final CodeWriter innerWriter = new CodeWriter();
+
+ builder.append("if (").append(condition).append(") {\n");
+ bodyWriterConsumer.accept(innerWriter);
+ builder.append(innerWriter).append("}\n");
+
+ return this;
+ }
+
+ public CodeWriter ifStmt(
+ String condition,
+ Consumer<CodeWriter> thenWriterConsumer,
+ Consumer<CodeWriter> elseWriterConsumer) {
+ final CodeWriter thenWriter = new CodeWriter();
+ final CodeWriter elseWriter = new CodeWriter();
+
+ builder.append("if (").append(condition).append(") {\n");
+ thenWriterConsumer.accept(thenWriter);
+ builder.append(thenWriter).append("} else {\n");
+ elseWriterConsumer.accept(elseWriter);
+ builder.append(elseWriter).append("}\n");
+
+ return this;
+ }
+
+ public CodeWriter append(CastCodeBlock codeBlock) {
+ builder.append(codeBlock.getCode());
+ return this;
+ }
+
+ public CodeWriter append(String codeBlock) {
Review comment:
+1
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043)
* cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* bbf807abdd14e5e730e9d6398093c7ce37592b94 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043)
* cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051)
* e9d39e4981e0daf3aa8678d15cbe23e44cc829ac Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056)
<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
[GitHub] [flink] twalthr commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
twalthr commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r743516392
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -60,39 +112,142 @@
.fromCase(SMALLINT(), (short) 10, 10L)
.fromCase(TINYINT(), (byte) 10, 10L),
CastTestSpecBuilder.testCastTo(STRING())
+ .fromCase(STRING(), null, null)
+ .fromCase(
+ CHAR(3), StringData.fromString("foo"), StringData.fromString("foo"))
+ .fromCase(
+ VARCHAR(5),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ VARCHAR(10),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ STRING(),
+ StringData.fromString("Apache Flink"),
+ StringData.fromString("Apache Flink"))
+ .fromCase(BOOLEAN(), true, StringData.fromString("true"))
+ .fromCase(BOOLEAN(), false, StringData.fromString("false"))
+ .fromCase(
+ BINARY(2), new byte[] {0, 1}, StringData.fromString("\u0000\u0001"))
+ .fromCase(
+ VARBINARY(3),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ VARBINARY(5),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ BYTES(),
+ new byte[] {0, 1, 2, 3, 4},
+ StringData.fromString("\u0000\u0001\u0002\u0003\u0004"))
+ .fromCase(
+ DECIMAL(4, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 4, 3),
+ StringData.fromString("9.870"))
+ .fromCase(
+ DECIMAL(5, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 5, 3),
+ StringData.fromString("9.870"))
Review comment:
ignore this comment
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043)
* cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051)
* e9d39e4981e0daf3aa8678d15cbe23e44cc829ac 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
[GitHub] [flink] matriv commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
matriv commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r742152088
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/MapToStringCastRule.java
##########
@@ -0,0 +1,227 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.MapType;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#MAP} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class MapToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final MapToStringCastRule INSTANCE = new MapToStringCastRule();
+
+ private MapToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.MAP)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((MapType) input).getKeyType(), target)
+ && CastRuleProvider.exists(
+ ((MapType) input).getValueType(), target))
+ .build());
+ }
+
+ /* Example generated code for MAP<STRING, INTERVAL MONTH>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ org.apache.flink.table.data.ArrayData keys$2 = _myInput.keyArray();
+ org.apache.flink.table.data.ArrayData values$3 = _myInput.valueArray();
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("{");
+ for (int i$4 = 0; i$4 < _myInput.size(); i$4++) {
+ if (i$4 != 0) {
+ builder$1.append(", ");
+ }
+ org.apache.flink.table.data.binary.BinaryStringData key$5 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean keyIsNull$6 = keys$2.isNullAt(i$4);
+ int value$7 = -1;
+ boolean valueIsNull$8 = values$3.isNullAt(i$4);
+ if (!keyIsNull$6) {
+ key$5 = ((org.apache.flink.table.data.binary.BinaryStringData) keys$2.getString(i$4));
+ builder$1.append(key$5);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append("=");
+ if (!valueIsNull$8) {
+ value$7 = values$3.getInt(i$4);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString(org.apache.flink.table.utils.DateTimeUtils.intervalYearMonthToString(value$7));
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ }
+ builder$1.append("}");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType keyType = ((MapType) inputLogicalType).getKeyType();
+ final LogicalType valueType = ((MapType) inputLogicalType).getValueType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final String keyArrayTerm = newName("keys");
+ final String valueArrayTerm = newName("values");
+
+ return new CastRuleUtils.CodeWriter()
+ .declStmt(ArrayData.class, keyArrayTerm, methodCall(inputTerm, "keyArray"))
+ .declStmt(ArrayData.class, valueArrayTerm, methodCall(inputTerm, "valueArray"))
+ .stmt(methodCall(builderTerm, "delete", 0, methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("{")))
+ .forStmt(
+ methodCall(inputTerm, "size"),
+ (indexTerm, loopBodyWriter) -> {
+ String keyTerm = newName("key");
+ String keyIsNullTerm = newName("keyIsNull");
+ String valueTerm = newName("value");
+ String valueIsNullTerm = newName("valueIsNull");
+
+ CastCodeBlock keyCast =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ keyTerm,
+ keyIsNullTerm,
+ // Null check is done at the key array access level
+ keyType.copy(false),
+ targetLogicalType);
+ CastCodeBlock valueCast =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ valueTerm,
+ valueIsNullTerm,
+ // Null check is done at the value array access level
+ valueType.copy(false),
+ targetLogicalType);
+
+ loopBodyWriter
+ // Write the comma
+ .ifStmt(
+ indexTerm + " != 0",
+ thenBodyWriter ->
+ thenBodyWriter.stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ strLiteral(", "))))
+ // Declare key and values variables
+ .declPrimitiveStmt(keyType, keyTerm)
+ .declStmt(
+ boolean.class,
+ keyIsNullTerm,
+ methodCall(keyArrayTerm, "isNullAt", indexTerm))
+ .declPrimitiveStmt(valueType, valueTerm)
+ .declStmt(
+ boolean.class,
+ valueIsNullTerm,
+ methodCall(valueArrayTerm, "isNullAt", indexTerm))
+ // Execute casting if inner key/value not null
+ .ifStmt(
+ "!" + keyIsNullTerm,
+ thenBodyWriter ->
+ thenBodyWriter
+ // If key not null, extract it and
+ // execute the cast
+ .assignStmt(
+ keyTerm,
+ rowFieldReadAccess(
+ indexTerm,
+ keyArrayTerm,
+ keyType))
+ .append(keyCast)
+ .stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ keyCast
+ .getReturnTerm())),
+ elseBodyWriter ->
+ elseBodyWriter.stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ strLiteral("NULL"))))
Review comment:
Could you please extract all usages `NULL`, `<NULL>`, etc. to constants in the superclass?
--
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] matriv commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
matriv commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r742139129
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToStringCastRule.java
##########
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.ArrayType;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ARRAY} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class ArrayToStringCastRule
+ extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final ArrayToStringCastRule INSTANCE = new ArrayToStringCastRule();
+
+ private ArrayToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ARRAY)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((ArrayType) input).getElementType(),
+ target))
+ .build());
+ }
+
+ /* Example generated code for ARRAY<INT>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("[");
+ for (int i$2 = 0; i$2 < _myInput.size(); i$2++) {
+ if (i$2 != 0) {
+ builder$1.append(", ");
+ }
+ int element$3 = -1;
+ boolean elementIsNull$4 = _myInput.isNullAt(i$2);
+ if (!elementIsNull$4) {
+ element$3 = _myInput.getInt(i$2);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + element$3);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ }
+ builder$1.append("]");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType innerInputType = ((ArrayType) inputLogicalType).getElementType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ return new CastRuleUtils.CodeWriter()
+ .stmt(methodCall(builderTerm, "delete", 0, methodCall(builderTerm, "length")))
Review comment:
`setLength(0)` could be used instead.
--
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] slinkydeveloper commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
slinkydeveloper commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r742034054
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/AbstractCodeGeneratorCastRule.java
##########
@@ -148,9 +147,10 @@ protected AbstractCodeGeneratorCastRule(CastRulePredicate predicate) {
classCode)
.getConstructors()[0]
.newInstance(constructorArgs);
- } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
+ } catch (Throwable e) {
Review comment:
IIRC I converted to `Throwable` to catch also `Error`s and not just `Exception`. I can revert if you want, but I think it's better to keep it this way because invoking this constructor should never fail, for any reason, and we need to catch it immediately if it fails in order to wrap it with the code associated.
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -76,7 +155,77 @@
Thread.currentThread().getContextClassLoader()),
TimestampData.fromLocalDateTime(
LocalDateTime.parse("2021-09-24T12:34:56.123456")),
- StringData.fromString("2021-09-24 14:34:56.123456")),
+ StringData.fromString("2021-09-24 14:34:56.123456"))
Review comment:
Check now
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
Review comment:
There isn't any loop, because the row has a type defined arity where in each index you already know what "extractor" you need to get the field. The code generator loops through each field and generates a cast for each field.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/MapToStringCastRule.java
##########
@@ -0,0 +1,227 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.MapType;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#MAP} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class MapToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final MapToStringCastRule INSTANCE = new MapToStringCastRule();
+
+ private MapToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.MAP)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((MapType) input).getKeyType(), target)
+ && CastRuleProvider.exists(
+ ((MapType) input).getValueType(), target))
+ .build());
+ }
+
+ /* Example generated code for MAP<STRING, INTERVAL MONTH>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ org.apache.flink.table.data.ArrayData keys$2 = _myInput.keyArray();
+ org.apache.flink.table.data.ArrayData values$3 = _myInput.valueArray();
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("{");
+ for (int i$4 = 0; i$4 < _myInput.size(); i$4++) {
+ if (i$4 != 0) {
+ builder$1.append(", ");
+ }
+ org.apache.flink.table.data.binary.BinaryStringData key$5 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean keyIsNull$6 = keys$2.isNullAt(i$4);
+ int value$7 = -1;
+ boolean valueIsNull$8 = values$3.isNullAt(i$4);
+ if (!keyIsNull$6) {
+ key$5 = ((org.apache.flink.table.data.binary.BinaryStringData) keys$2.getString(i$4));
+ builder$1.append(key$5);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append("=");
+ if (!valueIsNull$8) {
+ value$7 = values$3.getInt(i$4);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString(org.apache.flink.table.utils.DateTimeUtils.intervalYearMonthToString(value$7));
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ }
+ builder$1.append("}");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType keyType = ((MapType) inputLogicalType).getKeyType();
+ final LogicalType valueType = ((MapType) inputLogicalType).getValueType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final String keyArrayTerm = newName("keys");
+ final String valueArrayTerm = newName("values");
+
+ return new CastRuleUtils.CodeWriter()
+ .declStmt(ArrayData.class, keyArrayTerm, methodCall(inputTerm, "keyArray"))
+ .declStmt(ArrayData.class, valueArrayTerm, methodCall(inputTerm, "valueArray"))
+ .stmt(methodCall(builderTerm, "delete", 0, methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("{")))
+ .forStmt(
+ methodCall(inputTerm, "size"),
+ (indexTerm, loopBodyWriter) -> {
+ String keyTerm = newName("key");
+ String keyIsNullTerm = newName("keyIsNull");
+ String valueTerm = newName("value");
+ String valueIsNullTerm = newName("valueIsNull");
+
+ CastCodeBlock keyCast =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ keyTerm,
+ keyIsNullTerm,
+ // Null check is done at the key array access level
+ keyType.copy(false),
+ targetLogicalType);
+ CastCodeBlock valueCast =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ valueTerm,
+ valueIsNullTerm,
+ // Null check is done at the value array access level
+ valueType.copy(false),
+ targetLogicalType);
+
+ loopBodyWriter
+ // Write the comma
+ .ifStmt(
+ indexTerm + " != 0",
+ thenBodyWriter ->
+ thenBodyWriter.stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ strLiteral(", "))))
+ // Declare key and values variables
+ .declPrimitiveStmt(keyType, keyTerm)
+ .declStmt(
+ boolean.class,
+ keyIsNullTerm,
+ methodCall(keyArrayTerm, "isNullAt", indexTerm))
+ .declPrimitiveStmt(valueType, valueTerm)
+ .declStmt(
+ boolean.class,
+ valueIsNullTerm,
+ methodCall(valueArrayTerm, "isNullAt", indexTerm))
+ // Execute casting if inner key/value not null
+ .ifStmt(
+ "!" + keyIsNullTerm,
+ thenBodyWriter ->
+ thenBodyWriter
+ // If key not null, extract it and
+ // execute the cast
+ .assignStmt(
+ keyTerm,
+ rowFieldReadAccess(
+ indexTerm,
+ keyArrayTerm,
+ keyType))
+ .append(keyCast)
+ .stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ keyCast
+ .getReturnTerm())),
+ elseBodyWriter ->
+ elseBodyWriter.stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ strLiteral("NULL"))))
Review comment:
This PR doesn't deal with `<NULL>`, because that's user facing (see `PrintUtils#NULL_COLUMN`), the next PR (for FLINK-24685) will deal with it.
For `NULL`, I've added a constant in `PrintUtils`
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/AbstractCodeGeneratorCastRule.java
##########
@@ -148,9 +147,10 @@ protected AbstractCodeGeneratorCastRule(CastRulePredicate predicate) {
classCode)
.getConstructors()[0]
.newInstance(constructorArgs);
- } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
+ } catch (Throwable e) {
Review comment:
IIRC I converted to `Throwable` to catch also `Error`s and not just `Exception`. I can revert if you want, but I think it's better to keep it this way because invoking this constructor should never fail, for any reason, and we need to catch it immediately if it fails in order to wrap it with the code associated.
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -76,7 +155,77 @@
Thread.currentThread().getContextClassLoader()),
TimestampData.fromLocalDateTime(
LocalDateTime.parse("2021-09-24T12:34:56.123456")),
- StringData.fromString("2021-09-24 14:34:56.123456")),
+ StringData.fromString("2021-09-24 14:34:56.123456"))
Review comment:
Check now
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
Review comment:
There isn't any loop, because the row has a type defined arity where in each index you already know what "extractor" you need to get the field. The code generator loops through each field and generates a cast for each field.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/MapToStringCastRule.java
##########
@@ -0,0 +1,227 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.MapType;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#MAP} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class MapToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final MapToStringCastRule INSTANCE = new MapToStringCastRule();
+
+ private MapToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.MAP)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((MapType) input).getKeyType(), target)
+ && CastRuleProvider.exists(
+ ((MapType) input).getValueType(), target))
+ .build());
+ }
+
+ /* Example generated code for MAP<STRING, INTERVAL MONTH>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ org.apache.flink.table.data.ArrayData keys$2 = _myInput.keyArray();
+ org.apache.flink.table.data.ArrayData values$3 = _myInput.valueArray();
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("{");
+ for (int i$4 = 0; i$4 < _myInput.size(); i$4++) {
+ if (i$4 != 0) {
+ builder$1.append(", ");
+ }
+ org.apache.flink.table.data.binary.BinaryStringData key$5 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean keyIsNull$6 = keys$2.isNullAt(i$4);
+ int value$7 = -1;
+ boolean valueIsNull$8 = values$3.isNullAt(i$4);
+ if (!keyIsNull$6) {
+ key$5 = ((org.apache.flink.table.data.binary.BinaryStringData) keys$2.getString(i$4));
+ builder$1.append(key$5);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append("=");
+ if (!valueIsNull$8) {
+ value$7 = values$3.getInt(i$4);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString(org.apache.flink.table.utils.DateTimeUtils.intervalYearMonthToString(value$7));
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ }
+ builder$1.append("}");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType keyType = ((MapType) inputLogicalType).getKeyType();
+ final LogicalType valueType = ((MapType) inputLogicalType).getValueType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final String keyArrayTerm = newName("keys");
+ final String valueArrayTerm = newName("values");
+
+ return new CastRuleUtils.CodeWriter()
+ .declStmt(ArrayData.class, keyArrayTerm, methodCall(inputTerm, "keyArray"))
+ .declStmt(ArrayData.class, valueArrayTerm, methodCall(inputTerm, "valueArray"))
+ .stmt(methodCall(builderTerm, "delete", 0, methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("{")))
+ .forStmt(
+ methodCall(inputTerm, "size"),
+ (indexTerm, loopBodyWriter) -> {
+ String keyTerm = newName("key");
+ String keyIsNullTerm = newName("keyIsNull");
+ String valueTerm = newName("value");
+ String valueIsNullTerm = newName("valueIsNull");
+
+ CastCodeBlock keyCast =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ keyTerm,
+ keyIsNullTerm,
+ // Null check is done at the key array access level
+ keyType.copy(false),
+ targetLogicalType);
+ CastCodeBlock valueCast =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ valueTerm,
+ valueIsNullTerm,
+ // Null check is done at the value array access level
+ valueType.copy(false),
+ targetLogicalType);
+
+ loopBodyWriter
+ // Write the comma
+ .ifStmt(
+ indexTerm + " != 0",
+ thenBodyWriter ->
+ thenBodyWriter.stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ strLiteral(", "))))
+ // Declare key and values variables
+ .declPrimitiveStmt(keyType, keyTerm)
+ .declStmt(
+ boolean.class,
+ keyIsNullTerm,
+ methodCall(keyArrayTerm, "isNullAt", indexTerm))
+ .declPrimitiveStmt(valueType, valueTerm)
+ .declStmt(
+ boolean.class,
+ valueIsNullTerm,
+ methodCall(valueArrayTerm, "isNullAt", indexTerm))
+ // Execute casting if inner key/value not null
+ .ifStmt(
+ "!" + keyIsNullTerm,
+ thenBodyWriter ->
+ thenBodyWriter
+ // If key not null, extract it and
+ // execute the cast
+ .assignStmt(
+ keyTerm,
+ rowFieldReadAccess(
+ indexTerm,
+ keyArrayTerm,
+ keyType))
+ .append(keyCast)
+ .stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ keyCast
+ .getReturnTerm())),
+ elseBodyWriter ->
+ elseBodyWriter.stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ strLiteral("NULL"))))
Review comment:
This PR doesn't deal with `<NULL>`, because that's user facing (see `PrintUtils#NULL_COLUMN`), the next PR (for FLINK-24685) will deal with it.
For `NULL`, I've added a constant in `PrintUtils`
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "bbeab6ee08cb3e8ff732b7f604f26636842a01f9",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "bbeab6ee08cb3e8ff732b7f604f26636842a01f9",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* aabf462c9d34554539b5ca391419779d191bc0b8 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871)
* bbeab6ee08cb3e8ff732b7f604f26636842a01f9 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
}, {
"hash" : "0fe4cd3226a442010437c705a1d49b038b5f0cc9",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "0fe4cd3226a442010437c705a1d49b038b5f0cc9",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 9de90269f89a3d997b4f6083ad68dbe1570b228d Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129)
* 0fe4cd3226a442010437c705a1d49b038b5f0cc9 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 9de90269f89a3d997b4f6083ad68dbe1570b228d Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "bbeab6ee08cb3e8ff732b7f604f26636842a01f9",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "bbeab6ee08cb3e8ff732b7f604f26636842a01f9",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* aabf462c9d34554539b5ca391419779d191bc0b8 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871)
* bbeab6ee08cb3e8ff732b7f604f26636842a01f9 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 6bc3aa42681630f25d03acebb2ba186377ec2c22 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878)
* 00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
<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
[GitHub] [flink] slinkydeveloper commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
slinkydeveloper commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r742261221
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/MapToStringCastRule.java
##########
@@ -0,0 +1,227 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.MapType;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#MAP} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class MapToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final MapToStringCastRule INSTANCE = new MapToStringCastRule();
+
+ private MapToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.MAP)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((MapType) input).getKeyType(), target)
+ && CastRuleProvider.exists(
+ ((MapType) input).getValueType(), target))
+ .build());
+ }
+
+ /* Example generated code for MAP<STRING, INTERVAL MONTH>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ org.apache.flink.table.data.ArrayData keys$2 = _myInput.keyArray();
+ org.apache.flink.table.data.ArrayData values$3 = _myInput.valueArray();
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("{");
+ for (int i$4 = 0; i$4 < _myInput.size(); i$4++) {
+ if (i$4 != 0) {
+ builder$1.append(", ");
+ }
+ org.apache.flink.table.data.binary.BinaryStringData key$5 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean keyIsNull$6 = keys$2.isNullAt(i$4);
+ int value$7 = -1;
+ boolean valueIsNull$8 = values$3.isNullAt(i$4);
+ if (!keyIsNull$6) {
+ key$5 = ((org.apache.flink.table.data.binary.BinaryStringData) keys$2.getString(i$4));
+ builder$1.append(key$5);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append("=");
+ if (!valueIsNull$8) {
+ value$7 = values$3.getInt(i$4);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString(org.apache.flink.table.utils.DateTimeUtils.intervalYearMonthToString(value$7));
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ }
+ builder$1.append("}");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType keyType = ((MapType) inputLogicalType).getKeyType();
+ final LogicalType valueType = ((MapType) inputLogicalType).getValueType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final String keyArrayTerm = newName("keys");
+ final String valueArrayTerm = newName("values");
+
+ return new CastRuleUtils.CodeWriter()
+ .declStmt(ArrayData.class, keyArrayTerm, methodCall(inputTerm, "keyArray"))
+ .declStmt(ArrayData.class, valueArrayTerm, methodCall(inputTerm, "valueArray"))
+ .stmt(methodCall(builderTerm, "delete", 0, methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("{")))
+ .forStmt(
+ methodCall(inputTerm, "size"),
+ (indexTerm, loopBodyWriter) -> {
+ String keyTerm = newName("key");
+ String keyIsNullTerm = newName("keyIsNull");
+ String valueTerm = newName("value");
+ String valueIsNullTerm = newName("valueIsNull");
+
+ CastCodeBlock keyCast =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ keyTerm,
+ keyIsNullTerm,
+ // Null check is done at the key array access level
+ keyType.copy(false),
+ targetLogicalType);
+ CastCodeBlock valueCast =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ valueTerm,
+ valueIsNullTerm,
+ // Null check is done at the value array access level
+ valueType.copy(false),
+ targetLogicalType);
+
+ loopBodyWriter
+ // Write the comma
+ .ifStmt(
+ indexTerm + " != 0",
+ thenBodyWriter ->
+ thenBodyWriter.stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ strLiteral(", "))))
+ // Declare key and values variables
+ .declPrimitiveStmt(keyType, keyTerm)
+ .declStmt(
+ boolean.class,
+ keyIsNullTerm,
+ methodCall(keyArrayTerm, "isNullAt", indexTerm))
+ .declPrimitiveStmt(valueType, valueTerm)
+ .declStmt(
+ boolean.class,
+ valueIsNullTerm,
+ methodCall(valueArrayTerm, "isNullAt", indexTerm))
+ // Execute casting if inner key/value not null
+ .ifStmt(
+ "!" + keyIsNullTerm,
+ thenBodyWriter ->
+ thenBodyWriter
+ // If key not null, extract it and
+ // execute the cast
+ .assignStmt(
+ keyTerm,
+ rowFieldReadAccess(
+ indexTerm,
+ keyArrayTerm,
+ keyType))
+ .append(keyCast)
+ .stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ keyCast
+ .getReturnTerm())),
+ elseBodyWriter ->
+ elseBodyWriter.stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ strLiteral("NULL"))))
Review comment:
This PR doesn't deal with `<NULL>`, because that's user facing (see `PrintUtils#NULL_COLUMN`), the next PR (for FLINK-24685) will deal with it.
For `NULL`, I've added a constant in `PrintUtils`
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
<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
[GitHub] [flink] twalthr commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
twalthr commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r743706344
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/BinaryToStringCastRule.java
##########
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+
+import java.nio.charset.StandardCharsets;
+
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.accessStaticField;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+
+/**
+ * {@link LogicalTypeFamily#BINARY_STRING} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule.
+ */
+public class BinaryToStringCastRule extends AbstractCharacterFamilyTargetRule<byte[]> {
+
+ public static final BinaryToStringCastRule INSTANCE = new BinaryToStringCastRule();
+
+ private BinaryToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .input(LogicalTypeFamily.BINARY_STRING)
+ .target(LogicalTypeFamily.CHARACTER_STRING)
+ .build());
+ }
+
+ @Override
+ public String generateStringExpression(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ return constructorCall(
Review comment:
I opened FLINK-24803
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043)
* cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 9de90269f89a3d997b4f6083ad68dbe1570b228d Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051)
* e9d39e4981e0daf3aa8678d15cbe23e44cc829ac Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
}, {
"hash" : "0fe4cd3226a442010437c705a1d49b038b5f0cc9",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "0fe4cd3226a442010437c705a1d49b038b5f0cc9",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 9de90269f89a3d997b4f6083ad68dbe1570b228d Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129)
* 0fe4cd3226a442010437c705a1d49b038b5f0cc9 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
[GitHub] [flink] twalthr closed pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
twalthr closed pull request #17658:
URL: https://github.com/apache/flink/pull/17658
--
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] slinkydeveloper commented on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
slinkydeveloper commented on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-959568529
@matriv regarding testing the rules in `CastFunctionsITCase`, I effectively found out that the row, array and map rules doesn't work, because some validation steps before (`SqlValidatorImpl` and `LogicalTypeCasts`) thinks the cast combination is invalid. Because the goal of this PR is to simply port the logic from `ScalarOperatorGens` to the new rules, perhaps should we tackle the issue of "exposing" the rules in the context of https://issues.apache.org/jira/browse/FLINK-21456?
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043)
* cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051)
* e9d39e4981e0daf3aa8678d15cbe23e44cc829ac Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 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
[GitHub] [flink] matriv commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
matriv commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r743578729
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/BinaryToStringCastRule.java
##########
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+
+import java.nio.charset.StandardCharsets;
+
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.accessStaticField;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+
+/**
+ * {@link LogicalTypeFamily#BINARY_STRING} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule.
+ */
+public class BinaryToStringCastRule extends AbstractCharacterFamilyTargetRule<byte[]> {
+
+ public static final BinaryToStringCastRule INSTANCE = new BinaryToStringCastRule();
+
+ private BinaryToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .input(LogicalTypeFamily.BINARY_STRING)
+ .target(LogicalTypeFamily.CHARACTER_STRING)
+ .build());
+ }
+
+ @Override
+ public String generateStringExpression(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ return constructorCall(
Review comment:
I would say yes, imho, it's better not to mix this refactoring with addressing more issues.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/CastRuleUtils.java
##########
@@ -36,4 +49,141 @@ static String functionCall(String functionName, Object... args) {
static String functionCall(Method staticMethod, Object... args) {
return functionCall(CodeGenUtils.qualifyMethod(staticMethod), args);
}
+
+ static String constructorCall(Class<?> clazz, Object... args) {
+ return functionCall("new " + className(clazz), args);
+ }
+
+ static String methodCall(String instanceTerm, String methodName, Object... args) {
+ return functionCall(instanceTerm + "." + methodName, args);
+ }
+
+ static String newArray(String innerType, String arraySize) {
+ return "new " + innerType + "[" + arraySize + "]";
+ }
+
+ static String stringConcat(Object... args) {
+ return Arrays.stream(args).map(Object::toString).collect(Collectors.joining(" + "));
+ }
+
+ static String accessStaticField(Class<?> clazz, String fieldName) {
+ return className(clazz) + "." + fieldName;
+ }
+
+ static String ternaryOperator(String condition, String ifTrue, String ifFalse) {
+ return "((" + condition + ") ? (" + ifTrue + ") : (" + ifFalse + "))";
+ }
+
+ static String strLiteral() {
+ return "\"\"";
+ }
+
+ static String strLiteral(String str) {
+ return "\"" + StringEscapeUtils.escapeJava(str) + "\"";
+ }
+
+ static final class CodeWriter {
+ StringBuilder builder = new StringBuilder();
+
+ public CodeWriter declStmt(String varType, String varName, String value) {
+ return stmt(varType + " " + varName + " = " + value);
+ }
+
+ public CodeWriter declStmt(Class<?> clazz, String varName, String value) {
+ return declStmt(className(clazz), varName, value);
+ }
+
+ public CodeWriter declPrimitiveStmt(LogicalType logicalType, String varName, String value) {
+ return declStmt(primitiveTypeTermForType(logicalType), varName, value);
+ }
+
+ public CodeWriter declPrimitiveStmt(LogicalType logicalType, String varName) {
+ return declStmt(
+ primitiveTypeTermForType(logicalType),
+ varName,
+ primitiveDefaultValue(logicalType));
+ }
+
+ public CodeWriter declStmt(String varType, String varName) {
+ return stmt(varType + " " + varName);
+ }
+
+ public CodeWriter declStmt(Class<?> clazz, String varName) {
+ return declStmt(className(clazz), varName);
+ }
+
+ public CodeWriter assignStmt(String varName, String value) {
+ return stmt(varName + " = " + value);
+ }
+
+ public CodeWriter assignArrayStmt(String varName, String index, String value) {
+ return stmt(varName + "[" + index + "] = " + value);
+ }
+
+ public CodeWriter stmt(String stmt) {
+ builder.append(stmt).append(';').append('\n');
+ return this;
+ }
+
+ public CodeWriter forStmt(
+ String upperBound, BiConsumer<String, CodeWriter> bodyWriterConsumer) {
+ final String indexTerm = newName("i");
+ final CodeWriter innerWriter = new CodeWriter();
+
+ builder.append("for (int ")
+ .append(indexTerm)
+ .append(" = 0; ")
+ .append(indexTerm)
+ .append(" < ")
+ .append(upperBound)
+ .append("; ")
+ .append(indexTerm)
+ .append("++) {\n");
+ bodyWriterConsumer.accept(indexTerm, innerWriter);
+ builder.append(innerWriter).append("}\n");
+
+ return this;
+ }
+
+ public CodeWriter ifStmt(String condition, Consumer<CodeWriter> bodyWriterConsumer) {
+ final CodeWriter innerWriter = new CodeWriter();
+
+ builder.append("if (").append(condition).append(") {\n");
+ bodyWriterConsumer.accept(innerWriter);
+ builder.append(innerWriter).append("}\n");
+
+ return this;
+ }
+
+ public CodeWriter ifStmt(
+ String condition,
+ Consumer<CodeWriter> thenWriterConsumer,
+ Consumer<CodeWriter> elseWriterConsumer) {
+ final CodeWriter thenWriter = new CodeWriter();
+ final CodeWriter elseWriter = new CodeWriter();
+
+ builder.append("if (").append(condition).append(") {\n");
+ thenWriterConsumer.accept(thenWriter);
+ builder.append(thenWriter).append("} else {\n");
+ elseWriterConsumer.accept(elseWriter);
+ builder.append(elseWriter).append("}\n");
+
+ return this;
+ }
+
+ public CodeWriter append(CastCodeBlock codeBlock) {
+ builder.append(codeBlock.getCode());
+ return this;
+ }
+
+ public CodeWriter append(String codeBlock) {
Review comment:
+1
--
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] slinkydeveloper commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
slinkydeveloper commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r743568048
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToStringCastRule.java
##########
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.ArrayType;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ARRAY} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class ArrayToStringCastRule
+ extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final ArrayToStringCastRule INSTANCE = new ArrayToStringCastRule();
+
+ private ArrayToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ARRAY)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((ArrayType) input).getElementType(),
+ target))
+ .build());
+ }
+
+ /* Example generated code for ARRAY<INT>:
+
+ isNull$0 = _myInputIsNull;
Review comment:
Why? This is not a javadoc
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/BinaryToStringCastRule.java
##########
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+
+import java.nio.charset.StandardCharsets;
+
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.accessStaticField;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+
+/**
+ * {@link LogicalTypeFamily#BINARY_STRING} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule.
+ */
+public class BinaryToStringCastRule extends AbstractCharacterFamilyTargetRule<byte[]> {
Review comment:
They can't be package private because `CastRuleProvider` is in rules package.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/BinaryToStringCastRule.java
##########
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+
+import java.nio.charset.StandardCharsets;
+
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.accessStaticField;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+
+/**
+ * {@link LogicalTypeFamily#BINARY_STRING} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule.
+ */
+public class BinaryToStringCastRule extends AbstractCharacterFamilyTargetRule<byte[]> {
+
+ public static final BinaryToStringCastRule INSTANCE = new BinaryToStringCastRule();
+
+ private BinaryToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .input(LogicalTypeFamily.BINARY_STRING)
+ .target(LogicalTypeFamily.CHARACTER_STRING)
+ .build());
+ }
+
+ @Override
+ public String generateStringExpression(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ return constructorCall(
Review comment:
This logic was copied over from `ScalarOperatorGens`, perhaps should we open an issue in https://issues.apache.org/jira/browse/FLINK-24403 about that?
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("(");
+ int f0Value$2 = -1;
+ boolean f0IsNull$3 = _myInput.isNullAt(0);
+ if (!f0IsNull$3) {
+ f0Value$2 = _myInput.getInt(0);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + f0Value$2);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(",");
+ org.apache.flink.table.data.binary.BinaryStringData f1Value$4 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean f1IsNull$5 = _myInput.isNullAt(1);
+ if (!f1IsNull$5) {
+ f1Value$4 = ((org.apache.flink.table.data.binary.BinaryStringData) _myInput.getString(1));
+ builder$1.append(f1Value$4);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(")");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final List<LogicalType> fields =
+ ((RowType) inputLogicalType)
+ .getFields().stream()
+ .map(RowType.RowField::getType)
+ .collect(Collectors.toList());
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final CastRuleUtils.CodeWriter writer =
+ new CastRuleUtils.CodeWriter()
+ .stmt(
+ methodCall(
+ builderTerm,
+ "delete",
+ 0,
+ methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("(")));
+
+ for (int i = 0; i < fields.size(); i++) {
+ final int fieldIndex = i;
+ final LogicalType fieldType = fields.get(fieldIndex);
+
+ final String fieldTerm = newName("f" + fieldIndex + "Value");
+ final String fieldIsNullTerm = newName("f" + fieldIndex + "IsNull");
+
+ final CastCodeBlock codeBlock =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ fieldTerm,
+ fieldIsNullTerm,
+ // Null check is done at the row access level
+ fieldType.copy(false),
+ targetLogicalType);
+
+ // Write the comma
+ if (fieldIndex != 0) {
+ writer.stmt(methodCall(builderTerm, "append", strLiteral(",")));
Review comment:
As for https://github.com/apache/flink/pull/17658#discussion_r743574564, choosing which representation to use is out of scope of this PR. We have an issue open for that already: https://issues.apache.org/jira/browse/FLINK-17321
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("(");
+ int f0Value$2 = -1;
+ boolean f0IsNull$3 = _myInput.isNullAt(0);
+ if (!f0IsNull$3) {
+ f0Value$2 = _myInput.getInt(0);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + f0Value$2);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(",");
+ org.apache.flink.table.data.binary.BinaryStringData f1Value$4 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean f1IsNull$5 = _myInput.isNullAt(1);
+ if (!f1IsNull$5) {
+ f1Value$4 = ((org.apache.flink.table.data.binary.BinaryStringData) _myInput.getString(1));
+ builder$1.append(f1Value$4);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(")");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final List<LogicalType> fields =
+ ((RowType) inputLogicalType)
+ .getFields().stream()
+ .map(RowType.RowField::getType)
+ .collect(Collectors.toList());
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final CastRuleUtils.CodeWriter writer =
+ new CastRuleUtils.CodeWriter()
+ .stmt(
+ methodCall(
+ builderTerm,
+ "delete",
+ 0,
+ methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("(")));
Review comment:
Same as above
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/TimestampToStringCastRule.java
##########
@@ -53,11 +53,11 @@ public String generateStringExpression(
String inputTerm,
LogicalType inputLogicalType,
LogicalType targetLogicalType) {
- String zoneId =
+ final String zoneId =
(inputLogicalType.is(LogicalTypeRoot.TIMESTAMP_WITH_LOCAL_TIME_ZONE))
? context.getSessionTimeZoneTerm()
- : className(DateTimeUtils.class) + ".UTC_ZONE";
Review comment:
The old method was invoking the same method defaulting the zone to `UTC_ZONE`. Note that we don't declare any variable for `UTC_ZONE`, we just statically access to it. The variable is only declared for timestamp_ltz
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToArrayCastRule.java
##########
@@ -68,63 +70,61 @@ protected String generateCodeBlockInternal(
String returnVariable,
LogicalType inputLogicalType,
LogicalType targetLogicalType) {
- LogicalType innerInputType = ((ArrayType) inputLogicalType).getElementType();
- LogicalType innerTargetType = ((ArrayType) targetLogicalType).getElementType();
-
- String innerTargetTypeTerm = arrayElementType(innerTargetType);
- String arraySize = inputTerm + ".size()";
- String objArrayTerm = newName("objArray");
-
- StringBuilder result = new StringBuilder();
- result.append(
- innerTargetTypeTerm
- + "[] "
- + objArrayTerm
- + " = new "
- + innerTargetTypeTerm
- + "["
- + arraySize
- + "];\n");
-
- result.append("for (int i = 0; i < " + arraySize + "; i++) {\n");
- CastCodeBlock codeBlock =
- CastRuleProvider.generateCodeBlock(
- context,
- rowFieldReadAccess("i", inputTerm, innerInputType),
- functionCall(inputTerm + ".isNullAt", "i"),
- innerInputType.copy(false), // Null check is done at the array access level
- innerTargetType);
-
- String innerElementCode =
- codeBlock.getCode()
- + "\n"
- + objArrayTerm
- + "[i] = "
- + codeBlock.getReturnTerm()
- + ";\n";
+ final LogicalType innerInputType = ((ArrayType) inputLogicalType).getElementType();
+ final LogicalType innerTargetType =
+ sanitizeTargetType((ArrayType) inputLogicalType, (ArrayType) targetLogicalType);
+
+ final String innerTargetTypeTerm = arrayElementType(innerTargetType);
+ final String arraySize = methodCall(inputTerm, "size");
+ final String objArrayTerm = newName("objArray");
+
+ return new CastRuleUtils.CodeWriter()
+ .declStmt(
+ innerTargetTypeTerm + "[]",
+ objArrayTerm,
+ newArray(innerTargetTypeTerm, arraySize))
+ .forStmt(
+ arraySize,
+ (index, loopWriter) -> {
+ CastCodeBlock codeBlock =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ rowFieldReadAccess(index, inputTerm, innerInputType),
+ "false",
+ // Null check is done at the array access level
+ innerInputType.copy(false),
+ innerTargetType);
+
+ if (innerTargetType.isNullable()) {
+ loopWriter.ifStmt(
+ "!" + functionCall(inputTerm + ".isNullAt", index),
+ thenWriter ->
+ thenWriter
+ .append(codeBlock)
+ .assignArrayStmt(
+ objArrayTerm,
+ index,
+ codeBlock.getReturnTerm()));
+ } else {
+ loopWriter
+ .append(codeBlock)
+ .assignArrayStmt(
+ objArrayTerm, index, codeBlock.getReturnTerm());
+ }
+ })
+ .assignStmt(returnVariable, constructorCall(GenericArrayData.class, objArrayTerm))
+ .toString();
+ }
- // Add null check if inner type is nullable
- if (innerInputType.isNullable()) {
- result.append("if (" + inputTerm + ".isNullAt(i)) {\n")
- .append(objArrayTerm + "[i] = null;\n")
- .append("} else {\n")
- .append(innerElementCode)
- .append("}\n");
- } else {
- result.append(innerElementCode);
+ private static LogicalType sanitizeTargetType(
+ ArrayType inputArrayType, ArrayType targetArrayType) {
+ LogicalType innerTargetType = targetArrayType.getElementType();
+ // TODO this seems rather a bug of the planner that generates/allows/doesn't sanitize
Review comment:
Gotcha, I've modified the comment to explain why we need that logic.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToStringCastRule.java
##########
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.ArrayType;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ARRAY} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class ArrayToStringCastRule
+ extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final ArrayToStringCastRule INSTANCE = new ArrayToStringCastRule();
+
+ private ArrayToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ARRAY)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((ArrayType) input).getElementType(),
+ target))
+ .build());
+ }
+
+ /* Example generated code for ARRAY<INT>:
+
+ isNull$0 = _myInputIsNull;
Review comment:
Why? This is not a javadoc
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/BinaryToStringCastRule.java
##########
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+
+import java.nio.charset.StandardCharsets;
+
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.accessStaticField;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+
+/**
+ * {@link LogicalTypeFamily#BINARY_STRING} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule.
+ */
+public class BinaryToStringCastRule extends AbstractCharacterFamilyTargetRule<byte[]> {
Review comment:
They can't be package private because `CastRuleProvider` is in rules package.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/BinaryToStringCastRule.java
##########
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+
+import java.nio.charset.StandardCharsets;
+
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.accessStaticField;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+
+/**
+ * {@link LogicalTypeFamily#BINARY_STRING} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule.
+ */
+public class BinaryToStringCastRule extends AbstractCharacterFamilyTargetRule<byte[]> {
+
+ public static final BinaryToStringCastRule INSTANCE = new BinaryToStringCastRule();
+
+ private BinaryToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .input(LogicalTypeFamily.BINARY_STRING)
+ .target(LogicalTypeFamily.CHARACTER_STRING)
+ .build());
+ }
+
+ @Override
+ public String generateStringExpression(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ return constructorCall(
Review comment:
This logic was copied over from `ScalarOperatorGens`, perhaps should we open an issue in https://issues.apache.org/jira/browse/FLINK-24403 about that?
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("(");
+ int f0Value$2 = -1;
+ boolean f0IsNull$3 = _myInput.isNullAt(0);
+ if (!f0IsNull$3) {
+ f0Value$2 = _myInput.getInt(0);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + f0Value$2);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(",");
+ org.apache.flink.table.data.binary.BinaryStringData f1Value$4 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean f1IsNull$5 = _myInput.isNullAt(1);
+ if (!f1IsNull$5) {
+ f1Value$4 = ((org.apache.flink.table.data.binary.BinaryStringData) _myInput.getString(1));
+ builder$1.append(f1Value$4);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(")");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final List<LogicalType> fields =
+ ((RowType) inputLogicalType)
+ .getFields().stream()
+ .map(RowType.RowField::getType)
+ .collect(Collectors.toList());
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final CastRuleUtils.CodeWriter writer =
+ new CastRuleUtils.CodeWriter()
+ .stmt(
+ methodCall(
+ builderTerm,
+ "delete",
+ 0,
+ methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("(")));
+
+ for (int i = 0; i < fields.size(); i++) {
+ final int fieldIndex = i;
+ final LogicalType fieldType = fields.get(fieldIndex);
+
+ final String fieldTerm = newName("f" + fieldIndex + "Value");
+ final String fieldIsNullTerm = newName("f" + fieldIndex + "IsNull");
+
+ final CastCodeBlock codeBlock =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ fieldTerm,
+ fieldIsNullTerm,
+ // Null check is done at the row access level
+ fieldType.copy(false),
+ targetLogicalType);
+
+ // Write the comma
+ if (fieldIndex != 0) {
+ writer.stmt(methodCall(builderTerm, "append", strLiteral(",")));
Review comment:
As for https://github.com/apache/flink/pull/17658#discussion_r743574564, choosing which representation to use is out of scope of this PR. We have an issue open for that already: https://issues.apache.org/jira/browse/FLINK-17321
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("(");
+ int f0Value$2 = -1;
+ boolean f0IsNull$3 = _myInput.isNullAt(0);
+ if (!f0IsNull$3) {
+ f0Value$2 = _myInput.getInt(0);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + f0Value$2);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(",");
+ org.apache.flink.table.data.binary.BinaryStringData f1Value$4 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean f1IsNull$5 = _myInput.isNullAt(1);
+ if (!f1IsNull$5) {
+ f1Value$4 = ((org.apache.flink.table.data.binary.BinaryStringData) _myInput.getString(1));
+ builder$1.append(f1Value$4);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append(")");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final List<LogicalType> fields =
+ ((RowType) inputLogicalType)
+ .getFields().stream()
+ .map(RowType.RowField::getType)
+ .collect(Collectors.toList());
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final CastRuleUtils.CodeWriter writer =
+ new CastRuleUtils.CodeWriter()
+ .stmt(
+ methodCall(
+ builderTerm,
+ "delete",
+ 0,
+ methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("(")));
Review comment:
Same as above
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/TimestampToStringCastRule.java
##########
@@ -53,11 +53,11 @@ public String generateStringExpression(
String inputTerm,
LogicalType inputLogicalType,
LogicalType targetLogicalType) {
- String zoneId =
+ final String zoneId =
(inputLogicalType.is(LogicalTypeRoot.TIMESTAMP_WITH_LOCAL_TIME_ZONE))
? context.getSessionTimeZoneTerm()
- : className(DateTimeUtils.class) + ".UTC_ZONE";
Review comment:
The old method was invoking the same method defaulting the zone to `UTC_ZONE`. Note that we don't declare any variable for `UTC_ZONE`, we just statically access to it. The variable is only declared for timestamp_ltz
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToArrayCastRule.java
##########
@@ -68,63 +70,61 @@ protected String generateCodeBlockInternal(
String returnVariable,
LogicalType inputLogicalType,
LogicalType targetLogicalType) {
- LogicalType innerInputType = ((ArrayType) inputLogicalType).getElementType();
- LogicalType innerTargetType = ((ArrayType) targetLogicalType).getElementType();
-
- String innerTargetTypeTerm = arrayElementType(innerTargetType);
- String arraySize = inputTerm + ".size()";
- String objArrayTerm = newName("objArray");
-
- StringBuilder result = new StringBuilder();
- result.append(
- innerTargetTypeTerm
- + "[] "
- + objArrayTerm
- + " = new "
- + innerTargetTypeTerm
- + "["
- + arraySize
- + "];\n");
-
- result.append("for (int i = 0; i < " + arraySize + "; i++) {\n");
- CastCodeBlock codeBlock =
- CastRuleProvider.generateCodeBlock(
- context,
- rowFieldReadAccess("i", inputTerm, innerInputType),
- functionCall(inputTerm + ".isNullAt", "i"),
- innerInputType.copy(false), // Null check is done at the array access level
- innerTargetType);
-
- String innerElementCode =
- codeBlock.getCode()
- + "\n"
- + objArrayTerm
- + "[i] = "
- + codeBlock.getReturnTerm()
- + ";\n";
+ final LogicalType innerInputType = ((ArrayType) inputLogicalType).getElementType();
+ final LogicalType innerTargetType =
+ sanitizeTargetType((ArrayType) inputLogicalType, (ArrayType) targetLogicalType);
+
+ final String innerTargetTypeTerm = arrayElementType(innerTargetType);
+ final String arraySize = methodCall(inputTerm, "size");
+ final String objArrayTerm = newName("objArray");
+
+ return new CastRuleUtils.CodeWriter()
+ .declStmt(
+ innerTargetTypeTerm + "[]",
+ objArrayTerm,
+ newArray(innerTargetTypeTerm, arraySize))
+ .forStmt(
+ arraySize,
+ (index, loopWriter) -> {
+ CastCodeBlock codeBlock =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ rowFieldReadAccess(index, inputTerm, innerInputType),
+ "false",
+ // Null check is done at the array access level
+ innerInputType.copy(false),
+ innerTargetType);
+
+ if (innerTargetType.isNullable()) {
+ loopWriter.ifStmt(
+ "!" + functionCall(inputTerm + ".isNullAt", index),
+ thenWriter ->
+ thenWriter
+ .append(codeBlock)
+ .assignArrayStmt(
+ objArrayTerm,
+ index,
+ codeBlock.getReturnTerm()));
+ } else {
+ loopWriter
+ .append(codeBlock)
+ .assignArrayStmt(
+ objArrayTerm, index, codeBlock.getReturnTerm());
+ }
+ })
+ .assignStmt(returnVariable, constructorCall(GenericArrayData.class, objArrayTerm))
+ .toString();
+ }
- // Add null check if inner type is nullable
- if (innerInputType.isNullable()) {
- result.append("if (" + inputTerm + ".isNullAt(i)) {\n")
- .append(objArrayTerm + "[i] = null;\n")
- .append("} else {\n")
- .append(innerElementCode)
- .append("}\n");
- } else {
- result.append(innerElementCode);
+ private static LogicalType sanitizeTargetType(
+ ArrayType inputArrayType, ArrayType targetArrayType) {
+ LogicalType innerTargetType = targetArrayType.getElementType();
+ // TODO this seems rather a bug of the planner that generates/allows/doesn't sanitize
Review comment:
Gotcha, I've modified the comment to explain why we need that logic.
--
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 #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958883702
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 aabf462c9d34554539b5ca391419779d191bc0b8 (Wed Nov 03 10:43:20 UTC 2021)
**Warnings:**
* No documentation files were touched! Remember to keep the Flink docs up to date!
<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.
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* aabf462c9d34554539b5ca391419779d191bc0b8 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* aabf462c9d34554539b5ca391419779d191bc0b8 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 6bc3aa42681630f25d03acebb2ba186377ec2c22 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878)
* 00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* aabf462c9d34554539b5ca391419779d191bc0b8 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871)
* 6bc3aa42681630f25d03acebb2ba186377ec2c22 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123)
* 9de90269f89a3d997b4f6083ad68dbe1570b228d 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123)
* 9de90269f89a3d997b4f6083ad68dbe1570b228d 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123)
* 9de90269f89a3d997b4f6083ad68dbe1570b228d 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 9de90269f89a3d997b4f6083ad68dbe1570b228d Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
}, {
"hash" : "0fe4cd3226a442010437c705a1d49b038b5f0cc9",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26163",
"triggerID" : "0fe4cd3226a442010437c705a1d49b038b5f0cc9",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 9de90269f89a3d997b4f6083ad68dbe1570b228d Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129)
* 0fe4cd3226a442010437c705a1d49b038b5f0cc9 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26163)
<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
[GitHub] [flink] matriv commented on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
matriv commented on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-959587919
> @matriv regarding testing the rules in `CastFunctionsITCase`, I effectively found out that the row, array and map rules doesn't work, because some validation steps before (`SqlValidatorImpl` and `LogicalTypeCasts`) thinks the cast combination is invalid. Because the goal of this PR is to simply port the logic from `ScalarOperatorGens` to the new rules, perhaps should we tackle the issue of "exposing" the rules in the context of https://issues.apache.org/jira/browse/FLINK-21456?
Yes of course, my mistake, thought those casts work end to end now.
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* aabf462c9d34554539b5ca391419779d191bc0b8 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* aabf462c9d34554539b5ca391419779d191bc0b8 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871)
* 6bc3aa42681630f25d03acebb2ba186377ec2c22 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878)
<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
[GitHub] [flink] flinkbot commented on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958883702
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043)
* cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051)
* e9d39e4981e0daf3aa8678d15cbe23e44cc829ac 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
[GitHub] [flink] slinkydeveloper commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
slinkydeveloper commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r743574564
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/BinaryToStringCastRule.java
##########
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+
+import java.nio.charset.StandardCharsets;
+
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.accessStaticField;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+
+/**
+ * {@link LogicalTypeFamily#BINARY_STRING} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule.
+ */
+public class BinaryToStringCastRule extends AbstractCharacterFamilyTargetRule<byte[]> {
+
+ public static final BinaryToStringCastRule INSTANCE = new BinaryToStringCastRule();
+
+ private BinaryToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .input(LogicalTypeFamily.BINARY_STRING)
+ .target(LogicalTypeFamily.CHARACTER_STRING)
+ .build());
+ }
+
+ @Override
+ public String generateStringExpression(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ return constructorCall(
Review comment:
This logic was copied over from `ScalarOperatorGens`, perhaps should we open an issue in https://issues.apache.org/jira/browse/FLINK-24403 about that?
--
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] slinkydeveloper commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
slinkydeveloper commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r743577861
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/TimestampToStringCastRule.java
##########
@@ -53,11 +53,11 @@ public String generateStringExpression(
String inputTerm,
LogicalType inputLogicalType,
LogicalType targetLogicalType) {
- String zoneId =
+ final String zoneId =
(inputLogicalType.is(LogicalTypeRoot.TIMESTAMP_WITH_LOCAL_TIME_ZONE))
? context.getSessionTimeZoneTerm()
- : className(DateTimeUtils.class) + ".UTC_ZONE";
Review comment:
The old method was invoking the same method defaulting the zone to `UTC_ZONE`. Note that we don't declare any variable for `UTC_ZONE`, we just statically access to it. The variable is only declared for timestamp_ltz
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043)
* cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051)
<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
[GitHub] [flink] slinkydeveloper commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
slinkydeveloper commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r742113521
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -76,7 +155,77 @@
Thread.currentThread().getContextClassLoader()),
TimestampData.fromLocalDateTime(
LocalDateTime.parse("2021-09-24T12:34:56.123456")),
- StringData.fromString("2021-09-24 14:34:56.123456")),
+ StringData.fromString("2021-09-24 14:34:56.123456"))
Review comment:
Check now
--
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] slinkydeveloper commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
slinkydeveloper commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r742261221
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/MapToStringCastRule.java
##########
@@ -0,0 +1,227 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.MapType;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#MAP} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class MapToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final MapToStringCastRule INSTANCE = new MapToStringCastRule();
+
+ private MapToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.MAP)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((MapType) input).getKeyType(), target)
+ && CastRuleProvider.exists(
+ ((MapType) input).getValueType(), target))
+ .build());
+ }
+
+ /* Example generated code for MAP<STRING, INTERVAL MONTH>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ org.apache.flink.table.data.ArrayData keys$2 = _myInput.keyArray();
+ org.apache.flink.table.data.ArrayData values$3 = _myInput.valueArray();
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("{");
+ for (int i$4 = 0; i$4 < _myInput.size(); i$4++) {
+ if (i$4 != 0) {
+ builder$1.append(", ");
+ }
+ org.apache.flink.table.data.binary.BinaryStringData key$5 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean keyIsNull$6 = keys$2.isNullAt(i$4);
+ int value$7 = -1;
+ boolean valueIsNull$8 = values$3.isNullAt(i$4);
+ if (!keyIsNull$6) {
+ key$5 = ((org.apache.flink.table.data.binary.BinaryStringData) keys$2.getString(i$4));
+ builder$1.append(key$5);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append("=");
+ if (!valueIsNull$8) {
+ value$7 = values$3.getInt(i$4);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString(org.apache.flink.table.utils.DateTimeUtils.intervalYearMonthToString(value$7));
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ }
+ builder$1.append("}");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType keyType = ((MapType) inputLogicalType).getKeyType();
+ final LogicalType valueType = ((MapType) inputLogicalType).getValueType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final String keyArrayTerm = newName("keys");
+ final String valueArrayTerm = newName("values");
+
+ return new CastRuleUtils.CodeWriter()
+ .declStmt(ArrayData.class, keyArrayTerm, methodCall(inputTerm, "keyArray"))
+ .declStmt(ArrayData.class, valueArrayTerm, methodCall(inputTerm, "valueArray"))
+ .stmt(methodCall(builderTerm, "delete", 0, methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("{")))
+ .forStmt(
+ methodCall(inputTerm, "size"),
+ (indexTerm, loopBodyWriter) -> {
+ String keyTerm = newName("key");
+ String keyIsNullTerm = newName("keyIsNull");
+ String valueTerm = newName("value");
+ String valueIsNullTerm = newName("valueIsNull");
+
+ CastCodeBlock keyCast =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ keyTerm,
+ keyIsNullTerm,
+ // Null check is done at the key array access level
+ keyType.copy(false),
+ targetLogicalType);
+ CastCodeBlock valueCast =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ valueTerm,
+ valueIsNullTerm,
+ // Null check is done at the value array access level
+ valueType.copy(false),
+ targetLogicalType);
+
+ loopBodyWriter
+ // Write the comma
+ .ifStmt(
+ indexTerm + " != 0",
+ thenBodyWriter ->
+ thenBodyWriter.stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ strLiteral(", "))))
+ // Declare key and values variables
+ .declPrimitiveStmt(keyType, keyTerm)
+ .declStmt(
+ boolean.class,
+ keyIsNullTerm,
+ methodCall(keyArrayTerm, "isNullAt", indexTerm))
+ .declPrimitiveStmt(valueType, valueTerm)
+ .declStmt(
+ boolean.class,
+ valueIsNullTerm,
+ methodCall(valueArrayTerm, "isNullAt", indexTerm))
+ // Execute casting if inner key/value not null
+ .ifStmt(
+ "!" + keyIsNullTerm,
+ thenBodyWriter ->
+ thenBodyWriter
+ // If key not null, extract it and
+ // execute the cast
+ .assignStmt(
+ keyTerm,
+ rowFieldReadAccess(
+ indexTerm,
+ keyArrayTerm,
+ keyType))
+ .append(keyCast)
+ .stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ keyCast
+ .getReturnTerm())),
+ elseBodyWriter ->
+ elseBodyWriter.stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ strLiteral("NULL"))))
Review comment:
This PR doesn't deal with `<NULL>`, because that's user facing (see `PrintUtils#NULL_COLUMN`), the next PR (for FLINK-24685) will deal with it.
For `NULL`, I've added a constant in `CastRuleUtils`
--
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] matriv commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
matriv commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r741950725
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/AbstractCodeGeneratorCastRule.java
##########
@@ -148,9 +147,10 @@ protected AbstractCodeGeneratorCastRule(CastRulePredicate predicate) {
classCode)
.getConstructors()[0]
.newInstance(constructorArgs);
- } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
+ } catch (Throwable e) {
Review comment:
If possible, would be better to keep listing all possible exceptions.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/AbstractNullAwareCodeGeneratorCastRule.java
##########
@@ -57,41 +57,37 @@ public CastCodeBlock generateCodeBlock(
String inputIsNullTerm,
LogicalType inputType,
LogicalType targetType) {
- StringBuilder resultCode = new StringBuilder();
+ CastRuleUtils.CodeWriter writer = new CastRuleUtils.CodeWriter();
Review comment:
could also be final
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -60,6 +94,51 @@
.fromCase(SMALLINT(), (short) 10, 10L)
.fromCase(TINYINT(), (byte) 10, 10L),
CastTestSpecBuilder.testCastTo(STRING())
+ .fromCase(STRING(), null, null)
+ .fromCase(
+ CHAR(3), StringData.fromString("foo"), StringData.fromString("foo"))
+ .fromCase(
+ VARCHAR(5),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ VARCHAR(10),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ STRING(),
+ StringData.fromString("Apache Flink"),
+ StringData.fromString("Apache Flink"))
+ .fromCase(STRING(), null, null)
+ .fromCase(BOOLEAN(), true, StringData.fromString("true"))
Review comment:
since this is now unit testing, maybe we could test both boolean values.
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -76,7 +155,77 @@
Thread.currentThread().getContextClassLoader()),
TimestampData.fromLocalDateTime(
LocalDateTime.parse("2021-09-24T12:34:56.123456")),
- StringData.fromString("2021-09-24 14:34:56.123456")),
+ StringData.fromString("2021-09-24 14:34:56.123456"))
Review comment:
Maybe you could extract those dates/time/timestamps to static vars, similar to `CastFunctionITCase` so we can always have those default tests, and then use some other date/time values if needed to test some other cases, or edge cases.
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -60,6 +94,51 @@
.fromCase(SMALLINT(), (short) 10, 10L)
.fromCase(TINYINT(), (byte) 10, 10L),
CastTestSpecBuilder.testCastTo(STRING())
+ .fromCase(STRING(), null, null)
+ .fromCase(
+ CHAR(3), StringData.fromString("foo"), StringData.fromString("foo"))
+ .fromCase(
+ VARCHAR(5),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ VARCHAR(10),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ STRING(),
+ StringData.fromString("Apache Flink"),
+ StringData.fromString("Apache Flink"))
+ .fromCase(STRING(), null, null)
Review comment:
this is duplicate
##########
File path: flink-table/flink-table-planner/src/test/resources/log4j2-test.properties
##########
@@ -26,3 +26,9 @@ appender.testlogger.type = CONSOLE
appender.testlogger.target = SYSTEM_ERR
appender.testlogger.layout.type = PatternLayout
appender.testlogger.layout.pattern = %-4r [%t] %-5p %c %x - %m%n
+
+# Uncomment to enable codegen logging
Review comment:
nice!
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -143,9 +308,20 @@ public void run() throws Exception {
this.castContext,
this.inputType.getLogicalType(),
this.targetType.getLogicalType());
- assertNotNull(executor);
+ assertNotNull(
+ executor,
+ "Cannot resolve an executor for input "
+ + this.inputType
+ + " and target "
+ + this.targetType);
assertEquals(this.expectedData, executor.cast(this.inputData));
+
+ // Run twice to make sure rules are reusable without causing issues
+ assertEquals(
Review comment:
nice!
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/MapToStringCastRule.java
##########
@@ -0,0 +1,189 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.MapType;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#MAP} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class MapToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final MapToStringCastRule INSTANCE = new MapToStringCastRule();
+
+ private MapToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.MAP)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((MapType) input).getKeyType(), target)
+ && CastRuleProvider.exists(
+ ((MapType) input).getValueType(), target))
+ .build());
+ }
+
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType keyType = ((MapType) inputLogicalType).getKeyType();
+ final LogicalType valueType = ((MapType) inputLogicalType).getValueType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final String keyArrayTerm = newName("keys");
+ final String valueArrayTerm = newName("values");
+
+ return new CastRuleUtils.CodeWriter()
Review comment:
Could you maybe add a sample generated code for this?
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ @Override
+ protected String generateCodeBlockInternal(
Review comment:
Also here, some generated code example would be nice.
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -60,6 +94,51 @@
.fromCase(SMALLINT(), (short) 10, 10L)
.fromCase(TINYINT(), (byte) 10, 10L),
CastTestSpecBuilder.testCastTo(STRING())
+ .fromCase(STRING(), null, null)
+ .fromCase(
+ CHAR(3), StringData.fromString("foo"), StringData.fromString("foo"))
+ .fromCase(
+ VARCHAR(5),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ VARCHAR(10),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ STRING(),
+ StringData.fromString("Apache Flink"),
+ StringData.fromString("Apache Flink"))
+ .fromCase(STRING(), null, null)
+ .fromCase(BOOLEAN(), true, StringData.fromString("true"))
+ .fromCase(
+ BINARY(2), new byte[] {0, 1}, StringData.fromString("\u0000\u0001"))
+ .fromCase(
+ VARBINARY(3),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ VARBINARY(5),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ BYTES(),
+ new byte[] {0, 1, 2, 3, 4},
+ StringData.fromString("\u0000\u0001\u0002\u0003\u0004"))
+ .fromCase(
+ DECIMAL(4, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 4, 3),
+ StringData.fromString("9.870"))
+ .fromCase(
+ DECIMAL(5, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 5, 3),
+ StringData.fromString("9.870"))
+ .fromCase(TINYINT(), (byte) -125, StringData.fromString("-125"))
+ .fromCase(SMALLINT(), (short) 32767, StringData.fromString("32767"))
+ .fromCase(INT(), -12345678, StringData.fromString("-12345678"))
+ .fromCase(BIGINT(), 1234567891234L, StringData.fromString("1234567891234"))
+ .fromCase(FLOAT(), -123.456f, StringData.fromString("-123.456"))
Review comment:
For float and double maybe check some longer values that will end up with the scientific representation.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToStringCastRule.java
##########
@@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.ArrayType;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ARRAY} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class ArrayToStringCastRule
+ extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final ArrayToStringCastRule INSTANCE = new ArrayToStringCastRule();
+
+ private ArrayToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ARRAY)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((ArrayType) input).getElementType(),
+ target))
+ .build());
+ }
+
+ @Override
+ protected String generateCodeBlockInternal(
Review comment:
Also a sample generated code if you could please.
##########
File path: flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/calls/ScalarOperatorGens.scala
##########
@@ -967,10 +969,20 @@ object ScalarOperatorGens {
inputType,
targetType
)
+
+ val castCode = if (castCodeBlock.getCode.isEmpty) {
+ ""
+ } else {
+ s"\n" +
Review comment:
Maybe worths keeping the comments anyway, to be even more clear that there is no code generated?
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToStringCastRule.java
##########
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.ArrayType;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ARRAY} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class ArrayToStringCastRule
+ extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final ArrayToStringCastRule INSTANCE = new ArrayToStringCastRule();
+
+ private ArrayToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ARRAY)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((ArrayType) input).getElementType(),
+ target))
+ .build());
+ }
+
+ /* Example generated code for ARRAY<INT>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("[");
+ for (int i$2 = 0; i$2 < _myInput.size(); i$2++) {
+ if (i$2 != 0) {
+ builder$1.append(", ");
+ }
+ int element$3 = -1;
+ boolean elementIsNull$4 = _myInput.isNullAt(i$2);
+ if (!elementIsNull$4) {
+ element$3 = _myInput.getInt(i$2);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + element$3);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ }
+ builder$1.append("]");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType innerInputType = ((ArrayType) inputLogicalType).getElementType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ return new CastRuleUtils.CodeWriter()
+ .stmt(methodCall(builderTerm, "delete", 0, methodCall(builderTerm, "length")))
Review comment:
`setLength(0)` could be used instead.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToStringCastRule.java
##########
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.ArrayType;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ARRAY} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class ArrayToStringCastRule
+ extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final ArrayToStringCastRule INSTANCE = new ArrayToStringCastRule();
+
+ private ArrayToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ARRAY)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((ArrayType) input).getElementType(),
+ target))
+ .build());
+ }
+
+ /* Example generated code for ARRAY<INT>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("[");
+ for (int i$2 = 0; i$2 < _myInput.size(); i$2++) {
+ if (i$2 != 0) {
+ builder$1.append(", ");
+ }
+ int element$3 = -1;
+ boolean elementIsNull$4 = _myInput.isNullAt(i$2);
+ if (!elementIsNull$4) {
+ element$3 = _myInput.getInt(i$2);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + element$3);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ }
+ builder$1.append("]");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType innerInputType = ((ArrayType) inputLogicalType).getElementType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ return new CastRuleUtils.CodeWriter()
+ .stmt(methodCall(builderTerm, "delete", 0, methodCall(builderTerm, "length")))
Review comment:
`setLength(0)` could be used instead. I see that delete makes an array copy, where the setLength(0) just "truncates" the buffer.
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -60,6 +94,51 @@
.fromCase(SMALLINT(), (short) 10, 10L)
.fromCase(TINYINT(), (byte) 10, 10L),
CastTestSpecBuilder.testCastTo(STRING())
+ .fromCase(STRING(), null, null)
+ .fromCase(
+ CHAR(3), StringData.fromString("foo"), StringData.fromString("foo"))
+ .fromCase(
+ VARCHAR(5),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ VARCHAR(10),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ STRING(),
+ StringData.fromString("Apache Flink"),
+ StringData.fromString("Apache Flink"))
+ .fromCase(STRING(), null, null)
+ .fromCase(BOOLEAN(), true, StringData.fromString("true"))
+ .fromCase(
+ BINARY(2), new byte[] {0, 1}, StringData.fromString("\u0000\u0001"))
+ .fromCase(
+ VARBINARY(3),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ VARBINARY(5),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ BYTES(),
+ new byte[] {0, 1, 2, 3, 4},
+ StringData.fromString("\u0000\u0001\u0002\u0003\u0004"))
+ .fromCase(
+ DECIMAL(4, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 4, 3),
+ StringData.fromString("9.870"))
+ .fromCase(
+ DECIMAL(5, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 5, 3),
+ StringData.fromString("9.870"))
+ .fromCase(TINYINT(), (byte) -125, StringData.fromString("-125"))
+ .fromCase(SMALLINT(), (short) 32767, StringData.fromString("32767"))
+ .fromCase(INT(), -12345678, StringData.fromString("-12345678"))
+ .fromCase(BIGINT(), 1234567891234L, StringData.fromString("1234567891234"))
+ .fromCase(FLOAT(), -123.456f, StringData.fromString("-123.456"))
Review comment:
not addressed ? or I'm missing something?
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
Review comment:
Is there something missing here? I don't see a for loop.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
Review comment:
ah, The loop is happening in `generateCodeBlockInternal`, please ignore.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/MapToStringCastRule.java
##########
@@ -0,0 +1,227 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.MapType;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#MAP} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class MapToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final MapToStringCastRule INSTANCE = new MapToStringCastRule();
+
+ private MapToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.MAP)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((MapType) input).getKeyType(), target)
+ && CastRuleProvider.exists(
+ ((MapType) input).getValueType(), target))
+ .build());
+ }
+
+ /* Example generated code for MAP<STRING, INTERVAL MONTH>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ org.apache.flink.table.data.ArrayData keys$2 = _myInput.keyArray();
+ org.apache.flink.table.data.ArrayData values$3 = _myInput.valueArray();
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("{");
+ for (int i$4 = 0; i$4 < _myInput.size(); i$4++) {
+ if (i$4 != 0) {
+ builder$1.append(", ");
+ }
+ org.apache.flink.table.data.binary.BinaryStringData key$5 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ boolean keyIsNull$6 = keys$2.isNullAt(i$4);
+ int value$7 = -1;
+ boolean valueIsNull$8 = values$3.isNullAt(i$4);
+ if (!keyIsNull$6) {
+ key$5 = ((org.apache.flink.table.data.binary.BinaryStringData) keys$2.getString(i$4));
+ builder$1.append(key$5);
+ } else {
+ builder$1.append("NULL");
+ }
+ builder$1.append("=");
+ if (!valueIsNull$8) {
+ value$7 = values$3.getInt(i$4);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString(org.apache.flink.table.utils.DateTimeUtils.intervalYearMonthToString(value$7));
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ }
+ builder$1.append("}");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType keyType = ((MapType) inputLogicalType).getKeyType();
+ final LogicalType valueType = ((MapType) inputLogicalType).getValueType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final String keyArrayTerm = newName("keys");
+ final String valueArrayTerm = newName("values");
+
+ return new CastRuleUtils.CodeWriter()
+ .declStmt(ArrayData.class, keyArrayTerm, methodCall(inputTerm, "keyArray"))
+ .declStmt(ArrayData.class, valueArrayTerm, methodCall(inputTerm, "valueArray"))
+ .stmt(methodCall(builderTerm, "delete", 0, methodCall(builderTerm, "length")))
+ .stmt(methodCall(builderTerm, "append", strLiteral("{")))
+ .forStmt(
+ methodCall(inputTerm, "size"),
+ (indexTerm, loopBodyWriter) -> {
+ String keyTerm = newName("key");
+ String keyIsNullTerm = newName("keyIsNull");
+ String valueTerm = newName("value");
+ String valueIsNullTerm = newName("valueIsNull");
+
+ CastCodeBlock keyCast =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ keyTerm,
+ keyIsNullTerm,
+ // Null check is done at the key array access level
+ keyType.copy(false),
+ targetLogicalType);
+ CastCodeBlock valueCast =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ valueTerm,
+ valueIsNullTerm,
+ // Null check is done at the value array access level
+ valueType.copy(false),
+ targetLogicalType);
+
+ loopBodyWriter
+ // Write the comma
+ .ifStmt(
+ indexTerm + " != 0",
+ thenBodyWriter ->
+ thenBodyWriter.stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ strLiteral(", "))))
+ // Declare key and values variables
+ .declPrimitiveStmt(keyType, keyTerm)
+ .declStmt(
+ boolean.class,
+ keyIsNullTerm,
+ methodCall(keyArrayTerm, "isNullAt", indexTerm))
+ .declPrimitiveStmt(valueType, valueTerm)
+ .declStmt(
+ boolean.class,
+ valueIsNullTerm,
+ methodCall(valueArrayTerm, "isNullAt", indexTerm))
+ // Execute casting if inner key/value not null
+ .ifStmt(
+ "!" + keyIsNullTerm,
+ thenBodyWriter ->
+ thenBodyWriter
+ // If key not null, extract it and
+ // execute the cast
+ .assignStmt(
+ keyTerm,
+ rowFieldReadAccess(
+ indexTerm,
+ keyArrayTerm,
+ keyType))
+ .append(keyCast)
+ .stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ keyCast
+ .getReturnTerm())),
+ elseBodyWriter ->
+ elseBodyWriter.stmt(
+ methodCall(
+ builderTerm,
+ "append",
+ strLiteral("NULL"))))
Review comment:
Could you please extract all usages `NULL`, `<NULL>`, etc. to constants in the superclass?
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -76,7 +155,77 @@
Thread.currentThread().getContextClassLoader()),
TimestampData.fromLocalDateTime(
LocalDateTime.parse("2021-09-24T12:34:56.123456")),
- StringData.fromString("2021-09-24 14:34:56.123456")),
+ StringData.fromString("2021-09-24 14:34:56.123456"))
Review comment:
thank you!
--
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] matriv commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
matriv commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r741950725
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/AbstractCodeGeneratorCastRule.java
##########
@@ -148,9 +147,10 @@ protected AbstractCodeGeneratorCastRule(CastRulePredicate predicate) {
classCode)
.getConstructors()[0]
.newInstance(constructorArgs);
- } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
+ } catch (Throwable e) {
Review comment:
If possible, would be better to keep listing all possible exceptions.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/AbstractNullAwareCodeGeneratorCastRule.java
##########
@@ -57,41 +57,37 @@ public CastCodeBlock generateCodeBlock(
String inputIsNullTerm,
LogicalType inputType,
LogicalType targetType) {
- StringBuilder resultCode = new StringBuilder();
+ CastRuleUtils.CodeWriter writer = new CastRuleUtils.CodeWriter();
Review comment:
could also be final
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -60,6 +94,51 @@
.fromCase(SMALLINT(), (short) 10, 10L)
.fromCase(TINYINT(), (byte) 10, 10L),
CastTestSpecBuilder.testCastTo(STRING())
+ .fromCase(STRING(), null, null)
+ .fromCase(
+ CHAR(3), StringData.fromString("foo"), StringData.fromString("foo"))
+ .fromCase(
+ VARCHAR(5),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ VARCHAR(10),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ STRING(),
+ StringData.fromString("Apache Flink"),
+ StringData.fromString("Apache Flink"))
+ .fromCase(STRING(), null, null)
+ .fromCase(BOOLEAN(), true, StringData.fromString("true"))
Review comment:
since this is now unit testing, maybe we could test both boolean values.
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -76,7 +155,77 @@
Thread.currentThread().getContextClassLoader()),
TimestampData.fromLocalDateTime(
LocalDateTime.parse("2021-09-24T12:34:56.123456")),
- StringData.fromString("2021-09-24 14:34:56.123456")),
+ StringData.fromString("2021-09-24 14:34:56.123456"))
Review comment:
Maybe you could extract those dates/time/timestamps to static vars, similar to `CastFunctionITCase` so we can always have those default tests, and then use some other date/time values if needed to test some other cases, or edge cases.
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -60,6 +94,51 @@
.fromCase(SMALLINT(), (short) 10, 10L)
.fromCase(TINYINT(), (byte) 10, 10L),
CastTestSpecBuilder.testCastTo(STRING())
+ .fromCase(STRING(), null, null)
+ .fromCase(
+ CHAR(3), StringData.fromString("foo"), StringData.fromString("foo"))
+ .fromCase(
+ VARCHAR(5),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ VARCHAR(10),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ STRING(),
+ StringData.fromString("Apache Flink"),
+ StringData.fromString("Apache Flink"))
+ .fromCase(STRING(), null, null)
Review comment:
this is duplicate
##########
File path: flink-table/flink-table-planner/src/test/resources/log4j2-test.properties
##########
@@ -26,3 +26,9 @@ appender.testlogger.type = CONSOLE
appender.testlogger.target = SYSTEM_ERR
appender.testlogger.layout.type = PatternLayout
appender.testlogger.layout.pattern = %-4r [%t] %-5p %c %x - %m%n
+
+# Uncomment to enable codegen logging
Review comment:
nice!
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -143,9 +308,20 @@ public void run() throws Exception {
this.castContext,
this.inputType.getLogicalType(),
this.targetType.getLogicalType());
- assertNotNull(executor);
+ assertNotNull(
+ executor,
+ "Cannot resolve an executor for input "
+ + this.inputType
+ + " and target "
+ + this.targetType);
assertEquals(this.expectedData, executor.cast(this.inputData));
+
+ // Run twice to make sure rules are reusable without causing issues
+ assertEquals(
Review comment:
nice!
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/MapToStringCastRule.java
##########
@@ -0,0 +1,189 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.MapType;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#MAP} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class MapToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final MapToStringCastRule INSTANCE = new MapToStringCastRule();
+
+ private MapToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.MAP)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((MapType) input).getKeyType(), target)
+ && CastRuleProvider.exists(
+ ((MapType) input).getValueType(), target))
+ .build());
+ }
+
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType keyType = ((MapType) inputLogicalType).getKeyType();
+ final LogicalType valueType = ((MapType) inputLogicalType).getValueType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ final String keyArrayTerm = newName("keys");
+ final String valueArrayTerm = newName("values");
+
+ return new CastRuleUtils.CodeWriter()
Review comment:
Could you maybe add a sample generated code for this?
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ @Override
+ protected String generateCodeBlockInternal(
Review comment:
Also here, some generated code example would be nice.
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -60,6 +94,51 @@
.fromCase(SMALLINT(), (short) 10, 10L)
.fromCase(TINYINT(), (byte) 10, 10L),
CastTestSpecBuilder.testCastTo(STRING())
+ .fromCase(STRING(), null, null)
+ .fromCase(
+ CHAR(3), StringData.fromString("foo"), StringData.fromString("foo"))
+ .fromCase(
+ VARCHAR(5),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ VARCHAR(10),
+ StringData.fromString("Flink"),
+ StringData.fromString("Flink"))
+ .fromCase(
+ STRING(),
+ StringData.fromString("Apache Flink"),
+ StringData.fromString("Apache Flink"))
+ .fromCase(STRING(), null, null)
+ .fromCase(BOOLEAN(), true, StringData.fromString("true"))
+ .fromCase(
+ BINARY(2), new byte[] {0, 1}, StringData.fromString("\u0000\u0001"))
+ .fromCase(
+ VARBINARY(3),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ VARBINARY(5),
+ new byte[] {0, 1, 2},
+ StringData.fromString("\u0000\u0001\u0002"))
+ .fromCase(
+ BYTES(),
+ new byte[] {0, 1, 2, 3, 4},
+ StringData.fromString("\u0000\u0001\u0002\u0003\u0004"))
+ .fromCase(
+ DECIMAL(4, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 4, 3),
+ StringData.fromString("9.870"))
+ .fromCase(
+ DECIMAL(5, 3),
+ DecimalData.fromBigDecimal(new BigDecimal("9.87"), 5, 3),
+ StringData.fromString("9.870"))
+ .fromCase(TINYINT(), (byte) -125, StringData.fromString("-125"))
+ .fromCase(SMALLINT(), (short) 32767, StringData.fromString("32767"))
+ .fromCase(INT(), -12345678, StringData.fromString("-12345678"))
+ .fromCase(BIGINT(), 1234567891234L, StringData.fromString("1234567891234"))
+ .fromCase(FLOAT(), -123.456f, StringData.fromString("-123.456"))
Review comment:
For float and double maybe check some longer values that will end up with the scientific representation.
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToStringCastRule.java
##########
@@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.ArrayType;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ARRAY} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class ArrayToStringCastRule
+ extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final ArrayToStringCastRule INSTANCE = new ArrayToStringCastRule();
+
+ private ArrayToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ARRAY)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((ArrayType) input).getElementType(),
+ target))
+ .build());
+ }
+
+ @Override
+ protected String generateCodeBlockInternal(
Review comment:
Also a sample generated code if you could please.
##########
File path: flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/calls/ScalarOperatorGens.scala
##########
@@ -967,10 +969,20 @@ object ScalarOperatorGens {
inputType,
targetType
)
+
+ val castCode = if (castCodeBlock.getCode.isEmpty) {
+ ""
+ } else {
+ s"\n" +
Review comment:
Maybe worths keeping the comments anyway, to be even more clear that there is no code generated?
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* e9e7c13e49a07f2e8a2185db90ad4d95741beb87 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892)
* e9e7c13e49a07f2e8a2185db90ad4d95741beb87 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123)
* 9de90269f89a3d997b4f6083ad68dbe1570b228d 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043)
* cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
}, {
"hash" : "0fe4cd3226a442010437c705a1d49b038b5f0cc9",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "0fe4cd3226a442010437c705a1d49b038b5f0cc9",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 9de90269f89a3d997b4f6083ad68dbe1570b228d Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129)
* 0fe4cd3226a442010437c705a1d49b038b5f0cc9 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
}, {
"hash" : "0fe4cd3226a442010437c705a1d49b038b5f0cc9",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "0fe4cd3226a442010437c705a1d49b038b5f0cc9",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123)
* 9de90269f89a3d997b4f6083ad68dbe1570b228d Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129)
* 0fe4cd3226a442010437c705a1d49b038b5f0cc9 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123)
* 9de90269f89a3d997b4f6083ad68dbe1570b228d Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123)
* 9de90269f89a3d997b4f6083ad68dbe1570b228d 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
[GitHub] [flink] slinkydeveloper commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
slinkydeveloper commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r743568048
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToStringCastRule.java
##########
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.ArrayType;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ARRAY} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class ArrayToStringCastRule
+ extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final ArrayToStringCastRule INSTANCE = new ArrayToStringCastRule();
+
+ private ArrayToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ARRAY)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((ArrayType) input).getElementType(),
+ target))
+ .build());
+ }
+
+ /* Example generated code for ARRAY<INT>:
+
+ isNull$0 = _myInputIsNull;
Review comment:
Why? This is not a javadoc
--
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] slinkydeveloper commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
slinkydeveloper commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r743592146
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToArrayCastRule.java
##########
@@ -68,63 +70,61 @@ protected String generateCodeBlockInternal(
String returnVariable,
LogicalType inputLogicalType,
LogicalType targetLogicalType) {
- LogicalType innerInputType = ((ArrayType) inputLogicalType).getElementType();
- LogicalType innerTargetType = ((ArrayType) targetLogicalType).getElementType();
-
- String innerTargetTypeTerm = arrayElementType(innerTargetType);
- String arraySize = inputTerm + ".size()";
- String objArrayTerm = newName("objArray");
-
- StringBuilder result = new StringBuilder();
- result.append(
- innerTargetTypeTerm
- + "[] "
- + objArrayTerm
- + " = new "
- + innerTargetTypeTerm
- + "["
- + arraySize
- + "];\n");
-
- result.append("for (int i = 0; i < " + arraySize + "; i++) {\n");
- CastCodeBlock codeBlock =
- CastRuleProvider.generateCodeBlock(
- context,
- rowFieldReadAccess("i", inputTerm, innerInputType),
- functionCall(inputTerm + ".isNullAt", "i"),
- innerInputType.copy(false), // Null check is done at the array access level
- innerTargetType);
-
- String innerElementCode =
- codeBlock.getCode()
- + "\n"
- + objArrayTerm
- + "[i] = "
- + codeBlock.getReturnTerm()
- + ";\n";
+ final LogicalType innerInputType = ((ArrayType) inputLogicalType).getElementType();
+ final LogicalType innerTargetType =
+ sanitizeTargetType((ArrayType) inputLogicalType, (ArrayType) targetLogicalType);
+
+ final String innerTargetTypeTerm = arrayElementType(innerTargetType);
+ final String arraySize = methodCall(inputTerm, "size");
+ final String objArrayTerm = newName("objArray");
+
+ return new CastRuleUtils.CodeWriter()
+ .declStmt(
+ innerTargetTypeTerm + "[]",
+ objArrayTerm,
+ newArray(innerTargetTypeTerm, arraySize))
+ .forStmt(
+ arraySize,
+ (index, loopWriter) -> {
+ CastCodeBlock codeBlock =
+ CastRuleProvider.generateCodeBlock(
+ context,
+ rowFieldReadAccess(index, inputTerm, innerInputType),
+ "false",
+ // Null check is done at the array access level
+ innerInputType.copy(false),
+ innerTargetType);
+
+ if (innerTargetType.isNullable()) {
+ loopWriter.ifStmt(
+ "!" + functionCall(inputTerm + ".isNullAt", index),
+ thenWriter ->
+ thenWriter
+ .append(codeBlock)
+ .assignArrayStmt(
+ objArrayTerm,
+ index,
+ codeBlock.getReturnTerm()));
+ } else {
+ loopWriter
+ .append(codeBlock)
+ .assignArrayStmt(
+ objArrayTerm, index, codeBlock.getReturnTerm());
+ }
+ })
+ .assignStmt(returnVariable, constructorCall(GenericArrayData.class, objArrayTerm))
+ .toString();
+ }
- // Add null check if inner type is nullable
- if (innerInputType.isNullable()) {
- result.append("if (" + inputTerm + ".isNullAt(i)) {\n")
- .append(objArrayTerm + "[i] = null;\n")
- .append("} else {\n")
- .append(innerElementCode)
- .append("}\n");
- } else {
- result.append(innerElementCode);
+ private static LogicalType sanitizeTargetType(
+ ArrayType inputArrayType, ArrayType targetArrayType) {
+ LogicalType innerTargetType = targetArrayType.getElementType();
+ // TODO this seems rather a bug of the planner that generates/allows/doesn't sanitize
Review comment:
Gotcha, I've modified the comment to explain why we need that logic.
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* e9d39e4981e0daf3aa8678d15cbe23e44cc829ac Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056)
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
<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
[GitHub] [flink] matriv commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
matriv commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r742139129
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/ArrayToStringCastRule.java
##########
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.ArrayType;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ARRAY} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class ArrayToStringCastRule
+ extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final ArrayToStringCastRule INSTANCE = new ArrayToStringCastRule();
+
+ private ArrayToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ARRAY)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && CastRuleProvider.exists(
+ ((ArrayType) input).getElementType(),
+ target))
+ .build());
+ }
+
+ /* Example generated code for ARRAY<INT>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
+ builder$1.delete(0, builder$1.length());
+ builder$1.append("[");
+ for (int i$2 = 0; i$2 < _myInput.size(); i$2++) {
+ if (i$2 != 0) {
+ builder$1.append(", ");
+ }
+ int element$3 = -1;
+ boolean elementIsNull$4 = _myInput.isNullAt(i$2);
+ if (!elementIsNull$4) {
+ element$3 = _myInput.getInt(i$2);
+ result$2 = org.apache.flink.table.data.binary.BinaryStringData.fromString("" + element$3);
+ builder$1.append(result$2);
+ } else {
+ builder$1.append("NULL");
+ }
+ }
+ builder$1.append("]");
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.fromString(builder$1.toString());
+ } else {
+ result$1 = org.apache.flink.table.data.binary.BinaryStringData.EMPTY_UTF8;
+ }
+
+ */
+ @Override
+ protected String generateCodeBlockInternal(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ String returnVariable,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ final LogicalType innerInputType = ((ArrayType) inputLogicalType).getElementType();
+
+ final String builderTerm = newName("builder");
+ context.declareClassField(
+ className(StringBuilder.class), builderTerm, constructorCall(StringBuilder.class));
+
+ return new CastRuleUtils.CodeWriter()
+ .stmt(methodCall(builderTerm, "delete", 0, methodCall(builderTerm, "length")))
Review comment:
`setLength(0)` could be used instead. I see that delete makes an array copy, where the setLength(0) just "truncates" the buffer.
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043)
* cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
* bbf807abdd14e5e730e9d6398093c7ce37592b94 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f 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
[GitHub] [flink] matriv commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
matriv commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r743579018
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/CastRuleUtils.java
##########
@@ -36,4 +49,141 @@ static String functionCall(String functionName, Object... args) {
static String functionCall(Method staticMethod, Object... args) {
return functionCall(CodeGenUtils.qualifyMethod(staticMethod), args);
}
+
+ static String constructorCall(Class<?> clazz, Object... args) {
+ return functionCall("new " + className(clazz), args);
+ }
+
+ static String methodCall(String instanceTerm, String methodName, Object... args) {
+ return functionCall(instanceTerm + "." + methodName, args);
+ }
+
+ static String newArray(String innerType, String arraySize) {
+ return "new " + innerType + "[" + arraySize + "]";
+ }
+
+ static String stringConcat(Object... args) {
+ return Arrays.stream(args).map(Object::toString).collect(Collectors.joining(" + "));
+ }
+
+ static String accessStaticField(Class<?> clazz, String fieldName) {
+ return className(clazz) + "." + fieldName;
+ }
+
+ static String ternaryOperator(String condition, String ifTrue, String ifFalse) {
+ return "((" + condition + ") ? (" + ifTrue + ") : (" + ifFalse + "))";
+ }
+
+ static String strLiteral() {
+ return "\"\"";
+ }
+
+ static String strLiteral(String str) {
+ return "\"" + StringEscapeUtils.escapeJava(str) + "\"";
+ }
+
+ static final class CodeWriter {
+ StringBuilder builder = new StringBuilder();
+
+ public CodeWriter declStmt(String varType, String varName, String value) {
+ return stmt(varType + " " + varName + " = " + value);
+ }
+
+ public CodeWriter declStmt(Class<?> clazz, String varName, String value) {
+ return declStmt(className(clazz), varName, value);
+ }
+
+ public CodeWriter declPrimitiveStmt(LogicalType logicalType, String varName, String value) {
+ return declStmt(primitiveTypeTermForType(logicalType), varName, value);
+ }
+
+ public CodeWriter declPrimitiveStmt(LogicalType logicalType, String varName) {
+ return declStmt(
+ primitiveTypeTermForType(logicalType),
+ varName,
+ primitiveDefaultValue(logicalType));
+ }
+
+ public CodeWriter declStmt(String varType, String varName) {
+ return stmt(varType + " " + varName);
+ }
+
+ public CodeWriter declStmt(Class<?> clazz, String varName) {
+ return declStmt(className(clazz), varName);
+ }
+
+ public CodeWriter assignStmt(String varName, String value) {
+ return stmt(varName + " = " + value);
+ }
+
+ public CodeWriter assignArrayStmt(String varName, String index, String value) {
+ return stmt(varName + "[" + index + "] = " + value);
+ }
+
+ public CodeWriter stmt(String stmt) {
+ builder.append(stmt).append(';').append('\n');
+ return this;
+ }
+
+ public CodeWriter forStmt(
+ String upperBound, BiConsumer<String, CodeWriter> bodyWriterConsumer) {
+ final String indexTerm = newName("i");
+ final CodeWriter innerWriter = new CodeWriter();
+
+ builder.append("for (int ")
+ .append(indexTerm)
+ .append(" = 0; ")
+ .append(indexTerm)
+ .append(" < ")
+ .append(upperBound)
+ .append("; ")
+ .append(indexTerm)
+ .append("++) {\n");
+ bodyWriterConsumer.accept(indexTerm, innerWriter);
+ builder.append(innerWriter).append("}\n");
+
+ return this;
+ }
+
+ public CodeWriter ifStmt(String condition, Consumer<CodeWriter> bodyWriterConsumer) {
+ final CodeWriter innerWriter = new CodeWriter();
+
+ builder.append("if (").append(condition).append(") {\n");
+ bodyWriterConsumer.accept(innerWriter);
+ builder.append(innerWriter).append("}\n");
+
+ return this;
+ }
+
+ public CodeWriter ifStmt(
+ String condition,
+ Consumer<CodeWriter> thenWriterConsumer,
+ Consumer<CodeWriter> elseWriterConsumer) {
+ final CodeWriter thenWriter = new CodeWriter();
+ final CodeWriter elseWriter = new CodeWriter();
+
+ builder.append("if (").append(condition).append(") {\n");
+ thenWriterConsumer.accept(thenWriter);
+ builder.append(thenWriter).append("} else {\n");
+ elseWriterConsumer.accept(elseWriter);
+ builder.append(elseWriter).append("}\n");
+
+ return this;
+ }
+
+ public CodeWriter append(CastCodeBlock codeBlock) {
+ builder.append(codeBlock.getCode());
+ return this;
+ }
+
+ public CodeWriter append(String codeBlock) {
Review comment:
+1
--
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] matriv commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
matriv commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r743578729
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/BinaryToStringCastRule.java
##########
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+
+import java.nio.charset.StandardCharsets;
+
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.accessStaticField;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+
+/**
+ * {@link LogicalTypeFamily#BINARY_STRING} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule.
+ */
+public class BinaryToStringCastRule extends AbstractCharacterFamilyTargetRule<byte[]> {
+
+ public static final BinaryToStringCastRule INSTANCE = new BinaryToStringCastRule();
+
+ private BinaryToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .input(LogicalTypeFamily.BINARY_STRING)
+ .target(LogicalTypeFamily.CHARACTER_STRING)
+ .build());
+ }
+
+ @Override
+ public String generateStringExpression(
+ CodeGeneratorCastRule.Context context,
+ String inputTerm,
+ LogicalType inputLogicalType,
+ LogicalType targetLogicalType) {
+ return constructorCall(
Review comment:
I would say yes, imho, it's better not to mix this refactoring with addressing more issues.
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5b8ef0d842c6c865384ef5bc3304666a1de19e2d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917)
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 54234852c5fb3629dda8af9a1161723c7d38fed5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025)
* 7f404cb87c794bc4ac0d0f28393db28fae87ef4f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* aabf462c9d34554539b5ca391419779d191bc0b8 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871)
<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
[GitHub] [flink] matriv commented on a change in pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
matriv commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r742148765
##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/RowToStringCastRule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.functions.casting.rules;
+
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.planner.functions.casting.CastCodeBlock;
+import org.apache.flink.table.planner.functions.casting.CastRulePredicate;
+import org.apache.flink.table.planner.functions.casting.CastRuleProvider;
+import org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeFamily;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.className;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.newName;
+import static org.apache.flink.table.planner.codegen.CodeGenUtils.rowFieldReadAccess;
+import static org.apache.flink.table.planner.codegen.calls.BuiltInMethods.BINARY_STRING_DATA_FROM_STRING;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.constructorCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.functionCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.methodCall;
+import static org.apache.flink.table.planner.functions.casting.rules.CastRuleUtils.strLiteral;
+
+/** {@link LogicalTypeRoot#ROW} to {@link LogicalTypeFamily#CHARACTER_STRING} cast rule. */
+public class RowToStringCastRule extends AbstractNullAwareCodeGeneratorCastRule<ArrayData, String> {
+
+ public static final RowToStringCastRule INSTANCE = new RowToStringCastRule();
+
+ private RowToStringCastRule() {
+ super(
+ CastRulePredicate.builder()
+ .predicate(
+ (input, target) ->
+ input.is(LogicalTypeRoot.ROW)
+ && target.is(LogicalTypeFamily.CHARACTER_STRING)
+ && ((RowType) input)
+ .getFields().stream()
+ .allMatch(
+ field ->
+ CastRuleProvider
+ .exists(
+ field
+ .getType(),
+ target)))
+ .build());
+ }
+
+ /* Example generated code for ROW<`f0` INT, `f1` STRING>:
+
+ isNull$0 = _myInputIsNull;
+ if (!isNull$0) {
Review comment:
Is there something missing here? I don't see a for loop.
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 6bc3aa42681630f25d03acebb2ba186377ec2c22 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878)
* 00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892)
* e9e7c13e49a07f2e8a2185db90ad4d95741beb87 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895)
<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
[GitHub] [flink] slinkydeveloper commented on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
slinkydeveloper commented on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-959568529
--
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 edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26123",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
}, {
"hash" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129",
"triggerID" : "9de90269f89a3d997b4f6083ad68dbe1570b228d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 9de90269f89a3d997b4f6083ad68dbe1570b228d Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26129)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #17658: [FLINK-24684][table-planner] Add to string cast rules using the new CastRule stack
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17658:
URL: https://github.com/apache/flink/pull/17658#issuecomment-958884763
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25871",
"triggerID" : "aabf462c9d34554539b5ca391419779d191bc0b8",
"triggerType" : "PUSH"
}, {
"hash" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25878",
"triggerID" : "6bc3aa42681630f25d03acebb2ba186377ec2c22",
"triggerType" : "PUSH"
}, {
"hash" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25892",
"triggerID" : "00997f40c9a2f1b8f9d1c4c065d790d87a8ed82c",
"triggerType" : "PUSH"
}, {
"hash" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25895",
"triggerID" : "e9e7c13e49a07f2e8a2185db90ad4d95741beb87",
"triggerType" : "PUSH"
}, {
"hash" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25917",
"triggerID" : "5b8ef0d842c6c865384ef5bc3304666a1de19e2d",
"triggerType" : "PUSH"
}, {
"hash" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7dfe3c64086dbe4ef1981c8e62512cb34552348b",
"triggerType" : "PUSH"
}, {
"hash" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26025",
"triggerID" : "54234852c5fb3629dda8af9a1161723c7d38fed5",
"triggerType" : "PUSH"
}, {
"hash" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26030",
"triggerID" : "7f404cb87c794bc4ac0d0f28393db28fae87ef4f",
"triggerType" : "PUSH"
}, {
"hash" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26043",
"triggerID" : "bbf807abdd14e5e730e9d6398093c7ce37592b94",
"triggerType" : "PUSH"
}, {
"hash" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26051",
"triggerID" : "cbd34f22054a70de3d91d6508b05fdd7d7ae0cc3",
"triggerType" : "PUSH"
}, {
"hash" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26056",
"triggerID" : "e9d39e4981e0daf3aa8678d15cbe23e44cc829ac",
"triggerType" : "PUSH"
}, {
"hash" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062",
"triggerID" : "2b2ea981bbd50f98728012ec5c6d0b2aff946361",
"triggerType" : "PUSH"
}, {
"hash" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "ff2edf06abac54e2c41cc4d11d29feba0e8b6d29",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7dfe3c64086dbe4ef1981c8e62512cb34552348b UNKNOWN
* 2b2ea981bbd50f98728012ec5c6d0b2aff946361 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=26062)
* ff2edf06abac54e2c41cc4d11d29feba0e8b6d29 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