Skip to content

[SPARK-41708][SQL][FOLLOWUP] Override toString method of FileIndex #39610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from

Conversation

LuciferYang
Copy link
Contributor

@LuciferYang LuciferYang commented Jan 16, 2023

What changes were proposed in this pull request?

The main change of this pr is to fix suggestions of #39598 (comment):

Why are the changes needed?

Fix suggestions of #39598 (comment)

Does this PR introduce any user-facing change?

No

How was this patch tested?

  • Pass GitHub Actions
  • Manually test build/sbt "sql/testOnly org.apache.spark.sql.SQLQueryTestSuite" -Pscala-2.13 , run successful

@github-actions github-actions bot added the SQL label Jan 16, 2023
@@ -1086,20 +1086,20 @@ struct<plan:string>
+- 'UnresolvedRelation [explain_temp4], [], false

== Analyzed Logical Plan ==
InsertIntoHadoopFsRelationCommand Location [not included in comparison]/{warehouse_dir}/explain_temp5], Append, `spark_catalog`.`default`.`explain_temp5`, org.apache.spark.sql.execution.datasources.CatalogFileIndex, [key, val]
InsertIntoHadoopFsRelationCommand Location [not included in comparison]/{warehouse_dir}/explain_temp5, false, [val#x], Parquet, [path=Location [not included in comparison]/{warehouse_dir}/explain_temp5], Append, `spark_catalog`.`default`.`explain_temp5`, org.apache.spark.sql.execution.datasources.CatalogFileIndex(Location [not included in comparison]/{warehouse_dir}/explain_temp5), [key, val]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cloud-fan Is this OK?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

also cc @dongjoon-hyun

Copy link
Contributor

@cloud-fan cloud-fan left a comment

Choose a reason for hiding this comment

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

thanks for the quick fix!

…r.scala


Location -> file:

Co-authored-by: Wenchen Fan <cloud0fan@gmail.com>
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM, too.

@dongjoon-hyun
Copy link
Member

Merged to master.

@LuciferYang
Copy link
Contributor Author

Thanks @dongjoon-hyun @cloud-fan

HyukjinKwon pushed a commit that referenced this pull request Feb 8, 2023
### What changes were proposed in this pull request?

This is a followup of #39610 . The non-greedy mode does not work well if the ending class name appears more than once, like `file://myPath/.../clsName/.../clsName`. We should still use greedy mode, but to match any chars that are not space or comma (comma is used to combine multiple paths in `FileIndex.toString`).

### Why are the changes needed?

make the test framework more stable

### Does this PR introduce _any_ user-facing change?

no

### How was this patch tested?

N/A

Closes #39924 from cloud-fan/minor.

Authored-by: Wenchen Fan <wenchen@databricks.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
HyukjinKwon pushed a commit that referenced this pull request Feb 8, 2023
### What changes were proposed in this pull request?

This is a followup of #39610 . The non-greedy mode does not work well if the ending class name appears more than once, like `file://myPath/.../clsName/.../clsName`. We should still use greedy mode, but to match any chars that are not space or comma (comma is used to combine multiple paths in `FileIndex.toString`).

### Why are the changes needed?

make the test framework more stable

### Does this PR introduce _any_ user-facing change?

no

### How was this patch tested?

N/A

Closes #39924 from cloud-fan/minor.

Authored-by: Wenchen Fan <wenchen@databricks.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
(cherry picked from commit 04550ed)
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
snmvaughan pushed a commit to snmvaughan/spark that referenced this pull request Jun 20, 2023
### What changes were proposed in this pull request?

This is a followup of apache#39610 . The non-greedy mode does not work well if the ending class name appears more than once, like `file://myPath/.../clsName/.../clsName`. We should still use greedy mode, but to match any chars that are not space or comma (comma is used to combine multiple paths in `FileIndex.toString`).

### Why are the changes needed?

make the test framework more stable

### Does this PR introduce _any_ user-facing change?

no

### How was this patch tested?

N/A

Closes apache#39924 from cloud-fan/minor.

Authored-by: Wenchen Fan <wenchen@databricks.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
(cherry picked from commit 04550ed)
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
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.

3 participants