-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Feature] Implement string function ord following DuckDB semantics #60409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Co-authored-by: zclllyybb <[email protected]>
Co-authored-by: zclllyybb <[email protected]>
|
run buildall |
TPC-H: Total hot run time: 31748 ms |
ClickBench: Total hot run time: 28.61 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
FE Regression Coverage ReportIncrement line coverage |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
FE Regression Coverage ReportIncrement line coverage |
Implements
ord(string)function that returns the Unicode code point of the first character, following DuckDB semantics.Changes
BE Implementation (
be/src/vec/functions/function_string.cpp)StringOrdstruct with proper UTF-8 to Unicode code point decodingInt64to accommodate full Unicode range (0 to 0x10FFFF)FE Implementation
Ord.javascalar function class returningBigIntTypeBuiltinScalarFunctions.javaandScalarFunctionVisitor.javaTests
query_p0andnereids_p0suitesExample
Key difference from
ascii()ascii()returns the first byte valueord()decodes UTF-8 and returns the actual Unicode code pointWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
duckdb.org/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.