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:
[email protected]


With regards,
Apache Git Services

Reply via email to