rdblue commented on a change in pull request #25651: [SPARK-28948][SQL] support
data source v2 in CREATE TABLE USING
URL: https://github.com/apache/spark/pull/25651#discussion_r320516906
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2ScanSupportCheck.scala
##########
@@ -20,17 +20,20 @@ package org.apache.spark.sql.execution.datasources.v2
import org.apache.spark.sql.AnalysisException
import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
import org.apache.spark.sql.execution.streaming.{StreamingRelation,
StreamingRelationV2}
-import org.apache.spark.sql.sources.v2.TableCapability.{CONTINUOUS_READ,
MICRO_BATCH_READ}
+import org.apache.spark.sql.sources.v2.TableCapability.{BATCH_READ,
CONTINUOUS_READ, MICRO_BATCH_READ}
/**
* This rules adds some basic table capability check for streaming scan,
without knowing the actual
* streaming execution mode.
*/
-object V2StreamingScanSupportCheck extends (LogicalPlan => Unit) {
+object V2ScanSupportCheck extends (LogicalPlan => Unit) {
import DataSourceV2Implicits._
override def apply(plan: LogicalPlan): Unit = {
plan.foreach {
+ case r: DataSourceV2Relation if !r.table.supports(BATCH_READ) =>
+ throw new AnalysisException(
+ s"Table ${r.table.name()} does not support batch scan.")
Review comment:
Why was this change included here and not in a separate PR?
----------------------------------------------------------------
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]