-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BugFix] Fix orc tinyint on aarch64 (#49517)
Why I'm doing: https://developer.arm.com/documentation/den0013/d/Porting/Miscellaneous-C-porting-issues/unsigned-char-and-signed-char compiler treat char as unsigned on aarch64, negative tinyint will be wrong, and the query result from orc is null. What I'm doing: use int8_t not char to cast Signed-off-by: wyb <[email protected]> (cherry picked from commit 6de3ab7)
- Loading branch information
1 parent
857dd73
commit 4329646
Showing
4 changed files
with
44 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
-- name: orc_tinyint_aarch64 | ||
|
||
create database db_${uuid0}; | ||
use db_${uuid0}; | ||
|
||
shell: ossutil64 mkdir oss://${oss_bucket}/test_files/orc_format/${uuid0} >/dev/null || echo "exit 0" >/dev/null | ||
|
||
shell: ossutil64 cp --force ./sql/test_files/orc_format/tinyint.orc oss://${oss_bucket}/test_files/orc_format/${uuid0}/ | grep -Pv "(average|elapsed)" | ||
-- result: | ||
0 | ||
|
||
Succeed: Total num: 1, size: 247. OK num: 1(upload 1 files). | ||
-- !result | ||
|
||
select * from files('path' = 'oss://${oss_bucket}/test_files/orc_format/${uuid0}/*', 'format' = 'orc'); | ||
-- result: | ||
-128 | ||
-- !result | ||
|
||
create table t1 as select * from files('path' = 'oss://${oss_bucket}/test_files/orc_format/${uuid0}/*', 'format' = 'orc'); | ||
|
||
desc t1; | ||
-- result: | ||
k1 tinyint YES true None | ||
-- !result | ||
|
||
shell: ossutil64 rm -rf oss://${oss_bucket}/test_files/orc_format/${uuid0}/ > /dev/null |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
-- name: orc_tinyint_aarch64 | ||
|
||
create database db_${uuid0}; | ||
use db_${uuid0}; | ||
|
||
shell: ossutil64 mkdir oss://${oss_bucket}/test_files/orc_format/${uuid0} >/dev/null || echo "exit 0" >/dev/null | ||
shell: ossutil64 cp --force ./sql/test_files/orc_format/tinyint.orc oss://${oss_bucket}/test_files/orc_format/${uuid0}/ | grep -Pv "(average|elapsed)" | ||
|
||
select * from files('path' = 'oss://${oss_bucket}/test_files/orc_format/${uuid0}/*', 'format' = 'orc'); | ||
|
||
create table t1 as select * from files('path' = 'oss://${oss_bucket}/test_files/orc_format/${uuid0}/*', 'format' = 'orc'); | ||
desc t1; | ||
|
||
shell: ossutil64 rm -rf oss://${oss_bucket}/test_files/orc_format/${uuid0}/ > /dev/null |
Binary file not shown.