andygrove commented on code in PR #552:
URL: https://github.com/apache/datafusion-comet/pull/552#discussion_r1639802809
##########
spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala:
##########
@@ -1053,6 +1053,32 @@ class CometExpressionSuite extends CometTestBase with
AdaptiveSparkPlanHelper {
}
}
+ test("Chr with negative and large value") {
+ Seq(false, true).foreach { dictionary =>
+ withSQLConf(
+ "parquet.enable.dictionary" -> dictionary.toString,
+ CometConf.COMET_CAST_ALLOW_INCOMPATIBLE.key -> "true") {
+ val table = "test0"
+ withTable(table) {
+ sql(s"create table $table(c9 int, c4 int) using parquet")
+ sql(
+ s"insert into $table values(0, 0), (61231, -61231), (-1700, 1700),
(0, -4000), (-40, 40)")
Review Comment:
Let's add a test for the case where `integer & 0xFF == 0` since that is not
currently covered (other than with the value 0).
```suggestion
s"insert into $table values(0, 0), (61231, -61231), (-1700,
1700), (0, -4000), (-40, 40), {256, 512)")
```
##########
spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala:
##########
@@ -1053,6 +1053,32 @@ class CometExpressionSuite extends CometTestBase with
AdaptiveSparkPlanHelper {
}
}
+ test("Chr with negative and large value") {
+ Seq(false, true).foreach { dictionary =>
+ withSQLConf(
+ "parquet.enable.dictionary" -> dictionary.toString,
+ CometConf.COMET_CAST_ALLOW_INCOMPATIBLE.key -> "true") {
+ val table = "test0"
+ withTable(table) {
+ sql(s"create table $table(c9 int, c4 int) using parquet")
+ sql(
+ s"insert into $table values(0, 0), (61231, -61231), (-1700, 1700),
(0, -4000), (-40, 40)")
Review Comment:
Let's add a test for the case where `integer & 0xFF == 0` since that is not
currently covered (other than with the value 0).
```suggestion
s"insert into $table values(0, 0), (61231, -61231), (-1700,
1700), (0, -4000), (-40, 40), (256, 512)")
```
--
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]