Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
[NSE-843] ArrowDataSouce: Arrow dataset inspect() is called every tim…
Browse files Browse the repository at this point in the history
…e a file is read
  • Loading branch information
zhztheplayer committed Apr 13, 2022
1 parent e329253 commit 91b1a4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class ArrowFileFormat extends FileFormat with DataSourceRegister with Serializab
options.asJava).asScala.toMap))

// todo predicate validation / pushdown
val dataset = factory.finish();
val dataset = factory.finish(ArrowUtils.toArrowSchema(requiredSchema));

val filter = if (enableFilterPushDown) {
// disable filter pushdown by arrow 7.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ case class ArrowPartitionReaderFactory(
val path = partitionedFile.filePath
val factory = ArrowUtils.makeArrowDiscovery(URLDecoder.decode(path, "UTF-8"),
partitionedFile.start, partitionedFile.length, options)
val dataset = factory.finish()
val dataset = factory.finish(ArrowUtils.toArrowSchema(readDataSchema))
val filter = if (enableFilterPushDown) {
// disable filter pushdown by arrow 7.0.0
org.apache.arrow.dataset.filter.Filter.EMPTY
Expand Down

0 comments on commit 91b1a4e

Please sign in to comment.