-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix](fold) fixed an issue with be computing constants (#43410)
### What problem does this PR solve? issue close: #43061 1、Problem When enable_fold_constant_by_be=true is set,the results of between below queries are inconsistent select hex(from_base64('wr2JEDVXzL9+2XtRhgIloA==')) +----------------------------------------------+ | hex(from_base64('wr2JEDVXzL9+2XtRhgIloA==')) | +----------------------------------------------+ | C2BD89103557CCBF7ED97B51860225A0 | +----------------------------------------------+ select hex(s) from (select from_base64('wr2JEDVXzL9+2XtRhgIloA==') as s) t +--------------------------------------------------+ | hex(s) | +--------------------------------------------------+ | C2BDEFBFBD103557CCBF7EEFBFBD7B51EFBFBD0225EFBFBD | +--------------------------------------------------+ 2、mysql results select hex(s) from (select from_base64('wr2JEDVXzL9+2XtRhgIloA==') as s) t; +----------------------------------+ | hex(s) | +----------------------------------+ | C2BD89103557CCBF7ED97B51860225A0 | +----------------------------------+ 3、cause When processing binary data such as FromBase64, BE will return the original binary data through the bytesValue field, and the previous code only uses the stringValue field, resulting in the binary data being corrupted during the string encoding conversion process
- Loading branch information
Showing
4 changed files
with
29 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
regression-test/data/nereids_p0/expression/fold_constant/fold_constant_by_be.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters