Skip to content

Commit e3f67a9

Browse files
dongjoon-hyuncloud-fan
authored andcommitted
[SPARK-22416][SQL] Move OrcOptions from sql/hive to sql/core
## What changes were proposed in this pull request? According to the [discussion](#19571 (comment)) 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](#14554). ## How was this patch tested? Pass the Jenkins with the existing tests. Author: Dongjoon Hyun <[email protected]> Closes #19636 from dongjoon-hyun/SPARK-22416.
1 parent 41b6012 commit e3f67a9

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

sql/hive/src/main/scala/org/apache/spark/sql/hive/orc/OrcOptions.scala renamed to sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcOptions.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package org.apache.spark.sql.hive.orc
18+
package org.apache.spark.sql.execution.datasources.orc
1919

2020
import java.util.Locale
2121

@@ -27,7 +27,7 @@ import org.apache.spark.sql.internal.SQLConf
2727
/**
2828
* Options for the ORC data source.
2929
*/
30-
private[orc] class OrcOptions(
30+
class OrcOptions(
3131
@transient private val parameters: CaseInsensitiveMap[String],
3232
@transient private val sqlConf: SQLConf)
3333
extends Serializable {
@@ -59,7 +59,7 @@ private[orc] class OrcOptions(
5959
}
6060
}
6161

62-
private[orc] object OrcOptions {
62+
object OrcOptions {
6363
// The ORC compression short names
6464
private val shortOrcCompressionCodecNames = Map(
6565
"none" -> "NONE",

sql/hive/src/main/scala/org/apache/spark/sql/hive/orc/OrcFileFormat.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import org.apache.spark.sql.SparkSession
3939
import org.apache.spark.sql.catalyst.InternalRow
4040
import org.apache.spark.sql.catalyst.expressions._
4141
import org.apache.spark.sql.execution.datasources._
42+
import org.apache.spark.sql.execution.datasources.orc.OrcOptions
4243
import org.apache.spark.sql.hive.{HiveInspectors, HiveShim}
4344
import org.apache.spark.sql.sources.{Filter, _}
4445
import org.apache.spark.sql.types.StructType

sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcSourceSuite.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import org.apache.orc.OrcConf.COMPRESS
2424
import org.scalatest.BeforeAndAfterAll
2525

2626
import org.apache.spark.sql.{QueryTest, Row}
27+
import org.apache.spark.sql.execution.datasources.orc.OrcOptions
2728
import org.apache.spark.sql.hive.test.TestHiveSingleton
2829
import org.apache.spark.sql.internal.SQLConf
2930
import org.apache.spark.sql.sources._

0 commit comments

Comments
 (0)