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/24 07:11:36 UTC

[GitHub] [spark] MaxGekk opened a new pull request #31305: [SPARK-34213][SQL][3.0] Refresh cached data of v1 table in `LOAD DATA`

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


   ### What changes were proposed in this pull request?
   Invoke `CatalogImpl.refreshTable()` instead of `SessionCatalog.refreshTable` in v1 implementation of the `LOAD DATA` command. `SessionCatalog.refreshTable` just refreshes metadata comparing to `CatalogImpl.refreshTable()` which refreshes cached table data as well.
   
   ### 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/load-data-refresh-cache/spark-warehouse/src_tbl/part=0
   ...
   ```
   - Load data from the source table to a cached destination table:
   ```sql
   spark-sql> CREATE TABLE dst_tbl (c0 int, part int) USING hive PARTITIONED BY (part);
   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> LOAD DATA LOCAL INPATH '/Users/maximgekk/proj/load-data-refresh-cache/spark-warehouse/src_tbl/part=0' INTO TABLE dst_tbl PARTITION (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> LOAD DATA LOCAL INPATH '/Users/maximgekk/proj/load-data-refresh-cache/spark-warehouse/src_tbl/part=0' INTO TABLE dst_tbl PARTITION (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"
   ```
   
   Authored-by: Max Gekk <ma...@gmail.com>
   Signed-off-by: Dongjoon Hyun <dh...@apple.com>
   (cherry picked from commit f8bf72ed5d1c25cb9068dc80d3996fcd5aade3ae)
   Signed-off-by: Max Gekk <ma...@gmail.com>


----------------------------------------------------------------
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] dongjoon-hyun closed pull request #31305: [SPARK-34213][SQL][3.0] Refresh cached data of v1 table in `LOAD DATA`

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun closed pull request #31305:
URL: https://github.com/apache/spark/pull/31305


   


----------------------------------------------------------------
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 #31305: [SPARK-34213][SQL][3.0] Refresh cached data of v1 table in `LOAD DATA`

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


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


----------------------------------------------------------------
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 #31305: [SPARK-34213][SQL][3.0] Refresh cached data of v1 table in `LOAD DATA`

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


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


----------------------------------------------------------------
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 #31305: [SPARK-34213][SQL][3.0] Refresh cached data of v1 table in `LOAD DATA`

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


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


----------------------------------------------------------------
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 #31305: [SPARK-34213][SQL][3.0] Refresh cached data of v1 table in `LOAD DATA`

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


   **[Test build #134408 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134408/testReport)** for PR 31305 at commit [`b79596f`](https://github.com/apache/spark/commit/b79596fb59de324b3e6f4d8e066704b399e89aab).
    * 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] SparkQA commented on pull request #31305: [SPARK-34213][SQL][3.0] Refresh cached data of v1 table in `LOAD DATA`

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


   **[Test build #134408 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134408/testReport)** for PR 31305 at commit [`b79596f`](https://github.com/apache/spark/commit/b79596fb59de324b3e6f4d8e066704b399e89aab).


----------------------------------------------------------------
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 #31305: [SPARK-34213][SQL][3.0] Refresh cached data of v1 table in `LOAD DATA`

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


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


----------------------------------------------------------------
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 #31305: [SPARK-34213][SQL][3.0] Refresh cached data of v1 table in `LOAD DATA`

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


   **[Test build #134408 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134408/testReport)** for PR 31305 at commit [`b79596f`](https://github.com/apache/spark/commit/b79596fb59de324b3e6f4d8e066704b399e89aab).


----------------------------------------------------------------
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 #31305: [SPARK-34213][SQL][3.0] Refresh cached data of v1 table in `LOAD DATA`

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


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


----------------------------------------------------------------
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] dongjoon-hyun closed pull request #31305: [SPARK-34213][SQL][3.0] Refresh cached data of v1 table in `LOAD DATA`

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun closed pull request #31305:
URL: https://github.com/apache/spark/pull/31305


   


----------------------------------------------------------------
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 #31305: [SPARK-34213][SQL][3.0] Refresh cached data of v1 table in `LOAD DATA`

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


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


----------------------------------------------------------------
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