pan3793 commented on code in PR #2635:
URL: https://github.com/apache/incubator-kyuubi/pull/2635#discussion_r877348767


##########
extensions/spark/kyuubi-spark-connector-tpcds/src/main/scala/org/apache/kyuubi/spark/connector/tpcds/TPCDSTableUtils.scala:
##########
@@ -17,8 +17,16 @@
 
 package org.apache.kyuubi.spark.connector.tpcds
 
+import scala.collection.JavaConverters._
+
+import io.trino.tpcds.Table
+import io.trino.tpcds.generator._
+
 object TPCDSTableUtils {
 
+  val BASE_TABLES: Array[Table] = Table.getBaseTables.asScala

Review Comment:
   We don't need upper case, the camel case style is fine



##########
extensions/spark/kyuubi-spark-connector-tpcds/src/main/scala/org/apache/kyuubi/spark/connector/tpcds/TPCDSTableUtils.scala:
##########
@@ -47,4 +55,462 @@ object TPCDSTableUtils {
     "web_sales" -> 226,
     "web_site" -> 292)
 
+  def reviseNullColumnIndex[E <: Enum[E]](table: Table, index: Int): Int = {
+    assert(REVISED_NULL_COLUMN_MAP(table.getName).length == 
table.getColumns.length)
+    REVISED_NULL_COLUMN_MAP(table.getName)(index).getGlobalColumnNumber -
+      table.getGeneratorColumns.head.getGlobalColumnNumber
+  }
+
+  // Collected from `getValues` method of all Row classes,
+  // like: io.trino.tpcds.row.CallCenterRow.getValues
+  private val REVISED_NULL_COLUMN_MAP: Map[String, Array[GeneratorColumn]] = 
Map(

Review Comment:
   ditto



-- 
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]

Reply via email to