You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/01/31 08:51:46 UTC

[GitHub] [flink] twalthr opened a new pull request #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java

twalthr opened a new pull request #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java
URL: https://github.com/apache/flink/pull/10981
 
 
   ## What is the purpose of the change
   
   Converts the `SqlValidator` extension to Java. This class is likely to extend Calcite. So it makes sense to have it in Java to quickly copy paste code.
   
   ## Brief change log
   
   Class converted to Java.
   
   ## Verifying this change
   
   This change is already covered by existing tests.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] twalthr commented on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java

Posted by GitBox <gi...@apache.org>.
twalthr commented on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java
URL: https://github.com/apache/flink/pull/10981#issuecomment-582325828
 
 
   Master was broken at that time need to rerun Travis.
   
   @flinkbot run travis

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java
URL: https://github.com/apache/flink/pull/10981#issuecomment-580643596
 
 
   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 d8ff9d445eee05afaabbe2d1480ad109647359c6 (Fri Jan 31 08:53:42 UTC 2020)
   
   **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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] twalthr commented on a change in pull request #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java

Posted by GitBox <gi...@apache.org>.
twalthr commented on a change in pull request #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java
URL: https://github.com/apache/flink/pull/10981#discussion_r373433126
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/calcite/FlinkCalciteSqlValidator.java
 ##########
 @@ -0,0 +1,101 @@
+/*
+ * 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.calcite;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.table.api.ValidationException;
+import org.apache.flink.table.types.logical.DecimalType;
+
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeFactory;
+import org.apache.calcite.sql.JoinType;
+import org.apache.calcite.sql.SqlInsert;
+import org.apache.calcite.sql.SqlJoin;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlLiteral;
+import org.apache.calcite.sql.SqlNode;
+import org.apache.calcite.sql.SqlOperatorTable;
+import org.apache.calcite.sql.SqlUtil;
+import org.apache.calcite.sql.validate.SqlConformanceEnum;
+import org.apache.calcite.sql.validate.SqlValidator;
+import org.apache.calcite.sql.validate.SqlValidatorCatalogReader;
+import org.apache.calcite.sql.validate.SqlValidatorImpl;
+import org.apache.calcite.sql.validate.SqlValidatorScope;
+import org.apache.calcite.util.Static;
+
+import java.math.BigDecimal;
+
+import static org.apache.calcite.sql.type.SqlTypeName.DECIMAL;
+import static org.apache.flink.table.planner.utils.ShortcutUtils.unwrapTypeFactory;
+
+/**
+ * Extends Calcite's {@link SqlValidator} by Flink-specific behavior.
+ */
+@Internal
+public final class FlinkCalciteSqlValidator extends SqlValidatorImpl {
+
+	public FlinkCalciteSqlValidator(
+			SqlOperatorTable opTab,
+			SqlValidatorCatalogReader catalogReader,
+			RelDataTypeFactory typeFactory) {
+		super(opTab, catalogReader, typeFactory, SqlConformanceEnum.DEFAULT);
+	}
+
+	@Override
+	protected RelDataType getLogicalSourceRowType(RelDataType sourceRowType, SqlInsert insert) {
+		return unwrapTypeFactory(typeFactory).toSql(sourceRowType);
+	}
+
+	@Override
+	protected RelDataType getLogicalTargetRowType(RelDataType targetRowType, SqlInsert insert) {
+		return unwrapTypeFactory(typeFactory).toSql(targetRowType);
+	}
 
 Review comment:
   Good point. I should not be needed. I removed it. Will merge it once Travis gives green light.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java
URL: https://github.com/apache/flink/pull/10981#issuecomment-580658580
 
 
   <!--
   Meta data
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/146893061 TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708 TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:CANCELED URL:https://travis-ci.com/flink-ci/flink/builds/146893061 TriggerType:MANUAL TriggerID:580695383
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708 TriggerType:MANUAL TriggerID:580695383
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/146910972 TriggerType:PUSH TriggerID:1ca39219468e8c2b41cf684372ca0392f0cb40ca
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4718 TriggerType:PUSH TriggerID:1ca39219468e8c2b41cf684372ca0392f0cb40ca
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/146910972 TriggerType:MANUAL TriggerID:582325828
   Hash:8521ee228a225bd35200056ce794e50f41f69bcf Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:8521ee228a225bd35200056ce794e50f41f69bcf
   -->
   ## CI report:
   
   * d8ff9d445eee05afaabbe2d1480ad109647359c6 Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/146893061) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708) 
   * 1ca39219468e8c2b41cf684372ca0392f0cb40ca Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/146910972) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4718) 
   * 8521ee228a225bd35200056ce794e50f41f69bcf UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java
