pan3793 commented on code in PR #7123: URL: https://github.com/apache/kyuubi/pull/7123#discussion_r2191909545
########## extensions/spark/kyuubi-spark-connector-hive/src/test/scala/org/apache/kyuubi/spark/connector/hive/HiveCatalogSuite.scala: ########## @@ -355,8 +357,26 @@ class HiveCatalogSuite extends KyuubiHiveTest { val orcProps: util.Map[String, String] = new util.HashMap[String, String]() orcProps.put(TableCatalog.PROP_PROVIDER, "orc") val ot = catalog.createTable(orc_table, schema, Array.empty[Transform], orcProps) - val orcScan = ot.asInstanceOf[HiveTable] - .newScanBuilder(CaseInsensitiveStringMap.empty()).build().asInstanceOf[HiveScan] - assert(orcScan.isSplitable(new Path("empty"))) + + Seq("true", "false").foreach { value => + withSparkSession(Map(READ_CONVERT_METASTORE_ORC.key -> value)) { _ => + val scan = ot.asInstanceOf[HiveTable] + .newScanBuilder(CaseInsensitiveStringMap.empty()).build() + + val orcScan = value match { + case "true" => + assert( + scan.isInstanceOf[OrcScan], + s"Expected OrcScan, got ${scan.getClass.getSimpleName}") + scan.asInstanceOf[OrcScan] + case "false" => + assert( + scan.isInstanceOf[HiveScan], + s"Expected HiveScan, got ${scan.getClass.getSimpleName}") + scan.asInstanceOf[HiveScan] Review Comment: we need a `case _` branch -- 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-unsubscr...@kyuubi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org For additional commands, e-mail: notifications-h...@kyuubi.apache.org