jayzhan211 commented on PR #14440: URL: https://github.com/apache/datafusion/pull/14440#issuecomment-2650402809
I revisit the binary to string for ascii but it seems either Postgres and Duckdb correctly support it. ``` postgres=# select ascii('0xa'); ascii ------- 48 (1 row) postgres=# select ascii(X'a'); ERROR: function ascii(bit) does not exist LINE 1: select ascii(X'a'); ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. postgres=# select ascii(x'a'); ERROR: function ascii(bit) does not exist LINE 1: select ascii(x'a'); ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. postgres=# select ascii('xa'); ascii ------- 120 (1 row) ``` ``` D select ascii('0xa'); ┌──────────────┐ │ ascii('0xa') │ │ int32 │ ├──────────────┤ │ 48 │ └──────────────┘ D select ascii(x'a'); ┌─────────────┐ │ ascii('xa') │ │ int32 │ ├─────────────┤ │ 120 │ └─────────────┘ D select ascii('xa'); ┌─────────────┐ │ ascii('xa') │ │ int32 │ ├─────────────┤ │ 120 │ └─────────────┘ Note that DuckDB process ascii(x'a') as ascii('xa') which is not binary ``` -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org