rdblue commented on a change in pull request #25955: [SPARK-29277][SQL] Add
early DSv2 filter and projection pushdown
URL: https://github.com/apache/spark/pull/25955#discussion_r337110099
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
##########
@@ -97,9 +97,24 @@ trait CheckAnalysis extends PredicateHelper {
case InsertIntoStatement(u: UnresolvedRelation, _, _, _, _) =>
failAnalysis(s"Table not found: ${u.multipartIdentifier.quoted}")
- case u: UnresolvedV2Relation if isView(u.originalNameParts) =>
- u.failAnalysis(
- s"Invalid command: '${u.originalNameParts.quoted}' is a view not a
table.")
+ case InsertIntoStatement(u: UnresolvedV2Relation, _, _, _, _)
+ if isView(u.originalNameParts) =>
+ u.failAnalysis(s"Invalid command: '${u.originalNameParts.quoted}' is a
view not a table.")
+
+ case InsertIntoStatement(u: UnresolvedV2Relation, _, _, _, _) =>
+ failAnalysis(s"Table not found: ${u.originalNameParts.quoted}")
+
+ case statement: ParsedTableStatement if isView(statement.tableName) =>
+ failAnalysis(s"Invalid command: '${statement.tableName.quoted}' is a
view not a table.")
+
+ case statement: ParsedTableStatement if isView(statement.tableName) =>
Review comment:
Yes, it should not have the `if isView` part.
----------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]