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 2019/12/18 03:41:14 UTC

[GitHub] [flink] danny0405 commented on a change in pull request #10595: [Flink-13197] Fix Hive view row type mismatch when expanding in planner

danny0405 commented on a change in pull request #10595: [Flink-13197] Fix Hive view row type mismatch when expanding in planner
URL: https://github.com/apache/flink/pull/10595#discussion_r359139394
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/calcite/FlinkPlannerImpl.scala
 ##########
 @@ -185,19 +185,7 @@ class FlinkPlannerImpl(
     )
     val validator = createSqlValidator(readerWithPathAdjusted)
     val validated = validate(parsed, validator)
-    val equivRel = rel(validated, validator)
-    if (!RelOptUtil.areRowTypesEqual(
-      rowType,
-      equivRel.validatedRowType,
-      true
-    )) {
-      throw new TableException(
-        s"""Could not expand view. Types mismatch.
-           | Expected row type: $rowType
-           | Expanded view type: ${equivRel.validatedRowType}
-           |""".stripMargin)
-    }
-    equivRel
+    rel(validated, validator)
 
 Review comment:
   We shouldn't check it here, because the we fix the type equivalence right after the view was expanded, but because we have fix the problem in `ViewTable#expandView` or Calcite `ViewTable` so i just remove the code snippet because they can never be touched.

----------------------------------------------------------------
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