You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by gatorsmile <gi...@git.apache.org> on 2018/04/27 07:01:35 UTC

[GitHub] spark pull request #21174: [SPARK-24085][SQL] Query returns UnsupportedOpera...

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

    https://github.com/apache/spark/pull/21174#discussion_r184606904
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/SubquerySuite.scala ---
    @@ -955,4 +955,28 @@ class SubquerySuite extends QueryTest with SharedSQLContext {
         // before the fix this would throw AnalysisException
         spark.range(10).where("(id,id) in (select id, null from range(3))").count
       }
    +
    +  test("SPARK-24085 scalar subquery in partitioning expression") {
    +    withTempPath { tempDir =>
    +      withTable("parquet_part") {
    +        sql(
    +          s"""
    +             |CREATE TABLE parquet_part (id_value string, id_type string)
    +             |USING PARQUET
    +             |OPTIONS (
    +             |  path '${tempDir.toURI}'
    +             |)
    +             |PARTITIONED BY (id_type)
    --- End diff --
    
    ```Scala
            Seq("1" -> "a", "2" -> "a", "3" -> "b", "4" -> "b")
              .toDF("id_value", "id_type")
              .write
              .mode(SaveMode.Overwrite)
              .partitionBy("id_type")
              .format("parquet")
              .saveAsTable("parquet_part")
    ```


---

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