Github user xuanyuanking commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22467#discussion_r218846178
  
    --- Diff: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveParquetSourceSuite.scala 
---
    @@ -0,0 +1,220 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.spark.sql.hive
    +
    +import java.io.File
    +
    +import org.apache.spark.sql.{Row, SaveMode}
    +import org.apache.spark.sql.catalyst.catalog.HiveTableRelation
    +import org.apache.spark.sql.execution.datasources.LogicalRelation
    +import org.apache.spark.sql.internal.SQLConf
    +import org.apache.spark.sql.types._
    +import org.apache.spark.util.Utils
    +
    +/**
    + * A suite of tests for the Parquet support through the data sources API.
    + */
    +class HiveParquetSourceSuite extends ParquetPartitioningTest {
    +  import testImplicits._
    +  import spark._
    +
    +  override def beforeAll(): Unit = {
    +    super.beforeAll()
    +    dropTables("partitioned_parquet",
    +      "partitioned_parquet_with_key",
    +      "partitioned_parquet_with_complextypes",
    +      "partitioned_parquet_with_key_and_complextypes",
    +      "normal_parquet")
    +
    +    sql( s"""
    +      CREATE TEMPORARY VIEW partitioned_parquet
    +      USING org.apache.spark.sql.parquet
    +      OPTIONS (
    +        path '${partitionedTableDir.toURI}'
    +      )
    +    """)
    +
    +    sql( s"""
    +      CREATE TEMPORARY VIEW partitioned_parquet_with_key
    +      USING org.apache.spark.sql.parquet
    +      OPTIONS (
    +        path '${partitionedTableDirWithKey.toURI}'
    +      )
    +    """)
    +
    +    sql( s"""
    +      CREATE TEMPORARY VIEW normal_parquet
    +      USING org.apache.spark.sql.parquet
    +      OPTIONS (
    +        path '${new File(partitionedTableDir, "p=1").toURI}'
    +      )
    +    """)
    +
    +    sql( s"""
    +      CREATE TEMPORARY VIEW partitioned_parquet_with_key_and_complextypes
    +      USING org.apache.spark.sql.parquet
    +      OPTIONS (
    +        path '${partitionedTableDirWithKeyAndComplexTypes.toURI}'
    +      )
    +    """)
    +
    +    sql( s"""
    +      CREATE TEMPORARY VIEW partitioned_parquet_with_complextypes
    +      USING org.apache.spark.sql.parquet
    +      OPTIONS (
    +        path '${partitionedTableDirWithComplexTypes.toURI}'
    +      )
    +    """)
    +  }
    +
    +  test("SPARK-6016 make sure to use the latest footers") {
    +    sql("drop table if exists spark_6016_fix")
    --- End diff --
    
    This case can be wrapped with `withTable("spark_6016_fix")`


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to