airborne12 opened a new pull request, #62699:
URL: https://github.com/apache/doris/pull/62699
## Proposed changes
Fix a bug in the `tokenize` function where `unpack_if_const` unwraps a
`ColumnConst` to its inner data column (which has only 1 row), but
`_do_tokenize` and `_do_tokenize_none` iterate based on the source column's row
count. This causes only 1 output row to be produced instead of
`input_rows_count` rows when the first argument is a constant.
For example, `SELECT tokenize('hello world', 'parser=english') FROM
table_with_many_rows` would previously return only 1 row instead of the
expected number of rows matching the table.
The fix wraps the result in `ColumnConst` when the source column was const,
which is the standard pattern used throughout the Doris codebase for handling
const columns in function execution.
## Further comments
Related Jira: DORIS-25296
## Checklist(Required)
1. Does it affect the results of the existing test cases (Yes/No): No
2. Does it need to update the document (Yes/No): No
3. Is there a risk of compatibility changes (Yes/No): No
--
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]