File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
sql/core/src/test/scala/org/apache/spark/sql/sources Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -395,6 +395,24 @@ class TableScanSuite extends DataSourceTest with SharedSQLContext {
395395 }
396396 }
397397
398+ test(" read the data source tables that do not extend SchemaRelationProvider" ) {
399+ Seq (" TEMPORARY VIEW" , " TABLE" ).foreach { tableType =>
400+ val tableName = " relationProvierWithSchema"
401+ withTable (tableName) {
402+ sql(
403+ s """
404+ |CREATE $tableType $tableName
405+ |USING org.apache.spark.sql.sources.SimpleScanSource
406+ |OPTIONS (
407+ | From '1',
408+ | To '10'
409+ |)
410+ """ .stripMargin)
411+ checkAnswer(spark.table(tableName), spark.range(1 , 11 ).toDF())
412+ }
413+ }
414+ }
415+
398416 test(" SPARK-5196 schema field with comment" ) {
399417 sql(
400418 """
You can’t perform that action at this time.
0 commit comments