You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/05/19 13:23:36 UTC
[GitHub] [incubator-kyuubi] wForget commented on a diff in pull request #2635: [KYUUBI #2541] Set nullable in table schema
wForget commented on code in PR #2635:
URL: https://github.com/apache/incubator-kyuubi/pull/2635#discussion_r877050470
##########
extensions/spark/kyuubi-spark-connector-tpcds/src/main/scala/org/apache/kyuubi/spark/connector/tpcds/TPCDSTableUtils.scala:
##########
@@ -47,4 +55,81 @@ object TPCDSTableUtils {
"web_sales" -> 226,
"web_site" -> 292)
+ def reviseNullColumnIndex[E <: Enum[E]](table: Table, index: Int): Int = {
+ nullColumnIndexRevisers(table.getName).getReviseNullColumnIndex(index)
+ }
+
+ private val nullColumnIndexRevisers: Map[String, NullColumnIndexReviser] =
+ initNullColumnIndexRevisers()
+
+ private def initNullColumnIndexRevisers[E <: Enum[E]](): Map[String, NullColumnIndexReviser] = {
+ Table.getBaseTables.asScala
+ .filterNot(_.getName == "dbgen_version").map { table =>
Review Comment:
> We excluded the table in another places as well, let extract a variable for all tpc-ds tables instead of filter out every time
how about we extract `TPCDSCatalog.tables` into `TPCDSTableUtils`?
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org