You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/12/03 00:14:49 UTC
[GitHub] [spark] AndrewKL commented on a change in pull request #26740:
[SPARK-30053][SQL] Add the ability for v2 datasource so specify a vacuum
action on the table
AndrewKL commented on a change in pull request #26740: [SPARK-30053][SQL] Add the ability for v2 datasource so specify a vacuum action on the table
URL: https://github.com/apache/spark/pull/26740#discussion_r352927413
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala
##########
@@ -1829,3 +1858,21 @@ class FakeV2Provider extends TableProvider {
throw new UnsupportedOperationException("Unnecessary for DDL tests")
}
}
+
+class VacuumableTableProvider extends TableProvider {
+
+ override def getTable (options: CaseInsensitiveStringMap): Table =
+ new VacuumableTable
+ class VacuumableTable extends Table with SupportsVacuum {
+
+ override def name(): String = "vacuum"
+
+ override def schema(): StructType =
+ StructType(Seq(StructField("id", IntegerType)))
+
+ override def capabilities(): util.Set[TableCapability] =
+ Set(TableCapability.ACCEPT_ANY_SCHEMA).asJava
+
+ override def vacuum(): Unit = {println("VACUUM!!")}
Review comment:
1. This is a test class.
2/3. replaced this with a flag that is set.
----------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org