URL: https://github.com/apache/flink/pull/10981#issuecomment-580658580
 
 
   <!--
   Meta data
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/146893061 TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708 TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:CANCELED URL:https://travis-ci.com/flink-ci/flink/builds/146893061 TriggerType:MANUAL TriggerID:580695383
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708 TriggerType:MANUAL TriggerID:580695383
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/146910972 TriggerType:PUSH TriggerID:1ca39219468e8c2b41cf684372ca0392f0cb40ca
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4718 TriggerType:PUSH TriggerID:1ca39219468e8c2b41cf684372ca0392f0cb40ca
   -->
   ## CI report:
   
   * d8ff9d445eee05afaabbe2d1480ad109647359c6 Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/146893061) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708) 
   * 1ca39219468e8c2b41cf684372ca0392f0cb40ca Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/146910972) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4718) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java
URL: https://github.com/apache/flink/pull/10981#issuecomment-580658580
 
 
   <!--
   Meta data
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/146893061 TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708 TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:CANCELED URL:https://travis-ci.com/flink-ci/flink/builds/146893061 TriggerType:MANUAL TriggerID:580695383
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708 TriggerType:MANUAL TriggerID:580695383
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/146910972 TriggerType:PUSH TriggerID:1ca39219468e8c2b41cf684372ca0392f0cb40ca
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4718 TriggerType:PUSH TriggerID:1ca39219468e8c2b41cf684372ca0392f0cb40ca
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:CANCELED URL:https://travis-ci.com/flink-ci/flink/builds/146910972 TriggerType:MANUAL TriggerID:582325828
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4718 TriggerType:MANUAL TriggerID:582325828
   Hash:8521ee228a225bd35200056ce794e50f41f69bcf Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/147517308 TriggerType:PUSH TriggerID:8521ee228a225bd35200056ce794e50f41f69bcf
   Hash:8521ee228a225bd35200056ce794e50f41f69bcf Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4853 TriggerType:PUSH TriggerID:8521ee228a225bd35200056ce794e50f41f69bcf
   Hash:8521ee228a225bd35200056ce794e50f41f69bcf Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/147517308 TriggerType:MANUAL TriggerID:582854037
   Hash:afdd394907f599e6d38f0337f01ac874339f2166 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:afdd394907f599e6d38f0337f01ac874339f2166
   -->
   ## CI report:
   
   * d8ff9d445eee05afaabbe2d1480ad109647359c6 Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/146893061) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708) 
   * 1ca39219468e8c2b41cf684372ca0392f0cb40ca Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/146910972) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4718) 
   * 8521ee228a225bd35200056ce794e50f41f69bcf Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/147517308) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4853) 
   * afdd394907f599e6d38f0337f01ac874339f2166 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java
