Blizzara commented on code in PR #11277:
URL: https://github.com/apache/datafusion/pull/11277#discussion_r1666801964
##########
datafusion/substrait/tests/cases/roundtrip_logical_plan.rs:
##########
@@ -327,7 +327,7 @@ async fn simple_scalar_function_pow() -> Result<()> {
#[tokio::test]
async fn simple_scalar_function_substr() -> Result<()> {
- roundtrip("SELECT * FROM data WHERE a = SUBSTR('datafusion', 0, 3)").await
+ roundtrip("SELECT SUBSTR(f, 1, 3) FROM data").await
Review Comment:
> is there a reason to change the test?
Yes - the original query gets optimized by DF into `SELECT * FROM data WHERE
a = "dat"` before being converted into Substrait, i.e. the whole SUBSTRING call
is optimized away:
```
Filter: CAST(data.a AS Utf8) = Utf8("da")
TableScan: data projection=[a, b, c, d, e, f, g],
partial_filters=[CAST(data.a AS Utf8) = Utf8("da")]
```
> Maybe we could add this particular query as an additioanl query (to show
the existing behavior is not changed).
I can add it back, but it doesn't really test what it tries to test 😅 given
that would you still like to have it?
--
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]