You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by wangyum <gi...@git.apache.org> on 2018/08/29 06:49:42 UTC

[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

GitHub user wangyum opened a pull request:

    https://github.com/apache/spark/pull/22263

    [SPARK-25269][SQL] SQL interface support specify StorageLevel when cache table

    ## What changes were proposed in this pull request?
    
    SQL interface support specify `StorageLevel` when cache table. The semantic is like this:
    ```sql
    CACHE DISK_ONLY TABLE tableName;
    ```
    All supported `StorageLevel` is:
    https://github.com/apache/spark/blob/eefdf9f9dd8afde49ad7d4e230e2735eb817ab0a/core/src/main/scala/org/apache/spark/storage/StorageLevel.scala#L172-L183
    
    ## How was this patch tested?
    
    unit tests and manual tests
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/wangyum/spark SPARK-25269

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/22263.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #22263
    
----
commit 9e058d1b402dec85982a880bf086268a1dcec99e
Author: Yuming Wang <yu...@...>
Date:   2018-08-29T06:31:44Z

    SQL interface support specify StorageLevel when cache table

----


---

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


[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22263#discussion_r226184242
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala ---
    @@ -288,6 +297,65 @@ class CachedTableSuite extends QueryTest with SQLTestUtils with SharedSQLContext
         }
       }
     
    +  test("SQL interface support storageLevel(DISK_ONLY)") {
    --- End diff --
    
    @wangyum . Originally, I thought you can make a utility function for those 4 test cases. 
    The utility function can accept `sql` statement and `storagelevel`. Then, 4 test cases will have simpler body.
    > They are mostly the same except SQL statements and StorageLevels.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97379 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97379/testReport)** for PR 22263 at commit [`8809311`](https://github.com/apache/spark/commit/8809311fd6382b77b728e790bf303b2c13e77b9b).


---

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


[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

Posted by maropu <gi...@git.apache.org>.
Github user maropu commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22263#discussion_r213904343
  
    --- Diff: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 ---
    @@ -162,7 +162,8 @@ statement
             tableIdentifier partitionSpec? describeColName?                #describeTable
         | REFRESH TABLE tableIdentifier                                    #refreshTable
         | REFRESH (STRING | .*?)                                           #refreshResource
    -    | CACHE LAZY? TABLE tableIdentifier (AS? query)?                   #cacheTable
    +    | CACHE LAZY? storageLevel=identifier? TABLE
    +        tableIdentifier (AS? query)?                                   #cacheTable
    --- End diff --
    
    As another syntax option, how about this?
    ```
    CACHE TABLE testTable OPTIONS ('storageLevel'='disk_only')
    UNCACHE TABLE testTable OPTION ('cascade'='true', 'blocking'='true')
    ```


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97354 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97354/testReport)** for PR 22263 at commit [`c3b6dfc`](https://github.com/apache/spark/commit/c3b6dfcee106c4d0e38975b1a31c3f3e97d2abc1).


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Sure, @maropu !


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

Posted by wangyum <gi...@git.apache.org>.
Github user wangyum commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22263#discussion_r219490742
  
    --- Diff: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 ---
    @@ -162,7 +162,8 @@ statement
             tableIdentifier partitionSpec? describeColName?                #describeTable
         | REFRESH TABLE tableIdentifier                                    #refreshTable
         | REFRESH (STRING | .*?)                                           #refreshResource
    -    | CACHE LAZY? TABLE tableIdentifier (AS? query)?                   #cacheTable
    +    | CACHE LAZY? storageLevel=identifier? TABLE
    +        tableIdentifier (AS? query)?                                   #cacheTable
    --- End diff --
    
    Thanks @maropu, I changed to option.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/4071/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #95408 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95408/testReport)** for PR 22263 at commit [`7b90351`](https://github.com/apache/spark/commit/7b90351134d27da58d96dbcc15bcf8b275cde695).


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/4121/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97356 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97356/testReport)** for PR 22263 at commit [`8457d8b`](https://github.com/apache/spark/commit/8457d8b8bb6373fc09464350c02dfdc63b017d6e).


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/97356/
    Test FAILed.


---

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


[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

Posted by wangyum <gi...@git.apache.org>.
Github user wangyum commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22263#discussion_r226182333
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala ---
    @@ -288,6 +297,65 @@ class CachedTableSuite extends QueryTest with SQLTestUtils with SharedSQLContext
         }
       }
     
    +  test("SQL interface support storageLevel(DISK_ONLY)") {
    --- End diff --
    
    @dongjoon-hyun  Such test cases don't seem to be clear. Can we use the original 4 test cases?


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97476 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97476/testReport)** for PR 22263 at commit [`5e088b8`](https://github.com/apache/spark/commit/5e088b86822dd6b1bf4c3bb085fde3c96af03658).


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by wangyum <gi...@git.apache.org>.
Github user wangyum commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    retest this please


---

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


[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22263#discussion_r225005803
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala ---
    @@ -288,6 +297,69 @@ class CachedTableSuite extends QueryTest with SQLTestUtils with SharedSQLContext
         }
       }
     
    +  test("SQL interface support storageLevel(DISK_ONLY)") {
    +    sql("CACHE TABLE testData OPTIONS('storageLevel' 'DISK_ONLY')")
    +    assertCached(spark.table("testData"))
    +    val rddId = rddIdOf("testData")
    +    assert(isExpectStorageLevel(rddId, Disk))
    +    assert(!isExpectStorageLevel(rddId, Memory))
    --- End diff --
    
    Do we need line 305 when we have line 304?


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/3957/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by maropu <gi...@git.apache.org>.
Github user maropu commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    @dongjoon-hyun can you do a final check and merge this ?


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97512 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97512/testReport)** for PR 22263 at commit [`89502dc`](https://github.com/apache/spark/commit/89502dc912156f1b6f762a6989216a82d329d4b6).


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/95408/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #96433 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/96433/testReport)** for PR 22263 at commit [`c3b6dfc`](https://github.com/apache/spark/commit/c3b6dfcee106c4d0e38975b1a31c3f3e97d2abc1).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22263#discussion_r226380114
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala ---
    @@ -64,6 +67,13 @@ class CachedTableSuite extends QueryTest with SQLTestUtils with SharedSQLContext
         maybeBlock.nonEmpty
       }
     
    +  def isExpectStorageLevel(rddId: Int, level: DataReadMethod.DataReadMethod): Boolean = {
    --- End diff --
    
    `DataReadMethod.DataReadMethod` -> `DataReadMethod` and 
    remove line 25, `import org.apache.spark.executor.DataReadMethod`.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/97512/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by wangyum <gi...@git.apache.org>.
Github user wangyum commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    retest this please.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/95628/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/2660/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by wangyum <gi...@git.apache.org>.
Github user wangyum commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    retest this please


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/4048/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/3959/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/2662/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97598 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97598/testReport)** for PR 22263 at commit [`e2b5dcf`](https://github.com/apache/spark/commit/e2b5dcfc853b6f5608b27c914c397689d09cb267).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97528 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97528/testReport)** for PR 22263 at commit [`c7d4b82`](https://github.com/apache/spark/commit/c7d4b8228129f5a48b087d7e299a75dd61e1ff2b).


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/4039/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97606 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97606/testReport)** for PR 22263 at commit [`e2b5dcf`](https://github.com/apache/spark/commit/e2b5dcfc853b6f5608b27c914c397689d09cb267).


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/3955/
    Test PASSed.


---

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


[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22263#discussion_r224977190
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala ---
    @@ -288,6 +297,68 @@ class CachedTableSuite extends QueryTest with SQLTestUtils with SharedSQLContext
         }
       }
     
    +  test("SQL interface support storageLevel(DISK_ONLY)") {
    +    sql("CACHE TABLE testData OPTIONS('storageLevel' 'DISK_ONLY')")
    +    assertCached(spark.table("testData"))
    +    val rddId = rddIdOf("testData")
    +    assert(isExpectStorageLevel(rddId, Disk))
    +    assert(!isExpectStorageLevel(rddId, Memory))
    +    spark.catalog.uncacheTable("testData")
    +  }
    +
    +  test("SQL interface select from table support storageLevel(DISK_ONLY)") {
    +    sql("CACHE TABLE testSelect OPTIONS('storageLevel' 'DISK_ONLY') select * from testData")
    +    assertCached(spark.table("testSelect"))
    +    val rddId = rddIdOf("testSelect")
    +    assert(isExpectStorageLevel(rddId, Disk))
    +    assert(!isExpectStorageLevel(rddId, Memory))
    +    spark.catalog.uncacheTable("testSelect")
    +  }
    +
    +  test("SQL interface support storageLevel(DISK_ONLY) with invalid options") {
    +    sql("CACHE TABLE testData OPTIONS('storageLevel' 'DISK_ONLY', 'a' '1', 'b' '2')")
    +    assertCached(spark.table("testData"))
    +    val rddId = rddIdOf("testData")
    +    assert(isExpectStorageLevel(rddId, Disk))
    +    assert(!isExpectStorageLevel(rddId, Memory))
    +    spark.catalog.uncacheTable("testData")
    +  }
    +
    +  test("SQL interface support storageLevel(MEMORY_ONLY)") {
    +    sql("CACHE TABLE testData OPTIONS('storageLevel' 'MEMORY_ONLY')")
    +    assertCached(spark.table("testData"))
    +    val rddId = rddIdOf("testData")
    +    assert(!isExpectStorageLevel(rddId, Disk))
    +    assert(isExpectStorageLevel(rddId, Memory))
    +  }
    +
    +  test("SQL interface support storageLevel(Invalid StorageLevel)") {
    +    val message = intercept[IllegalArgumentException] {
    +      sql("CACHE TABLE testData OPTIONS('storageLevel' 'invalid_storage_level')")
    +    }.getMessage
    +    assert(message.contains("Invalid StorageLevel: INVALID_STORAGE_LEVEL"))
    +  }
    +
    +  test("SQL interface support storageLevel(with LAZY)") {
    +    sql("CACHE LAZY TABLE testData OPTIONS('storageLevel' 'disk_only')")
    +    assertCached(spark.table("testData"))
    +
    +    val rddId = rddIdOf("testData")
    +    assert(
    +      !isMaterialized(rddId),
    +      "Lazily cached in-memory table shouldn't be materialized eagerly")
    +
    +    sql("SELECT COUNT(*) FROM testData").collect()
    +    assert(
    +      isMaterialized(rddId),
    +      "Lazily cached in-memory table should have been materialized")
    +
    --- End diff --
    
    We didn't check the storage level in this test case.
    Add `isExpectStorageLevel` here?


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #96433 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/96433/testReport)** for PR 22263 at commit [`c3b6dfc`](https://github.com/apache/spark/commit/c3b6dfcee106c4d0e38975b1a31c3f3e97d2abc1).


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #96426 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/96426/testReport)** for PR 22263 at commit [`865e7d1`](https://github.com/apache/spark/commit/865e7d10be99c5f0ccfc89b2fc208de91e810ded).


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/97463/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #96426 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/96426/testReport)** for PR 22263 at commit [`865e7d1`](https://github.com/apache/spark/commit/865e7d10be99c5f0ccfc89b2fc208de91e810ded).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/96426/
    Test FAILed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/4126/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/95405/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #95628 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95628/testReport)** for PR 22263 at commit [`af3ab4b`](https://github.com/apache/spark/commit/af3ab4bd6130559d5139fd6ba201661469041676).


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97528 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97528/testReport)** for PR 22263 at commit [`c7d4b82`](https://github.com/apache/spark/commit/c7d4b8228129f5a48b087d7e299a75dd61e1ff2b).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by wangyum <gi...@git.apache.org>.
Github user wangyum commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    retest this please


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/96433/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/97598/
    Test FAILed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/97606/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97395 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97395/testReport)** for PR 22263 at commit [`8809311`](https://github.com/apache/spark/commit/8809311fd6382b77b728e790bf303b2c13e77b9b).


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97358 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97358/testReport)** for PR 22263 at commit [`8457d8b`](https://github.com/apache/spark/commit/8457d8b8bb6373fc09464350c02dfdc63b017d6e).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97463 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97463/testReport)** for PR 22263 at commit [`ed1de29`](https://github.com/apache/spark/commit/ed1de290d2e3a309772851e0fcf97002f002a054).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #95403 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95403/testReport)** for PR 22263 at commit [`9e058d1`](https://github.com/apache/spark/commit/9e058d1b402dec85982a880bf086268a1dcec99e).
     * This patch **fails due to an unknown error code, -9**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22263#discussion_r225605943
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala ---
    @@ -288,6 +297,65 @@ class CachedTableSuite extends QueryTest with SQLTestUtils with SharedSQLContext
         }
       }
     
    +  test("SQL interface support storageLevel(DISK_ONLY)") {
    +    sql("CACHE TABLE testData OPTIONS('storageLevel' 'DISK_ONLY')")
    +    assertCached(spark.table("testData"))
    +    val rddId = rddIdOf("testData")
    +    assert(isExpectStorageLevel(rddId, Disk))
    +    spark.catalog.uncacheTable("testData")
    +  }
    +
    +  test("SQL interface select from table support storageLevel(DISK_ONLY)") {
    +    sql("CACHE TABLE testSelect OPTIONS('storageLevel' 'DISK_ONLY') SELECT * FROM testData")
    +    assertCached(spark.table("testSelect"))
    +    val rddId = rddIdOf("testSelect")
    +    assert(isExpectStorageLevel(rddId, Disk))
    +    spark.catalog.uncacheTable("testSelect")
    +  }
    +
    +  test("SQL interface support storageLevel(DISK_ONLY) with invalid options") {
    +    sql("CACHE TABLE testData OPTIONS('storageLevel' 'DISK_ONLY', 'a' '1', 'b' '2')")
    +    assertCached(spark.table("testData"))
    +    val rddId = rddIdOf("testData")
    +    assert(isExpectStorageLevel(rddId, Disk))
    +    spark.catalog.uncacheTable("testData")
    --- End diff --
    
    ditto.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97606 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97606/testReport)** for PR 22263 at commit [`e2b5dcf`](https://github.com/apache/spark/commit/e2b5dcfc853b6f5608b27c914c397689d09cb267).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

Posted by wangyum <gi...@git.apache.org>.
Github user wangyum commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22263#discussion_r226514429
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala ---
    @@ -325,6 +325,21 @@ class CachedTableSuite extends QueryTest with SQLTestUtils with SharedSQLContext
         assert(isExpectStorageLevel(rddId, Memory))
       }
     
    +  test("SQL interface support storageLevel(Invalid StorageLevel)") {
    +    val message = intercept[IllegalArgumentException] {
    +      sql("CACHE TABLE testData OPTIONS('storageLevel' 'invalid_storage_level')")
    +    }.getMessage
    +    assert(message.contains("Invalid StorageLevel: INVALID_STORAGE_LEVEL"))
    +  }
    +
    +  test("SQL interface support storageLevel(with LAZY)") {
    +    sql("CACHE LAZY TABLE testData OPTIONS('storageLevel' 'disk_only')")
    +    assertCached(spark.table("testData"))
    +    val rddId = rddIdOf("testData")
    +    sql("SELECT COUNT(*) FROM testData").collect()
    +    assert(isExpectStorageLevel(rddId, Disk))
    --- End diff --
    
    Yes, I think this test cast is mainly to assert that `storageLevel` works with `lazy`, not `lazy` itself. WDYT?


---

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


[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

Posted by wangyum <gi...@git.apache.org>.
Github user wangyum commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22263#discussion_r225762035
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala ---
    @@ -288,6 +297,65 @@ class CachedTableSuite extends QueryTest with SQLTestUtils with SharedSQLContext
         }
       }
     
    +  test("SQL interface support storageLevel(DISK_ONLY)") {
    --- End diff --
    
    How about this:
    ```scala
    Seq("LAZY", "").foreach { isLazy =>
      Seq(true, false).foreach { withInvalidOptions =>
        Seq(true, false).foreach { withCacheTempView =>
          Map("DISK_ONLY" -> Disk, "MEMORY_ONLY" -> Memory).foreach {
            case (storageLevel, dataReadMethod) =>
              val testName = s"SQL interface support option: storageLevel: $storageLevel, " +
                s"isLazy: ${isLazy.equals("LAZY")}, " +
                s"withInvalidOptions: $withInvalidOptions, withCacheTempView: $withCacheTempView"
              val cacheOption = if (withInvalidOptions) {
                s"OPTIONS('storageLevel' '$storageLevel', 'a' '1', 'b' '2')"
              } else {
                s"OPTIONS('storageLevel' '$storageLevel')"
              }
              test(testName) {
                if (withCacheTempView) {
                  withTempView("testSelect") {
                    sql(s"CACHE $isLazy TABLE testSelect $cacheOption SELECT * FROM testData")
                    assertCached(spark.table("testSelect"))
                    val rddId = rddIdOf("testSelect")
                    if (isLazy.equals("LAZY")) {
                      sql("SELECT COUNT(*) FROM testSelect").collect()
                    }
                    assert(isExpectStorageLevel(rddId, dataReadMethod))
                  }
                } else {
                  sql(s"CACHE $isLazy TABLE testData $cacheOption")
                  assertCached(spark.table("testData"))
                  val rddId = rddIdOf("testData")
                  if (isLazy.equals("LAZY")) {
                    sql("SELECT COUNT(*) FROM testData").collect()
                  }
                  assert(isExpectStorageLevel(rddId, dataReadMethod))
                }
              }
          }
        }
      }
    }
    ```


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97379 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97379/testReport)** for PR 22263 at commit [`8809311`](https://github.com/apache/spark/commit/8809311fd6382b77b728e790bf303b2c13e77b9b).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97590 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97590/testReport)** for PR 22263 at commit [`e2b5dcf`](https://github.com/apache/spark/commit/e2b5dcfc853b6f5608b27c914c397689d09cb267).
     * This patch **fails due to an unknown error code, -9**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/3350/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by maropu <gi...@git.apache.org>.
Github user maropu commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    LGTM except for @dongjoon-hyun 's minor comment (we don't need the line 305)


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22263#discussion_r225605534
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala ---
    @@ -288,6 +297,65 @@ class CachedTableSuite extends QueryTest with SQLTestUtils with SharedSQLContext
         }
       }
     
    +  test("SQL interface support storageLevel(DISK_ONLY)") {
    +    sql("CACHE TABLE testData OPTIONS('storageLevel' 'DISK_ONLY')")
    +    assertCached(spark.table("testData"))
    +    val rddId = rddIdOf("testData")
    +    assert(isExpectStorageLevel(rddId, Disk))
    +    spark.catalog.uncacheTable("testData")
    +  }
    +
    +  test("SQL interface select from table support storageLevel(DISK_ONLY)") {
    +    sql("CACHE TABLE testSelect OPTIONS('storageLevel' 'DISK_ONLY') SELECT * FROM testData")
    +    assertCached(spark.table("testSelect"))
    +    val rddId = rddIdOf("testSelect")
    +    assert(isExpectStorageLevel(rddId, Disk))
    +    spark.catalog.uncacheTable("testSelect")
    --- End diff --
    
    ditto.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/3987/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97358 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97358/testReport)** for PR 22263 at commit [`8457d8b`](https://github.com/apache/spark/commit/8457d8b8bb6373fc09464350c02dfdc63b017d6e).


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/4116/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #95408 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95408/testReport)** for PR 22263 at commit [`7b90351`](https://github.com/apache/spark/commit/7b90351134d27da58d96dbcc15bcf8b275cde695).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/97358/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by wangyum <gi...@git.apache.org>.
Github user wangyum commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    retest this please


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

Posted by mgaido91 <gi...@git.apache.org>.
Github user mgaido91 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22263#discussion_r213568423
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala ---
    @@ -64,6 +66,13 @@ class CachedTableSuite extends QueryTest with SQLTestUtils with SharedSQLContext
         maybeBlock.nonEmpty
       }
     
    +  def isExpectStorageLevel(rddId: Int, level: DataReadMethod.DataReadMethod): Boolean = {
    +    val maybeBlock = sparkContext.env.blockManager.get(RDDBlockId(rddId, 0))
    --- End diff --
    
    shall we also check that the block is present? If nothing is cached this would (wrongly IMHO) return true. I see that since you are checking `isMaterialized` this doesn't happen in your test cases, but this function may be reused in the future so I think it'd be better to have it behaving consistently to its name. Do you agree?


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/97354/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/97476/
    Test PASSed.


---

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


[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22263#discussion_r225605478
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala ---
    @@ -288,6 +297,65 @@ class CachedTableSuite extends QueryTest with SQLTestUtils with SharedSQLContext
         }
       }
     
    +  test("SQL interface support storageLevel(DISK_ONLY)") {
    +    sql("CACHE TABLE testData OPTIONS('storageLevel' 'DISK_ONLY')")
    +    assertCached(spark.table("testData"))
    +    val rddId = rddIdOf("testData")
    +    assert(isExpectStorageLevel(rddId, Disk))
    +    spark.catalog.uncacheTable("testData")
    --- End diff --
    
    Let's remove `uncacheTable` since we have `spark.catalog.clearCache()` in `afterEach()`.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97354 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97354/testReport)** for PR 22263 at commit [`c3b6dfc`](https://github.com/apache/spark/commit/c3b6dfcee106c4d0e38975b1a31c3f3e97d2abc1).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/97379/
    Test FAILed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by wangyum <gi...@git.apache.org>.
Github user wangyum commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    cc @gatorsmile @cloud-fan 


---

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


[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22263#discussion_r226379468
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala ---
    @@ -325,6 +325,21 @@ class CachedTableSuite extends QueryTest with SQLTestUtils with SharedSQLContext
         assert(isExpectStorageLevel(rddId, Memory))
       }
     
    +  test("SQL interface support storageLevel(Invalid StorageLevel)") {
    +    val message = intercept[IllegalArgumentException] {
    +      sql("CACHE TABLE testData OPTIONS('storageLevel' 'invalid_storage_level')")
    +    }.getMessage
    +    assert(message.contains("Invalid StorageLevel: INVALID_STORAGE_LEVEL"))
    +  }
    +
    +  test("SQL interface support storageLevel(with LAZY)") {
    +    sql("CACHE LAZY TABLE testData OPTIONS('storageLevel' 'disk_only')")
    +    assertCached(spark.table("testData"))
    +    val rddId = rddIdOf("testData")
    +    sql("SELECT COUNT(*) FROM testData").collect()
    +    assert(isExpectStorageLevel(rddId, Disk))
    --- End diff --
    
    Although the commit message is a revert, this is not a revert. We lost the previous test coverage. Is this intentional?
    ```
    "Lazily cached in-memory table shouldn't be materialized eagerly"
    ```


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Retest this please.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #95628 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95628/testReport)** for PR 22263 at commit [`af3ab4b`](https://github.com/apache/spark/commit/af3ab4bd6130559d5139fd6ba201661469041676).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22263#discussion_r226215310
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala ---
    @@ -288,6 +297,65 @@ class CachedTableSuite extends QueryTest with SQLTestUtils with SharedSQLContext
         }
       }
     
    +  test("SQL interface support storageLevel(DISK_ONLY)") {
    --- End diff --
    
    Can we do the following? Then, those 4 function will have one-line body.
    1. Let's remove `tableName: String,`. We can use the same table name.
    2. With (1), we can remove the common prefix, `CACHE TABLE testData OPTIONS(`, too.
    3. With (1) and (2), we can change `sqlStr: String` -> `options: String`.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97512 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97512/testReport)** for PR 22263 at commit [`89502dc`](https://github.com/apache/spark/commit/89502dc912156f1b6f762a6989216a82d329d4b6).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/97590/
    Test FAILed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #95405 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95405/testReport)** for PR 22263 at commit [`9e058d1`](https://github.com/apache/spark/commit/9e058d1b402dec85982a880bf086268a1dcec99e).


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    LGTM


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Thank you, @wangyum , @cloud-fan , @maropu , @mgaido91 !


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #95405 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95405/testReport)** for PR 22263 at commit [`9e058d1`](https://github.com/apache/spark/commit/9e058d1b402dec85982a880bf086268a1dcec99e).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22263#discussion_r225608012
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala ---
    @@ -288,6 +297,65 @@ class CachedTableSuite extends QueryTest with SQLTestUtils with SharedSQLContext
         }
       }
     
    +  test("SQL interface support storageLevel(DISK_ONLY)") {
    --- End diff --
    
    @wangyum . Could you refactor the following four positive test cases by reducing the duplication? They are mostly the same except SQL statements and `StorageLevel`s.
    ```scala
    test("SQL interface support storageLevel(DISK_ONLY)")
    test("SQL interface select from table support storageLevel(DISK_ONLY)")
    test("SQL interface support storageLevel(DISK_ONLY) with invalid options")
    test("SQL interface support storageLevel(MEMORY_ONLY)")
    ```


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/3343/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97598 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97598/testReport)** for PR 22263 at commit [`e2b5dcf`](https://github.com/apache/spark/commit/e2b5dcfc853b6f5608b27c914c397689d09cb267).


---

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


[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

Posted by mgaido91 <gi...@git.apache.org>.
Github user mgaido91 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22263#discussion_r213708297
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/command/cache.scala ---
    @@ -17,16 +17,19 @@
     
     package org.apache.spark.sql.execution.command
     
    +import java.util.Locale
    +
     import org.apache.spark.sql.{Dataset, Row, SparkSession}
     import org.apache.spark.sql.catalyst.TableIdentifier
    -import org.apache.spark.sql.catalyst.analysis.NoSuchTableException
    --- End diff --
    
    nit: I saw comments against change like this one in order to avoid issue in backporting the ticket.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by mgaido91 <gi...@git.apache.org>.
Github user mgaido91 commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    cc @cloud-fan @gatorsmile 


---

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


[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22263#discussion_r226534798
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala ---
    @@ -325,6 +325,21 @@ class CachedTableSuite extends QueryTest with SQLTestUtils with SharedSQLContext
         assert(isExpectStorageLevel(rddId, Memory))
       }
     
    +  test("SQL interface support storageLevel(Invalid StorageLevel)") {
    +    val message = intercept[IllegalArgumentException] {
    +      sql("CACHE TABLE testData OPTIONS('storageLevel' 'invalid_storage_level')")
    +    }.getMessage
    +    assert(message.contains("Invalid StorageLevel: INVALID_STORAGE_LEVEL"))
    +  }
    +
    +  test("SQL interface support storageLevel(with LAZY)") {
    +    sql("CACHE LAZY TABLE testData OPTIONS('storageLevel' 'disk_only')")
    +    assertCached(spark.table("testData"))
    +    val rddId = rddIdOf("testData")
    +    sql("SELECT COUNT(*) FROM testData").collect()
    +    assert(isExpectStorageLevel(rddId, Disk))
    --- End diff --
    
    Do you think the previously existing `lazy`-related test cases protect this new SQL syntax contribution from future regressions?


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97463 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97463/testReport)** for PR 22263 at commit [`ed1de29`](https://github.com/apache/spark/commit/ed1de290d2e3a309772851e0fcf97002f002a054).


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/95403/
    Test FAILed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/97395/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/97528/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97356 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97356/testReport)** for PR 22263 at commit [`8457d8b`](https://github.com/apache/spark/commit/8457d8b8bb6373fc09464350c02dfdc63b017d6e).
     * This patch **fails due to an unknown error code, -9**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97476 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97476/testReport)** for PR 22263 at commit [`5e088b8`](https://github.com/apache/spark/commit/5e088b86822dd6b1bf4c3bb085fde3c96af03658).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97590 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97590/testReport)** for PR 22263 at commit [`e2b5dcf`](https://github.com/apache/spark/commit/e2b5dcfc853b6f5608b27c914c397689d09cb267).


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #97395 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97395/testReport)** for PR 22263 at commit [`8809311`](https://github.com/apache/spark/commit/8809311fd6382b77b728e790bf303b2c13e77b9b).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/2664/
    Test PASSed.


---

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


[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/22263


---

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


[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

Posted by wangyum <gi...@git.apache.org>.
Github user wangyum commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22263#discussion_r226187423
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala ---
    @@ -288,6 +297,65 @@ class CachedTableSuite extends QueryTest with SQLTestUtils with SharedSQLContext
         }
       }
     
    +  test("SQL interface support storageLevel(DISK_ONLY)") {
    --- End diff --
    
    Thanks @dongjoon-hyun  How about:
    ```scala
    
      def assertStorageLevel(
          sqlStr: String,
          tableName: String,
          level: DataReadMethod.DataReadMethod): Unit = {
        sql(sqlStr)
        assertCached(spark.table(tableName))
        val rddId = rddIdOf(tableName)
        assert(isExpectStorageLevel(rddId, level))
      }
    
      test("SQL interface support storageLevel(DISK_ONLY)") {
        assertStorageLevel(
          "CACHE TABLE testData OPTIONS('storageLevel' 'DISK_ONLY')",
          "testData",
          Disk)
      }
    
      test("SQL interface cache SELECT ... support storageLevel(DISK_ONLY)") {
        withTempView("testCacheSelect") {
          assertStorageLevel(
            "CACHE TABLE testCacheSelect OPTIONS('storageLevel' 'DISK_ONLY') SELECT * FROM testData",
            "testCacheSelect",
            Disk)
        }
      }
    
      test("SQL interface support storageLevel(DISK_ONLY) with invalid options") {
        assertStorageLevel(
          "CACHE TABLE testData OPTIONS('storageLevel' 'DISK_ONLY', 'a' '1', 'b' '2')",
          "testData",
          Disk)
      }
    
      test("SQL interface support storageLevel(MEMORY_ONLY)") {
        assertStorageLevel(
          "CACHE TABLE testData OPTIONS('storageLevel' 'MEMORY_ONLY')",
          "testData",
          Memory)
      }
    ```


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/3972/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/2796/
    Test PASSed.


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22263#discussion_r225619883
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala ---
    @@ -328,34 +325,6 @@ class CachedTableSuite extends QueryTest with SQLTestUtils with SharedSQLContext
         assert(isExpectStorageLevel(rddId, Memory))
       }
     
    -  test("SQL interface support storageLevel(Invalid StorageLevel)") {
    --- End diff --
    
    Sorry, but why do you remove these unique ones ?


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    **[Test build #95403 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95403/testReport)** for PR 22263 at commit [`9e058d1`](https://github.com/apache/spark/commit/9e058d1b402dec85982a880bf086268a1dcec99e).


---

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


[GitHub] spark pull request #22263: [SPARK-25269][SQL] SQL interface support specify ...

Posted by mgaido91 <gi...@git.apache.org>.
Github user mgaido91 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22263#discussion_r213706428
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala ---
    @@ -272,7 +272,7 @@ class SparkSqlAstBuilder(conf: SQLConf) extends AstBuilder(conf) {
           throw new ParseException(s"It is not allowed to add database prefix `$database` to " +
             s"the table name in CACHE TABLE AS SELECT", ctx)
         }
    -    CacheTableCommand(tableIdent, query, ctx.LAZY != null)
    +    CacheTableCommand(tableIdent, query, ctx.LAZY != null, Option(ctx.storageLevel).map(source))
    --- End diff --
    
    why `source` instead of `getText`?


---

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


[GitHub] spark issue #22263: [SPARK-25269][SQL] SQL interface support specify Storage...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22263
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/4084/
    Test PASSed.


---

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