forked from facebookincubator/velox
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix casting of varchar to integral types by trimming unicode and cont…
…rol characters (facebookincubator#10957) Summary: Presto ignores whitespace (both unicode and ascii) along with control chars when trimming a varchar to cast to integer. However Velox which uses folly underneath doesnt do this. This PR brings velox to use similar behavior. For e.g the following works in Presto but fails in Prestissimo: ``` select cast((from_utf8(from_hex('2002')) || x || (from_utf8(from_hex('0F')))) as integer) from (values '123') t(x); ``` Pull Request resolved: facebookincubator#10957 Reviewed By: kevinwilfong Differential Revision: D62408635 Pulled By: kgpai
- Loading branch information
1 parent
baaf559
commit a67cc61
Showing
3 changed files
with
112 additions
and
17 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
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