def writeParquetTable()

in tools/gluten-it/common/src/main/scala/org/apache/gluten/integration/ds/TpcdsDataGen.scala [39:81]


  def writeParquetTable(t: Table): Unit = {
    val name = t.getName
    if (name.equals("dbgen_version")) {
      return
    }
    val schema = name match {
      case "catalog_sales" => TpcdsDataGen.catalogSalesSchema
      case "catalog_returns" => TpcdsDataGen.catalogReturnsSchema
      case "inventory" => TpcdsDataGen.inventorySchema
      case "store_sales" => TpcdsDataGen.storeSalesSchema
      case "store_returns" => TpcdsDataGen.storeReturnsSchema
      case "web_sales" => TpcdsDataGen.webSalesSchema
      case "web_returns" => TpcdsDataGen.webReturnsSchema
      case "call_center" => TpcdsDataGen.callCenterSchema
      case "catalog_page" => TpcdsDataGen.catalogPageSchema
      case "customer" => TpcdsDataGen.customerSchema
      case "customer_address" => TpcdsDataGen.customerAddressSchema
      case "customer_demographics" => TpcdsDataGen.customerDemographicsSchema
      case "date_dim" => TpcdsDataGen.dateDimSchema
      case "household_demographics" => TpcdsDataGen.householdDemographicsSchema
      case "income_band" => TpcdsDataGen.incomeBandSchema
      case "item" => TpcdsDataGen.itemSchema
      case "promotion" => TpcdsDataGen.promotionSchema
      case "reason" => TpcdsDataGen.reasonSchema
      case "ship_mode" => TpcdsDataGen.shipModeSchema
      case "store" => TpcdsDataGen.storeSchema
      case "time_dim" => TpcdsDataGen.timeDimSchema
      case "warehouse" => TpcdsDataGen.warehouseSchema
      case "web_page" => TpcdsDataGen.webPageSchema
      case "web_site" => TpcdsDataGen.webSiteSchema
    }
    val partitionBy: List[String] = if (!genPartitionedData) {
      List[String]()
    } else {
      name match {
        case "catalog_sales" => List("cs_sold_date_sk")
        case "web_sales" => List("ws_sold_date_sk")
        case _ => List[String]()
      }
    }

    writeParquetTable(name, t, schema, partitionBy)
  }