Skip to content

Commit

Permalink
Import fixes and verify amends
Browse files Browse the repository at this point in the history
Signed-off-by: Kuhu Shukla <kuhus@nvidia.com>
  • Loading branch information
kuhushukla committed Dec 30, 2021
1 parent ffd2127 commit f14fa18
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ class Spark304Shims extends Spark30XShims with Spark30Xuntil33XShims {
caseSensitive: Boolean,
datetimeRebaseMode: Any): ParquetFilters =
new ParquetFilters(schema, pushDownDate, pushDownTimestamp, pushDownDecimal, pushDownStartWith,
pushDownInFilterThreshold, caseSensitive, datetimeRebaseMode.asInstanceOf[SQLConf.LegacyBehaviorPolicy.Value])
pushDownInFilterThreshold, caseSensitive, datetimeRebaseMode.asInstanceOf[
SQLConf.LegacyBehaviorPolicy.Value])

def getDateTimeRebaseMode(lookupFileMeta: String => String,
modeByConfig: String) : Any = DataSourceUtils.datetimeRebaseMode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ class Spark312dbShims extends Spark31XdbShims with Spark30Xuntil33XShims {
caseSensitive: Boolean,
datetimeRebaseMode: Any): ParquetFilters =
new ParquetFilters(schema, pushDownDate, pushDownTimestamp, pushDownDecimal, pushDownStartWith,
pushDownInFilterThreshold, caseSensitive, datetimeRebaseMode.asInstanceOf[SQLConf.LegacyBehaviorPolicy.Value])
pushDownInFilterThreshold, caseSensitive, datetimeRebaseMode.asInstanceOf[
SQLConf.LegacyBehaviorPolicy.Value])

def getDateTimeRebaseMode(lookupFileMeta: String => String,
modeByConfig: String) : Any = DataSourceUtils.datetimeRebaseMode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ class Spark313Shims extends Spark31XShims with Spark30Xuntil33XShims {
caseSensitive: Boolean,
datetimeRebaseMode: Any): ParquetFilters =
new ParquetFilters(schema, pushDownDate, pushDownTimestamp, pushDownDecimal, pushDownStartWith,
pushDownInFilterThreshold, caseSensitive, datetimeRebaseMode.asInstanceOf[SQLConf.LegacyBehaviorPolicy.Value])
pushDownInFilterThreshold, caseSensitive, datetimeRebaseMode.asInstanceOf[
SQLConf.LegacyBehaviorPolicy.Value])

override def hasCastFloatTimestampUpcast: Boolean = true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ class Spark320Shims extends Spark32XShims with Spark30Xuntil33XShims {
caseSensitive: Boolean,
datetimeRebaseMode: Any): ParquetFilters = {
new ParquetFilters(schema, pushDownDate, pushDownTimestamp, pushDownDecimal, pushDownStartWith,
pushDownInFilterThreshold, caseSensitive, datetimeRebaseMode.asInstanceOf[SQLConf.LegacyBehaviorPolicy.Value])
pushDownInFilterThreshold, caseSensitive, datetimeRebaseMode.asInstanceOf[
SQLConf.LegacyBehaviorPolicy.Value])
}

def getDateTimeRebaseMode(lookupFileMeta: String => String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ class Spark321Shims extends Spark32XShims with Spark30Xuntil33XShims {
caseSensitive: Boolean,
datetimeRebaseMode: Any): ParquetFilters = {
new ParquetFilters(schema, pushDownDate, pushDownTimestamp, pushDownDecimal, pushDownStartWith,
pushDownInFilterThreshold, caseSensitive, datetimeRebaseMode.asInstanceOf[SQLConf.LegacyBehaviorPolicy.Value])
pushDownInFilterThreshold, caseSensitive, datetimeRebaseMode.asInstanceOf[
SQLConf.LegacyBehaviorPolicy.Value])
}

def getDateTimeRebaseMode(lookupFileMeta: String => String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ abstract class Spark30XdbShims extends Spark30XdbShimsBase with Logging {
caseSensitive: Boolean,
datetimeRebaseMode: Any): ParquetFilters =
new ParquetFilters(schema, pushDownDate, pushDownTimestamp, pushDownDecimal, pushDownStartWith,
pushDownInFilterThreshold, caseSensitive, datetimeRebaseMode.asInstanceOf[SQLConf.LegacyBehaviorPolicy.Value])
pushDownInFilterThreshold, caseSensitive, datetimeRebaseMode.asInstanceOf[
SQLConf.LegacyBehaviorPolicy.Value])

override def v1RepairTableCommand(tableName: TableIdentifier): RunnableCommand =
AlterTableRecoverPartitionsCommand(tableName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ package com.nvidia.spark.rapids.shims.v2
import com.nvidia.spark.rapids.{Arm, GpuParquetPartitionReaderFactoryBase, GpuParquetScanBase, ParquetFileInfoWithBlockMeta, ParquetPartitionReader, RapidsConf, ShimLoader}
import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.fs.Path

import org.apache.parquet.column.ColumnDescriptor
import org.apache.parquet.filter2.predicate.FilterApi
import org.apache.parquet.format.converter.ParquetMetadataConverter
import org.apache.parquet.hadoop.metadata.ColumnPath
import org.apache.parquet.hadoop.{ParquetFileReader, ParquetInputFormat}
import org.apache.parquet.hadoop.metadata.ColumnPath

import org.apache.spark.sql.SparkSession
import org.apache.spark.sql.catalyst.expressions.Expression
import org.apache.spark.sql.connector.read.PartitionReaderFactory
Expand Down

0 comments on commit f14fa18

Please sign in to comment.