comphead commented on code in PR #7841:
URL: https://github.com/apache/datafusion-comet/pull/7841#discussion_r4788740512
##########
spark/src/test/resources/sql-tests/expressions/string/string_lpad.sql:
##########
@@ -33,10 +33,10 @@ SELECT lpad(s, 5, pad) FROM test_lpad
query expect_dispatch(lpad)
SELECT lpad('hi', len, pad) FROM test_lpad
-query expect_dispatch(lpad)
+query expect_native(lpad)
SELECT lpad('hi', len, 'xy') FROM test_lpad
-query expect_dispatch(lpad)
+query expect_native(lpad)
SELECT lpad('hi', len) FROM test_lpad
Review Comment:
The literal `str` with a column `len` is now native, but the fixture only
tries `'hi'` with `'xy'` or the default pad. The multibyte rows (`'café'` with
`'中文'`, `'é'` with `'🙂'`) and the empty pad rows are only exercised with a
column `str` and either a column pad (dispatcher) or a column `str` array
kernel arm. The scalar `str` arm counts characters through
`value.is_none_or(str::is_ascii)` (it is a separate arm from the array one), so
a non-ASCII pad or an empty pad with a scalar `str` is a separate path. Please
add native queries such as `lpad('hi', len, '中文')`, `lpad('é', len, '🙂')` and
`lpad('hi', len, '')`, and the same for `string_rpad.sql`. I did not run these.
--
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]