Skip to content

Conversation

@sarutak
Copy link
Member

@sarutak sarutak commented Apr 7, 2021

What changes were proposed in this pull request?

This PR fixes an issue that LIST FILES/JARS/ARCHIVES path1 path2 ... cannot list all paths if at least one path is quoted.
An example here.

ADD FILE /tmp/test1;
ADD FILE /tmp/test2;

LIST FILES /tmp/test1 /tmp/test2;
file:/tmp/test1
file:/tmp/test2

LIST FILES /tmp/test1 "/tmp/test2";
file:/tmp/test2

In this example, the second LIST FILES doesn't show file:/tmp/test1.

To resolve this issue, I modified the syntax rule to be able to handle this case.
I also changed SparkSQLParser to be able to handle paths which contains white spaces.

Why are the changes needed?

This is a bug.
I also have a plan which extends ADD FILE/JAR/ARCHIVE to take multiple paths like Hive and the syntax rule change is necessary for that.

Does this PR introduce any user-facing change?

Yes. Users can pass quoted paths when using ADD FILE/JAR/ARCHIVE.

How was this patch tested?

New test.

…ot list all paths if at least one path is quoted.
TestUtils.createJar(Seq(file8), jarFile5)

sql(s"ADD JAR ${jarFile4.getAbsolutePath}")
sql(s"ADD JAR ${jarFile5.getAbsolutePath}")
Copy link
Member Author

@sarutak sarutak Apr 7, 2021

Choose a reason for hiding this comment

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

Unlike ADD FILE "path" and ADD ARCHIVE "path", we cannot execute ADD JAR "path" when the path contains whitespaces.
I think it's a bug and #32052 will fix this issue.

Copy link
Member

Choose a reason for hiding this comment

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

Got it. @sarutak .

@SparkQA
Copy link

SparkQA commented Apr 7, 2021

Test build #136998 has finished for PR 32074 at commit c5a6345.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Apr 7, 2021

Kubernetes integration test unable to build dist.

exiting with code: 1
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41575/

@sarutak
Copy link
Member Author

sarutak commented Apr 7, 2021

retest this please.

@SparkQA
Copy link

SparkQA commented Apr 7, 2021

Test build #137011 has finished for PR 32074 at commit c5a6345.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@github-actions github-actions bot added the SQL label Apr 7, 2021
@SparkQA
Copy link

SparkQA commented Apr 7, 2021

Kubernetes integration test unable to build dist.

exiting with code: 1
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41589/

@SparkQA
Copy link

SparkQA commented Apr 7, 2021

Kubernetes integration test unable to build dist.

exiting with code: 1
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41604/

@dongjoon-hyun
Copy link
Member

#32052 is merged now. Could you rebase this to the master, @sarutak ?

@SparkQA
Copy link

SparkQA commented Apr 7, 2021

Test build #137026 has finished for PR 32074 at commit 752da21.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Apr 8, 2021

Test build #137053 has finished for PR 32074 at commit b4cb445.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Apr 8, 2021

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

@SparkQA
Copy link

SparkQA commented Apr 8, 2021

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

@sarutak
Copy link
Member Author

sarutak commented Apr 9, 2021

retest this please.

@SparkQA
Copy link

SparkQA commented Apr 9, 2021

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

@SparkQA
Copy link

SparkQA commented Apr 9, 2021

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

@SparkQA
Copy link

SparkQA commented Apr 9, 2021

Test build #137110 has finished for PR 32074 at commit b4cb445.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Apr 9, 2021

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

@SparkQA
Copy link

SparkQA commented Apr 9, 2021

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

@SparkQA
Copy link

SparkQA commented Apr 9, 2021

Test build #137116 has finished for PR 32074 at commit 7416724.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class UpdateStarAction(condition: Option[Expression]) extends MergeAction
  • case class InsertStarAction(condition: Option[Expression]) extends MergeAction

@sarutak
Copy link
Member Author

sarutak commented Apr 12, 2021

cc: @HyukjinKwon

@SparkQA
Copy link

SparkQA commented Apr 12, 2021

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

@SparkQA
Copy link

SparkQA commented Apr 12, 2021

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

@SparkQA
Copy link

SparkQA commented Apr 12, 2021

Test build #137208 has finished for PR 32074 at commit 3f78c43.

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

Copy link
Member

@HyukjinKwon HyukjinKwon left a comment

Choose a reason for hiding this comment

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

Looks okay

@sarutak sarutak closed this in ef05e89 Apr 14, 2021
@sarutak
Copy link
Member Author

sarutak commented Apr 14, 2021

Thanks all. Merged into master.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants