LuciferYang commented on PR #37029:
URL: https://github.com/apache/spark/pull/37029#issuecomment-1170953820

   test micro benchmark as follows:
   
   ```
           import spark.implicits._
           spark.range(values).map(_ => 
Random.nextLong).createOrReplaceTempView("t1")
   
           val sqlPart = (1 to pColumns).map(i => s"cast(value % ${i + 1} AS 
STRING) AS p${i + 1}")
             .mkString(",")
           val sqlText = s"SELECT $sqlPart, value AS id FROM t1"
           val partitions = (1 to pColumns).map(i => s"p${i + 1}")
           prepareTable(dir, spark.sql(sqlText), partitions, onlyParquetOrc = 
true)
   
           val partitionsSqlPart = partitions.mkString(",")
   
           withParquetVersions { version =>
             benchmark.addCase(s"Parquet Vectorized: DataPage$version") { _ =>
               spark.sql(s"select $partitionsSqlPart from 
parquet${version}Table").noop()
             }
           }
   
           benchmark.addCase("ORC Vectorized") { _ =>
             spark.sql(s"SELECT $partitionsSqlPart FROM orcTable").noop()
           }
   
           benchmark.run()
   ```


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