URL: https://github.com/apache/flink/pull/10981#issuecomment-580658580
 
 
   <!--
   Meta data
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/146893061 TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708 TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:CANCELED URL:https://travis-ci.com/flink-ci/flink/builds/146893061 TriggerType:MANUAL TriggerID:580695383
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708 TriggerType:MANUAL TriggerID:580695383
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/146910972 TriggerType:PUSH TriggerID:1ca39219468e8c2b41cf684372ca0392f0cb40ca
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4718 TriggerType:PUSH TriggerID:1ca39219468e8c2b41cf684372ca0392f0cb40ca
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:CANCELED URL:https://travis-ci.com/flink-ci/flink/builds/146910972 TriggerType:MANUAL TriggerID:582325828
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4718 TriggerType:MANUAL TriggerID:582325828
   Hash:8521ee228a225bd35200056ce794e50f41f69bcf Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/147517308 TriggerType:PUSH TriggerID:8521ee228a225bd35200056ce794e50f41f69bcf
   Hash:8521ee228a225bd35200056ce794e50f41f69bcf Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4853 TriggerType:PUSH TriggerID:8521ee228a225bd35200056ce794e50f41f69bcf
   Hash:8521ee228a225bd35200056ce794e50f41f69bcf Status:CANCELED URL:https://travis-ci.com/flink-ci/flink/builds/147517308 TriggerType:MANUAL TriggerID:582854037
   Hash:8521ee228a225bd35200056ce794e50f41f69bcf Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4853 TriggerType:MANUAL TriggerID:582854037
   Hash:afdd394907f599e6d38f0337f01ac874339f2166 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/147698724 TriggerType:PUSH TriggerID:afdd394907f599e6d38f0337f01ac874339f2166
   Hash:afdd394907f599e6d38f0337f01ac874339f2166 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4896 TriggerType:PUSH TriggerID:afdd394907f599e6d38f0337f01ac874339f2166
   -->
   ## CI report:
   
   * d8ff9d445eee05afaabbe2d1480ad109647359c6 Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/146893061) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708) 
   * 1ca39219468e8c2b41cf684372ca0392f0cb40ca Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/146910972) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4718) 
   * 8521ee228a225bd35200056ce794e50f41f69bcf Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/147517308) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4853) 
   * afdd394907f599e6d38f0337f01ac874339f2166 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/147698724) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4896) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java
URL: https://github.com/apache/flink/pull/10981#issuecomment-580658580
 
 
   <!--
   Meta data
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/146893061 TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708 TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/146893061 TriggerType:MANUAL TriggerID:580695383
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:1ca39219468e8c2b41cf684372ca0392f0cb40ca
   -->
   ## CI report:
   
   * d8ff9d445eee05afaabbe2d1480ad109647359c6 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/146893061) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708) 
   * 1ca39219468e8c2b41cf684372ca0392f0cb40ca UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java
URL: https://github.com/apache/flink/pull/10981#issuecomment-580658580
 
 
   <!--
   Meta data
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/146893061 TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708 TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:CANCELED URL:https://travis-ci.com/flink-ci/flink/builds/146893061 TriggerType:MANUAL TriggerID:580695383
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708 TriggerType:MANUAL TriggerID:580695383
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/146910972 TriggerType:PUSH TriggerID:1ca39219468e8c2b41cf684372ca0392f0cb40ca
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4718 TriggerType:PUSH TriggerID:1ca39219468e8c2b41cf684372ca0392f0cb40ca
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:CANCELED URL:https://travis-ci.com/flink-ci/flink/builds/146910972 TriggerType:MANUAL TriggerID:582325828
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4718 TriggerType:MANUAL TriggerID:582325828
   Hash:8521ee228a225bd35200056ce794e50f41f69bcf Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/147517308 TriggerType:PUSH TriggerID:8521ee228a225bd35200056ce794e50f41f69bcf
   Hash:8521ee228a225bd35200056ce794e50f41f69bcf Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4853 TriggerType:PUSH TriggerID:8521ee228a225bd35200056ce794e50f41f69bcf
   Hash:8521ee228a225bd35200056ce794e50f41f69bcf Status:CANCELED URL:https://travis-ci.com/flink-ci/flink/builds/147517308 TriggerType:MANUAL TriggerID:582854037
   Hash:8521ee228a225bd35200056ce794e50f41f69bcf Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4853 TriggerType:MANUAL TriggerID:582854037
   Hash:afdd394907f599e6d38f0337f01ac874339f2166 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/147698724 TriggerType:PUSH TriggerID:afdd394907f599e6d38f0337f01ac874339f2166
   Hash:afdd394907f599e6d38f0337f01ac874339f2166 Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4896 TriggerType:PUSH TriggerID:afdd394907f599e6d38f0337f01ac874339f2166
   -->
   ## CI report:
   
   * d8ff9d445eee05afaabbe2d1480ad109647359c6 Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/146893061) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708) 
   * 1ca39219468e8c2b41cf684372ca0392f0cb40ca Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/146910972) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4718) 
   * 8521ee228a225bd35200056ce794e50f41f69bcf Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/147517308) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4853) 
   * afdd394907f599e6d38f0337f01ac874339f2166 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/147698724) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4896) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java
