You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/01/27 11:23:54 UTC

[GitHub] [spark] MaxGekk opened a new pull request #31361: [SPARK-34262][SQL] Refresh cached data of v1 table in `ALTER TABLE .. SET LOCATION`

MaxGekk opened a new pull request #31361:
URL: https://github.com/apache/spark/pull/31361


   ### What changes were proposed in this pull request?
   Invoke `CatalogImpl.refreshTable()` in v1 implementation of the `ALTER TABLE .. SET LOCATION` command to refresh cached table data.
   
   ### Why are the changes needed?
   The example below portraits the issue:
   
   - Create a source table:
   ```sql
   spark-sql> CREATE TABLE src_tbl (c0 int, part int) USING hive PARTITIONED BY (part);
   spark-sql> INSERT INTO src_tbl PARTITION (part=0) SELECT 0;
   spark-sql> SHOW TABLE EXTENDED LIKE 'src_tbl' PARTITION (part=0);
   default	src_tbl	false	Partition Values: [part=0]
   Location: file:/Users/maximgekk/proj/refresh-cache-set-location/spark-warehouse/src_tbl/part=0
   ...
   ```
   - Set new location for the empty partition (part=0):
   ```sql
   spark-sql> CREATE TABLE dst_tbl (c0 int, part int) USING hive PARTITIONED BY (part);
   spark-sql> ALTER TABLE dst_tbl ADD PARTITION (part=0);
   spark-sql> INSERT INTO dst_tbl PARTITION (part=1) SELECT 1;
   spark-sql> CACHE TABLE dst_tbl;
   spark-sql> SELECT * FROM dst_tbl;
   1	1
   spark-sql> ALTER TABLE dst_tbl PARTITION (part=0) SET LOCATION '/Users/maximgekk/proj/refresh-cache-set-location/spark-warehouse/src_tbl/part=0';
   spark-sql> SELECT * FROM dst_tbl;
   1	1
   ```
   The last query does not return new loaded data. 
   
   ### Does this PR introduce _any_ user-facing change?
   Yes. After the changes, the example above works correctly:
   ```sql
   spark-sql> ALTER TABLE dst_tbl PARTITION (part=0) SET LOCATION '/Users/maximgekk/proj/refresh-cache-set-location/spark-warehouse/src_tbl/part=0';
   spark-sql> SELECT * FROM dst_tbl;
   0	0
   1	1
   ```
   
   
   ### How was this patch tested?
   Added new test to `org.apache.spark.sql.hive.CachedTableSuite`:
   ```
   $ build/sbt -Phive -Phive-thriftserver "test:testOnly *CachedTableSuite"
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #31361: [SPARK-34262][SQL] Refresh cached data of v1 table in `ALTER TABLE .. SET LOCATION`

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #31361:
URL: https://github.com/apache/spark/pull/31361#issuecomment-768564572


   **[Test build #134567 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134567/testReport)** for PR 31361 at commit [`a759c20`](https://github.com/apache/spark/commit/a759c20000be934089210b30854f49f631dc7cd7).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #31361: [SPARK-34262][SQL] Refresh cached data of v1 table in `ALTER TABLE .. SET LOCATION`

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #31361:
URL: https://github.com/apache/spark/pull/31361#issuecomment-768564572


   **[Test build #134567 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134567/testReport)** for PR 31361 at commit [`a759c20`](https://github.com/apache/spark/commit/a759c20000be934089210b30854f49f631dc7cd7).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #31361: [SPARK-34262][SQL] Refresh cached data of v1 table in `ALTER TABLE .. SET LOCATION`

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #31361:
URL: https://github.com/apache/spark/pull/31361#issuecomment-768648024


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/39153/
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] MaxGekk commented on pull request #31361: [SPARK-34262][SQL] Refresh cached data of v1 table in `ALTER TABLE .. SET LOCATION`

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on pull request #31361:
URL: https://github.com/apache/spark/pull/31361#issuecomment-768552743


   jenkins, retest this, please


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #31361: [SPARK-34262][SQL] Refresh cached data of v1 table in `ALTER TABLE .. SET LOCATION`

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #31361:
URL: https://github.com/apache/spark/pull/31361#issuecomment-768225449


   **[Test build #134546 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134546/testReport)** for PR 31361 at commit [`a759c20`](https://github.com/apache/spark/commit/a759c20000be934089210b30854f49f631dc7cd7).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon closed pull request #31361: [SPARK-34262][SQL] Refresh cached data of v1 table in `ALTER TABLE .. SET LOCATION`

Posted by GitBox <gi...@apache.org>.
HyukjinKwon closed pull request #31361:
URL: https://github.com/apache/spark/pull/31361


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #31361: [SPARK-34262][SQL] Refresh cached data of v1 table in `ALTER TABLE .. SET LOCATION`

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #31361:
URL: https://github.com/apache/spark/pull/31361#issuecomment-768285995


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/39132/
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #31361: [SPARK-34262][SQL] Refresh cached data of v1 table in `ALTER TABLE .. SET LOCATION`

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #31361:
URL: https://github.com/apache/spark/pull/31361#issuecomment-768365323


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/134546/
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #31361: [SPARK-34262][SQL] Refresh cached data of v1 table in `ALTER TABLE .. SET LOCATION`

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #31361:
URL: https://github.com/apache/spark/pull/31361#issuecomment-768703017


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/134567/
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on pull request #31361: [SPARK-34262][SQL] Refresh cached data of v1 table in `ALTER TABLE .. SET LOCATION`

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #31361:
URL: https://github.com/apache/spark/pull/31361#issuecomment-768822701


   Merged to master.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #31361: [SPARK-34262][SQL] Refresh cached data of v1 table in `ALTER TABLE .. SET LOCATION`

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #31361:
URL: https://github.com/apache/spark/pull/31361#issuecomment-768703017


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/134567/
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #31361: [SPARK-34262][SQL] Refresh cached data of v1 table in `ALTER TABLE .. SET LOCATION`

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #31361:
URL: https://github.com/apache/spark/pull/31361#issuecomment-768592440


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/39153/
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #31361: [SPARK-34262][SQL] Refresh cached data of v1 table in `ALTER TABLE .. SET LOCATION`

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #31361:
URL: https://github.com/apache/spark/pull/31361#issuecomment-768365323


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/134546/
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #31361: [SPARK-34262][SQL] Refresh cached data of v1 table in `ALTER TABLE .. SET LOCATION`

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #31361:
URL: https://github.com/apache/spark/pull/31361#issuecomment-768637121


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/39153/
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] MaxGekk commented on pull request #31361: [SPARK-34262][SQL] Refresh cached data of v1 table in `ALTER TABLE .. SET LOCATION`

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on pull request #31361:
URL: https://github.com/apache/spark/pull/31361#issuecomment-768853023


   Here are backports:
   - `branch-3.0`: https://github.com/apache/spark/pull/31380
   - `branch-3.1`: https://github.com/apache/spark/pull/31379


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #31361: [SPARK-34262][SQL] Refresh cached data of v1 table in `ALTER TABLE .. SET LOCATION`

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #31361:
URL: https://github.com/apache/spark/pull/31361#issuecomment-768648024


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/39153/
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #31361: [SPARK-34262][SQL] Refresh cached data of v1 table in `ALTER TABLE .. SET LOCATION`

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #31361:
URL: https://github.com/apache/spark/pull/31361#issuecomment-768225449


   **[Test build #134546 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134546/testReport)** for PR 31361 at commit [`a759c20`](https://github.com/apache/spark/commit/a759c20000be934089210b30854f49f631dc7cd7).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #31361: [SPARK-34262][SQL] Refresh cached data of v1 table in `ALTER TABLE .. SET LOCATION`

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #31361:
URL: https://github.com/apache/spark/pull/31361#issuecomment-768683612


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on pull request #31361: [SPARK-34262][SQL] Refresh cached data of v1 table in `ALTER TABLE .. SET LOCATION`

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #31361:
URL: https://github.com/apache/spark/pull/31361#issuecomment-768822901


   @MaxGekk it has a conflict. Would you mind opening a backport PR?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #31361: [SPARK-34262][SQL] Refresh cached data of v1 table in `ALTER TABLE .. SET LOCATION`

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #31361:
URL: https://github.com/apache/spark/pull/31361#issuecomment-768285995


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/39132/
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #31361: [SPARK-34262][SQL] Refresh cached data of v1 table in `ALTER TABLE .. SET LOCATION`

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #31361:
URL: https://github.com/apache/spark/pull/31361#issuecomment-768333292


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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