[SPARK-22416][SQL] Move OrcOptions from sql/hive
to sql/core
## What changes were proposed in this pull request? According to the [discussion](https://github.com/apache/spark/pull/19571#issuecomment-339472976) on SPARK-15474, we will add new OrcFileFormat in `sql/core` module and allow users to use both old and new OrcFileFormat. To do that, `OrcOptions` should be visible in `sql/core` module, too. Previously, it was `private[orc]` in `sql/hive`. This PR removes `private[orc]` because we don't use `private[sql]` in `sql/execution` package after [SPARK-16964](https://github.com/apache/spark/pull/14554). ## How was this patch tested? Pass the Jenkins with the existing tests. Author: Dongjoon Hyun <dongjoon@apache.org> Closes #19636 from dongjoon-hyun/SPARK-22416.
This commit is contained in:
parent
41b60125b6
commit
e3f67a97f1
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.spark.sql.hive.orc
|
||||
package org.apache.spark.sql.execution.datasources.orc
|
||||
|
||||
import java.util.Locale
|
||||
|
||||
|
@ -27,7 +27,7 @@ import org.apache.spark.sql.internal.SQLConf
|
|||
/**
|
||||
* Options for the ORC data source.
|
||||
*/
|
||||
private[orc] class OrcOptions(
|
||||
class OrcOptions(
|
||||
@transient private val parameters: CaseInsensitiveMap[String],
|
||||
@transient private val sqlConf: SQLConf)
|
||||
extends Serializable {
|
||||
|
@ -59,7 +59,7 @@ private[orc] class OrcOptions(
|
|||
}
|
||||
}
|
||||
|
||||
private[orc] object OrcOptions {
|
||||
object OrcOptions {
|
||||
// The ORC compression short names
|
||||
private val shortOrcCompressionCodecNames = Map(
|
||||
"none" -> "NONE",
|
|
@ -39,6 +39,7 @@ import org.apache.spark.sql.SparkSession
|
|||
import org.apache.spark.sql.catalyst.InternalRow
|
||||
import org.apache.spark.sql.catalyst.expressions._
|
||||
import org.apache.spark.sql.execution.datasources._
|
||||
import org.apache.spark.sql.execution.datasources.orc.OrcOptions
|
||||
import org.apache.spark.sql.hive.{HiveInspectors, HiveShim}
|
||||
import org.apache.spark.sql.sources.{Filter, _}
|
||||
import org.apache.spark.sql.types.StructType
|
||||
|
|
|
@ -24,6 +24,7 @@ import org.apache.orc.OrcConf.COMPRESS
|
|||
import org.scalatest.BeforeAndAfterAll
|
||||
|
||||
import org.apache.spark.sql.{QueryTest, Row}
|
||||
import org.apache.spark.sql.execution.datasources.orc.OrcOptions
|
||||
import org.apache.spark.sql.hive.test.TestHiveSingleton
|
||||
import org.apache.spark.sql.internal.SQLConf
|
||||
import org.apache.spark.sql.sources._
|
||||
|
|
Loading…
Reference in a new issue