URL: https://github.com/apache/flink/pull/10981#issuecomment-580658580
 
 
   <!--
   Meta data
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/146893061 TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708 TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:CANCELED URL:https://travis-ci.com/flink-ci/flink/builds/146893061 TriggerType:MANUAL TriggerID:580695383
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708 TriggerType:MANUAL TriggerID:580695383
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/146910972 TriggerType:PUSH TriggerID:1ca39219468e8c2b41cf684372ca0392f0cb40ca
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4718 TriggerType:PUSH TriggerID:1ca39219468e8c2b41cf684372ca0392f0cb40ca
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:CANCELED URL:https://travis-ci.com/flink-ci/flink/builds/146910972 TriggerType:MANUAL TriggerID:582325828
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4718 TriggerType:MANUAL TriggerID:582325828
   Hash:8521ee228a225bd35200056ce794e50f41f69bcf Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/147517308 TriggerType:PUSH TriggerID:8521ee228a225bd35200056ce794e50f41f69bcf
   Hash:8521ee228a225bd35200056ce794e50f41f69bcf Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4853 TriggerType:PUSH TriggerID:8521ee228a225bd35200056ce794e50f41f69bcf
   Hash:8521ee228a225bd35200056ce794e50f41f69bcf Status:CANCELED URL:https://travis-ci.com/flink-ci/flink/builds/147517308 TriggerType:MANUAL TriggerID:582854037
   Hash:8521ee228a225bd35200056ce794e50f41f69bcf Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4853 TriggerType:MANUAL TriggerID:582854037
   Hash:afdd394907f599e6d38f0337f01ac874339f2166 Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/147698724 TriggerType:PUSH TriggerID:afdd394907f599e6d38f0337f01ac874339f2166
   Hash:afdd394907f599e6d38f0337f01ac874339f2166 Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4896 TriggerType:PUSH TriggerID:afdd394907f599e6d38f0337f01ac874339f2166
   -->
   ## CI report:
   
   * d8ff9d445eee05afaabbe2d1480ad109647359c6 Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/146893061) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708) 
   * 1ca39219468e8c2b41cf684372ca0392f0cb40ca Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/146910972) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4718) 
   * 8521ee228a225bd35200056ce794e50f41f69bcf Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/147517308) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4853) 
   * afdd394907f599e6d38f0337f01ac874339f2166 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/147698724) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4896) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java
URL: https://github.com/apache/flink/pull/10981#issuecomment-580658580
 
 
   <!--
   Meta data
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/146893061 TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708 TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:CANCELED URL:https://travis-ci.com/flink-ci/flink/builds/146893061 TriggerType:MANUAL TriggerID:580695383
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708 TriggerType:MANUAL TriggerID:580695383
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/146910972 TriggerType:PUSH TriggerID:1ca39219468e8c2b41cf684372ca0392f0cb40ca
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4718 TriggerType:PUSH TriggerID:1ca39219468e8c2b41cf684372ca0392f0cb40ca
   -->
   ## CI report:
   
   * d8ff9d445eee05afaabbe2d1480ad109647359c6 Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/146893061) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708) 
   * 1ca39219468e8c2b41cf684372ca0392f0cb40ca Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/146910972) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4718) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java
URL: https://github.com/apache/flink/pull/10981#issuecomment-580658580
 
 
   <!--
   Meta data
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/146893061 TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708 TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   -->
   ## CI report:
   
   * d8ff9d445eee05afaabbe2d1480ad109647359c6 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/146893061) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] twalthr commented on a change in pull request #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java

