-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'branch-22.08' into jtb-zstd-integ
- Loading branch information
Showing
10 changed files
with
596 additions
and
598 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...plugin/src/main/311until330-all/scala/com/nvidia/spark/rapids/shims/OrcReadingShims.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright (c) 2022, NVIDIA CORPORATION. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.nvidia.spark.rapids.shims | ||
|
||
import org.apache.hadoop.conf.Configuration | ||
import org.apache.orc.Reader | ||
|
||
import org.apache.spark.sql.execution.datasources.orc.OrcUtils | ||
import org.apache.spark.sql.types.StructType | ||
|
||
object OrcReadingShims { | ||
|
||
/** | ||
* @return Returns the combination of requested column ids from the given ORC file and | ||
* boolean flag to find if the pruneCols is allowed or not. Requested Column id can be | ||
* -1, which means the requested column doesn't exist in the ORC file. Returns None | ||
* if the given ORC file is empty. | ||
*/ | ||
def requestedColumnIds( | ||
isCaseSensitive: Boolean, | ||
dataSchema: StructType, | ||
requiredSchema: StructType, | ||
reader: Reader, | ||
conf: Configuration): Option[(Array[Int], Boolean)] = | ||
OrcUtils.requestedColumnIds(isCaseSensitive, dataSchema, requiredSchema, reader, conf) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.