Skip to content

Support multiple paths for ListingTableScanNode#2775

Merged
alamb merged 2 commits intoapache:masterfrom
Ted-Jiang:issue_2768_
Jun 24, 2022
Merged

Support multiple paths for ListingTableScanNode#2775
alamb merged 2 commits intoapache:masterfrom
Ted-Jiang:issue_2768_

Conversation

@Ted-Jiang
Copy link
Copy Markdown
Member

@Ted-Jiang Ted-Jiang commented Jun 23, 2022

Which issue does this PR close?

Closes #2768.

Rationale for this change

Sometimes we need pass multi-path in ListingTableScanNode , like in spark
https://github.com/apache/spark/blob/a8a765b3f302c078cb9519c4a17912cd38b9680c/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileIndex.scala#L36-L43

trait FileIndex {


  /**
   * Returns the list of root input paths from which the catalog will get files. There may be a
   * single root path from which partitions are discovered, or individual partitions may be
   * specified by each path.
   */
  def rootPaths: Seq[Path]

Are there any user-facing changes?

pub fn table_paths(&self) -> &Vec<ListingTableUrl> {
        &self.table_paths
    }

will return a vec

@github-actions github-actions bot added the core Core DataFusion crate label Jun 23, 2022
Copy link
Copy Markdown
Member Author

@Ted-Jiang Ted-Jiang left a comment

Choose a reason for hiding this comment

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

will add UT soon.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Merging #2775 (d875fff) into master (748b6a6) will decrease coverage by 0.00%.
The diff coverage is 87.27%.

@@            Coverage Diff             @@
##           master    #2775      +/-   ##
==========================================
- Coverage   84.95%   84.94%   -0.01%     
==========================================
  Files         271      272       +1     
  Lines       48164    48256      +92     
==========================================
+ Hits        40916    40993      +77     
- Misses       7248     7263      +15     
Impacted Files Coverage Δ
datafusion/core/src/datasource/listing/table.rs 89.13% <85.41%> (-1.23%) ⬇️
datafusion/proto/src/logical_plan.rs 17.95% <100.00%> (+0.33%) ⬆️
datafusion/optimizer/src/filter_null_join_keys.rs 91.83% <0.00%> (-2.05%) ⬇️
datafusion/expr/src/logical_plan/plan.rs 73.71% <0.00%> (-0.60%) ⬇️
datafusion/core/src/execution/context.rs 78.37% <0.00%> (-0.28%) ⬇️
datafusion/optimizer/src/utils.rs 35.56% <0.00%> (ø)
datafusion/core/src/config.rs 91.11% <0.00%> (ø)
datafusion/core/src/physical_plan/hash_join.rs 94.68% <0.00%> (+0.57%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 748b6a6...d875fff. Read the comment docs.

Copy link
Copy Markdown
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Looks like a nice change to me -- nice work @Ted-Jiang

cc @liukun4515 feel free to review and merge such PRs too

@alamb
Copy link
Copy Markdown
Contributor

alamb commented Jun 24, 2022

FYI @tustvold

@alamb alamb merged commit 858f9f1 into apache:master Jun 24, 2022
@Ted-Jiang
Copy link
Copy Markdown
Member Author

@alamb Thanks❤️

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

Labels

core Core DataFusion crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support multiple paths for ListingTableScanNode

3 participants