andygrove commented on issue #2612:
URL: 
https://github.com/apache/datafusion-comet/issues/2612#issuecomment-3423248058

   Here is a full repro that can be added to `CometArrayExpressionSuite`:
   
   ```
     test("array_reverse") {
       withTempDir { dir =>
         val path = new Path(dir.toURI.toString, "test.parquet")
         val filename = path.toString
         val random = new Random(42)
         withSQLConf(CometConf.COMET_ENABLED.key -> "false") {
           val options = DataGenOptions(
             allowNull = true,
             generateNegativeZero = false,
             generateArray = true,
             generateStruct = false,
             generateMap = false)
           ParquetGenerator.makeParquetFile(random, spark, filename, 100, 
options)
         }
         withTempView("t1") {
           val table = spark.read.parquet(filename)
           table.createOrReplaceTempView("t1")
           for (field <- 
table.schema.fields.filter(_.dataType.isInstanceOf[ArrayType])) {
             val sql = s"SELECT ${field.name}, reverse(${field.name}) FROM t1 
ORDER BY ${field.name}"
             checkSparkAnswer(sql)
           }
         }
       }
     }
   ```


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