Posted by GitBox <gi...@apache.org>.
twalthr commented on a change in pull request #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java
URL: https://github.com/apache/flink/pull/10981#discussion_r373433126
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/calcite/FlinkCalciteSqlValidator.java
 ##########
 @@ -0,0 +1,101 @@
+/*
+ * 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.calcite;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.table.api.ValidationException;
+import org.apache.flink.table.types.logical.DecimalType;
+
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeFactory;
+import org.apache.calcite.sql.JoinType;
+import org.apache.calcite.sql.SqlInsert;
+import org.apache.calcite.sql.SqlJoin;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlLiteral;
+import org.apache.calcite.sql.SqlNode;
+import org.apache.calcite.sql.SqlOperatorTable;
+import org.apache.calcite.sql.SqlUtil;
+import org.apache.calcite.sql.validate.SqlConformanceEnum;
+import org.apache.calcite.sql.validate.SqlValidator;
+import org.apache.calcite.sql.validate.SqlValidatorCatalogReader;
+import org.apache.calcite.sql.validate.SqlValidatorImpl;
+import org.apache.calcite.sql.validate.SqlValidatorScope;
+import org.apache.calcite.util.Static;
+
+import java.math.BigDecimal;
+
+import static org.apache.calcite.sql.type.SqlTypeName.DECIMAL;
+import static org.apache.flink.table.planner.utils.ShortcutUtils.unwrapTypeFactory;
+
+/**
+ * Extends Calcite's {@link SqlValidator} by Flink-specific behavior.
+ */
+@Internal
+public final class FlinkCalciteSqlValidator extends SqlValidatorImpl {
+
+	public FlinkCalciteSqlValidator(
+			SqlOperatorTable opTab,
+			SqlValidatorCatalogReader catalogReader,
+			RelDataTypeFactory typeFactory) {
+		super(opTab, catalogReader, typeFactory, SqlConformanceEnum.DEFAULT);
+	}
+
+	@Override
+	protected RelDataType getLogicalSourceRowType(RelDataType sourceRowType, SqlInsert insert) {
+		return unwrapTypeFactory(typeFactory).toSql(sourceRowType);
+	}
+
+	@Override
+	protected RelDataType getLogicalTargetRowType(RelDataType targetRowType, SqlInsert insert) {
+		return unwrapTypeFactory(typeFactory).toSql(targetRowType);
+	}
 
 Review comment:
   Good point. I should be needed. I removed it. Will merge it once Travis gives green light.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] twalthr commented on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java

Posted by GitBox <gi...@apache.org>.
twalthr commented on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java
URL: https://github.com/apache/flink/pull/10981#issuecomment-580695383
 
 
   @flinkbot run travis

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java
URL: https://github.com/apache/flink/pull/10981#issuecomment-580658580
 
 
   <!--
   Meta data
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   -->
   ## CI report:
   
   * d8ff9d445eee05afaabbe2d1480ad109647359c6 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] twalthr commented on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java

Posted by GitBox <gi...@apache.org>.
twalthr commented on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java
URL: https://github.com/apache/flink/pull/10981#issuecomment-582854037
 
 
   @flinkbot run travis
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] twalthr closed pull request #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java

Posted by GitBox <gi...@apache.org>.
twalthr closed pull request #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java
URL: https://github.com/apache/flink/pull/10981
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java
URL: https://github.com/apache/flink/pull/10981#issuecomment-580658580
 
 
   <!--
   Meta data
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/146893061 TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708 TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   -->
   ## CI report:
   
   * d8ff9d445eee05afaabbe2d1480ad109647359c6 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/146893061) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java
