zhztheplayer commented on code in PR #8316:
URL: https://github.com/apache/incubator-gluten/pull/8316#discussion_r1896349642
##########
shims/spark32/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala:
##########
@@ -90,19 +90,8 @@ class OrcFileFormat extends FileFormat with
DataSourceRegister with Serializable
options: Map[String, String],
dataSchema: StructType): OutputWriterFactory = {
val orcOptions = new OrcOptions(options, sparkSession.sessionState.conf)
-
- val conf = job.getConfiguration
-
- conf.set(MAPRED_OUTPUT_SCHEMA.getAttribute,
OrcFileFormat.getQuotedSchemaString(dataSchema))
-
- conf.set(COMPRESS.getAttribute, orcOptions.compressionCodec)
-
- conf
- .asInstanceOf[JobConf]
-
.setOutputFormat(classOf[org.apache.orc.mapred.OrcOutputFormat[OrcStruct]])
-
if ("true" ==
sparkSession.sparkContext.getLocalProperty("isNativeApplicable")) {
Review Comment:
This might be subjective though it's a bit weird to see these Yoda
conditions in our Scala code base. Perhaps we could invert them (in future).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]