You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@linkis.apache.org by "peacewong (via GitHub)" <gi...@apache.org> on 2023/03/21 04:06:22 UTC

[GitHub] [linkis] peacewong commented on a diff in pull request #4395: backport spark compatibility #4301 to 1.3.2

peacewong commented on code in PR #4395:
URL: https://github.com/apache/linkis/pull/4395#discussion_r1142870496


##########
linkis-engineconn-plugins/spark/src/main/scala/org/apache/linkis/engineplugin/spark/datacalc/sink/HiveSink.scala:
##########
@@ -184,17 +183,18 @@ class HiveSink extends DataCalcSink[HiveSinkConfig] with Logging {
           logicalRelation.relation match {
             case hadoopFsRelation: HadoopFsRelation =>
               hadoopFsRelation.fileFormat match {
-                case _: org.apache.spark.sql.execution.datasources.orc.OrcFileFormat =>
-                  fileFormat = FileFormat.ORC
                 case _: org.apache.spark.sql.execution.datasources.parquet.ParquetFileFormat =>
                   fileFormat = FileFormat.PARQUET
                 case dataSourceRegister: DataSourceRegister =>
                   fileFormat = FileFormat.withName(dataSourceRegister.shortName.toUpperCase)
                 case _ =>
+                  if (hadoopFsRelation.fileFormat.getClass.getSimpleName.equals("OrcFileFormat")) {
+                    fileFormat = FileFormat.ORC
+                  }
               }
           }
-        case hiveTableRelation: HiveTableRelation =>
-        // todo
+        // case hiveTableRelation: HiveTableRelation =>

Review Comment:
   should case _=>



-- 
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: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org