URL: https://github.com/apache/flink/pull/10981#issuecomment-580658580
 
 
   <!--
   Meta data
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/146893061 TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708 TriggerType:PUSH TriggerID:d8ff9d445eee05afaabbe2d1480ad109647359c6
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:CANCELED URL:https://travis-ci.com/flink-ci/flink/builds/146893061 TriggerType:MANUAL TriggerID:580695383
   Hash:d8ff9d445eee05afaabbe2d1480ad109647359c6 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708 TriggerType:MANUAL TriggerID:580695383
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/146910972 TriggerType:PUSH TriggerID:1ca39219468e8c2b41cf684372ca0392f0cb40ca
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4718 TriggerType:PUSH TriggerID:1ca39219468e8c2b41cf684372ca0392f0cb40ca
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:CANCELED URL:https://travis-ci.com/flink-ci/flink/builds/146910972 TriggerType:MANUAL TriggerID:582325828
   Hash:1ca39219468e8c2b41cf684372ca0392f0cb40ca Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4718 TriggerType:MANUAL TriggerID:582325828
   Hash:8521ee228a225bd35200056ce794e50f41f69bcf Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/147517308 TriggerType:PUSH TriggerID:8521ee228a225bd35200056ce794e50f41f69bcf
   Hash:8521ee228a225bd35200056ce794e50f41f69bcf Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4853 TriggerType:PUSH TriggerID:8521ee228a225bd35200056ce794e50f41f69bcf
   -->
   ## CI report:
   
   * d8ff9d445eee05afaabbe2d1480ad109647359c6 Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/146893061) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4708) 
   * 1ca39219468e8c2b41cf684372ca0392f0cb40ca Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/146910972) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4718) 
   * 8521ee228a225bd35200056ce794e50f41f69bcf Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/147517308) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4853) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] dawidwys commented on a change in pull request #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java

Posted by GitBox <gi...@apache.org>.
dawidwys commented on a change in pull request #10981: [hotfix][table] Convert FlinkCalciteSqlValidator to Java
URL: https://github.com/apache/flink/pull/10981#discussion_r373424870
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/calcite/FlinkCalciteSqlValidator.java
 ##########
 @@ -0,0 +1,101 @@
+/*
+ * 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.calcite;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.table.api.ValidationException;
+import org.apache.flink.table.types.logical.DecimalType;
+
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeFactory;
+import org.apache.calcite.sql.JoinType;
+import org.apache.calcite.sql.SqlInsert;
+import org.apache.calcite.sql.SqlJoin;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlLiteral;
+import org.apache.calcite.sql.SqlNode;
+import org.apache.calcite.sql.SqlOperatorTable;
+import org.apache.calcite.sql.SqlUtil;
+import org.apache.calcite.sql.validate.SqlConformanceEnum;
+import org.apache.calcite.sql.validate.SqlValidator;
+import org.apache.calcite.sql.validate.SqlValidatorCatalogReader;
+import org.apache.calcite.sql.validate.SqlValidatorImpl;
+import org.apache.calcite.sql.validate.SqlValidatorScope;
+import org.apache.calcite.util.Static;
+
+import java.math.BigDecimal;
+
+import static org.apache.calcite.sql.type.SqlTypeName.DECIMAL;
+import static org.apache.flink.table.planner.utils.ShortcutUtils.unwrapTypeFactory;
+
+/**
+ * Extends Calcite's {@link SqlValidator} by Flink-specific behavior.
+ */
+@Internal
+public final class FlinkCalciteSqlValidator extends SqlValidatorImpl {
+
+	public FlinkCalciteSqlValidator(
+			SqlOperatorTable opTab,
+			SqlValidatorCatalogReader catalogReader,
+			RelDataTypeFactory typeFactory) {
+		super(opTab, catalogReader, typeFactory, SqlConformanceEnum.DEFAULT);
+	}
+
+	@Override
+	protected RelDataType getLogicalSourceRowType(RelDataType sourceRowType, SqlInsert insert) {
+		return unwrapTypeFactory(typeFactory).toSql(sourceRowType);
+	}
+
+	@Override
+	protected RelDataType getLogicalTargetRowType(RelDataType targetRowType, SqlInsert insert) {
+		return unwrapTypeFactory(typeFactory).toSql(targetRowType);
+	}
 
 Review comment:
   Just out of curiosity. Do we need those methods?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services