dongjoon-hyun commented on code in PR #46266:
URL: https://github.com/apache/spark/pull/46266#discussion_r1585542430
##########
connector/avro/src/test/scala/org/apache/spark/sql/execution/benchmark/AvroReadBenchmark.scala:
##########
@@ -87,7 +87,7 @@ object AvroReadBenchmark extends SqlBasedBenchmark {
prepareTable(
dir,
- spark.sql("SELECT CAST(value AS INT) AS c1, CAST(value as STRING) AS
c2 FROM t1"))
+ spark.sql(s"SELECT value % ${Int.MaxValue} AS c1, CAST(value as
STRING) AS c2 FROM t1"))
Review Comment:
Oh, nvm.
##########
connector/avro/src/test/scala/org/apache/spark/sql/execution/benchmark/AvroReadBenchmark.scala:
##########
@@ -87,7 +87,7 @@ object AvroReadBenchmark extends SqlBasedBenchmark {
prepareTable(
dir,
- spark.sql("SELECT CAST(value AS INT) AS c1, CAST(value as STRING) AS
c2 FROM t1"))
+ spark.sql(s"SELECT value % ${Int.MaxValue} AS c1, CAST(value as
STRING) AS c2 FROM t1"))
Review Comment:
~This looks like a different benchmark, why do we use a static value here
instead of `column` of `t1`, @yaooqinn ?~
##########
connector/avro/src/test/scala/org/apache/spark/sql/execution/benchmark/AvroReadBenchmark.scala:
##########
@@ -106,7 +106,8 @@ object AvroReadBenchmark extends SqlBasedBenchmark {
import spark.implicits._
spark.range(values).map(_ =>
Random.nextLong()).createOrReplaceTempView("t1")
- prepareTable(dir, spark.sql("SELECT value % 2 AS p, value AS id FROM
t1"), Some("p"))
+ prepareTable(dir,
+ spark.sql(s"SELECT value % 2 AS p, value % ${Int.MaxValue} AS id
FROM t1"), Some("p"))
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]