andygrove opened a new issue, #463:
URL: https://github.com/apache/datafusion-comet/issues/463
### Describe the bug
repro is to modify this existing test in `CometExpressionSuite` to also test
negative indices:
```scala
test("string type and substring") {
withParquetTable((0 until 5).map(i => (i.toString, (i + 100).toString)),
"tbl") {
checkSparkAnswerAndOperator("SELECT _1, substring(_2, 2, 2) FROM tbl")
checkSparkAnswerAndOperator("SELECT _1, substring(_2, 2, -2) FROM tbl")
checkSparkAnswerAndOperator("SELECT _1, substring(_2, -2, 2) FROM tbl")
checkSparkAnswerAndOperator("SELECT _1, substring(_2, -2, -2) FROM
tbl")
}
}
```
output:
```
== Results ==
!== Correct Answer - 5 == == Spark Answer - 5 ==
struct<_1:string,substring(_2, 2, -2):string>
struct<_1:string,substring(_2, 2, -2):string>
![0,] [0,00]
![1,] [1,01]
![2,] [2,02]
![3,] [3,03]
![4,] [4,04]
```
### Steps to reproduce
_No response_
### Expected behavior
_No response_
### Additional context
_No response_
--
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]