Skip to content
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

[HOTFIX] Fix ORC build break #6244

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package org.apache.spark.sql.hive.orc
import java.util.{Objects, Properties}

import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.fs.Path
import org.apache.hadoop.fs.{FileStatus, Path}
import org.apache.hadoop.hive.conf.HiveConf.ConfVars
import org.apache.hadoop.hive.ql.io.orc.{OrcInputFormat, OrcOutputFormat, OrcSerde, OrcSplit}
import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector
Expand Down Expand Up @@ -171,9 +171,10 @@ private[sql] case class OrcRelation(
maybePartitionSpec)
}

override def buildScan(requiredColumns: Array[String],
override def buildScan(
requiredColumns: Array[String],
filters: Array[Filter],
inputPaths: Array[String]): RDD[Row] = {
inputPaths: Array[FileStatus]): RDD[Row] = {
val output = StructType(requiredColumns.map(dataSchema(_))).toAttributes
OrcTableScan(output, this, filters, inputPaths).execute()
}
Expand All @@ -194,7 +195,7 @@ private[orc] case class OrcTableScan(
attributes: Seq[Attribute],
@transient relation: OrcRelation,
filters: Array[Filter],
inputPaths: Array[String])
inputPaths: Array[FileStatus])
extends Logging
with HiveInspectors {

Expand Down Expand Up @@ -256,7 +257,7 @@ private[orc] case class OrcTableScan(
addColumnIds(attributes, relation, conf)

if (inputPaths.nonEmpty) {
FileInputFormat.setInputPaths(job, inputPaths.map(new Path(_)): _*)
FileInputFormat.setInputPaths(job, inputPaths.map(_.getPath): _*)
}

val inputFormatClass =
Expand Down