Skip to content

Commit

Permalink
update test suites
Browse files Browse the repository at this point in the history
  • Loading branch information
gengliangwang committed Jan 24, 2020
1 parent 412dda1 commit 7afda97
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package org.apache.spark.sql.connector
import scala.collection.JavaConverters._
import scala.collection.mutable.ArrayBuffer

import org.apache.spark.SparkConf
import org.apache.spark.sql.{AnalysisException, QueryTest}
import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
import org.apache.spark.sql.connector.catalog.{SupportsRead, SupportsWrite, Table, TableCapability}
Expand Down Expand Up @@ -86,6 +87,11 @@ class FileDataSourceV2FallBackSuite extends QueryTest with SharedSparkSession {
private val dummyReadOnlyFileSourceV2 = classOf[DummyReadOnlyFileDataSourceV2].getName
private val dummyWriteOnlyFileSourceV2 = classOf[DummyWriteOnlyFileDataSourceV2].getName

override protected def sparkConf: SparkConf =
super
.sparkConf
.set(SQLConf.USE_V1_SOURCE_LIST, "")

test("Fall back to v1 when writing to file with read only FileDataSourceV2") {
val df = spark.range(10).toDF()
withTempPath { file =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ abstract class OrcPartitionDiscoveryTest extends OrcTest {
}

class OrcPartitionDiscoverySuite extends OrcPartitionDiscoveryTest with SharedSparkSession {
override protected def sparkConf: SparkConf =
super
.sparkConf
.set(SQLConf.USE_V1_SOURCE_LIST, "")

test("read partitioned table - partition key included in orc file") {
withTempDir { base =>
for {
Expand Down

0 comments on commit 7afda97

Please sign in to comment.