Skip to content

Conversation

@gatorsmile
Copy link
Member

What changes were proposed in this pull request?

Currently, the refreshTable API is always case sensitive.

When users use the view name without the exact case match, the API silently ignores the call. Users might expect the command has been successfully completed. However, when users run the subsequent SQL commands, they might still get the exception, like

Job aborted due to stage failure: 
Task 1 in stage 4.0 failed 1 times, most recent failure: Lost task 1.0 in stage 4.0 (TID 7, localhost): 
java.io.FileNotFoundException: 
File file:/private/var/folders/4b/sgmfldk15js406vk7lw5llzw0000gn/T/spark-bd4b9ea6-9aec-49c5-8f05-01cff426211e/part-r-00000-0c84b915-c032-4f2e-abf5-1d48fdbddf38.snappy.parquet does not exist

This PR is to fix the issue.

How was this patch tested?

Added a test case.

@SparkQA
Copy link

SparkQA commented Aug 7, 2016

Test build #63319 has finished for PR 14523 at commit fb0dd0b.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@gatorsmile
Copy link
Member Author

cc @rxin @cloud-fan This is a simple fix. Could you review the fix? Thanks!


// Delete a file
deleteOneFileInDirectory(location)
intercept[SparkException] {sql("select count(*) from view_refresh").first()}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: use intercept[..](...) for one line code.

@cloud-fan
Copy link
Contributor

LGTM, is it a regression for 2.0?

@gatorsmile
Copy link
Member Author

This is not a regression, but Spark 2.0 has the issue. Thanks!

@SparkQA
Copy link

SparkQA commented Aug 8, 2016

Test build #63340 has finished for PR 14523 at commit ad74703.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

asfgit pushed a commit that referenced this pull request Aug 8, 2016
### What changes were proposed in this pull request?
Currently, the `refreshTable` API is always case sensitive.

When users use the view name without the exact case match, the API silently ignores the call. Users might expect the command has been successfully completed. However, when users run the subsequent SQL commands, they might still get the exception, like
```
Job aborted due to stage failure:
Task 1 in stage 4.0 failed 1 times, most recent failure: Lost task 1.0 in stage 4.0 (TID 7, localhost):
java.io.FileNotFoundException:
File file:/private/var/folders/4b/sgmfldk15js406vk7lw5llzw0000gn/T/spark-bd4b9ea6-9aec-49c5-8f05-01cff426211e/part-r-00000-0c84b915-c032-4f2e-abf5-1d48fdbddf38.snappy.parquet does not exist
```

This PR is to fix the issue.

### How was this patch tested?
Added a test case.

Author: gatorsmile <[email protected]>

Closes #14523 from gatorsmile/refreshTempTable.

(cherry picked from commit 5959df2)
Signed-off-by: Wenchen Fan <[email protected]>
@asfgit asfgit closed this in 5959df2 Aug 8, 2016
@cloud-fan
Copy link
Contributor

thanks, merging to master and 2.0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants