提交 5abe0e13 编写于 作者: G Ganlin Zhao

[TD-14121]<fix>: script/general/compute/cast.sim failed on ARM64 Linux

上级 424ef567
......@@ -1725,6 +1725,9 @@ void castConvert(int16_t inputType, int16_t inputBytes, char *input, int16_t Out
tfree(newColData);
} else {
GET_TYPED_DATA(*(int64_t *)output, int64_t, inputType, input);
if (*(int64_t *)output == TSDB_DATA_BIGINT_NULL) {
SET_TYPED_DATA(output, OutputType, INT64_MAX);
}
}
break;
case TSDB_DATA_TYPE_UBIGINT:
......@@ -1755,6 +1758,9 @@ void castConvert(int16_t inputType, int16_t inputBytes, char *input, int16_t Out
} else {
GET_TYPED_DATA(*(int64_t *)output, int64_t, inputType, input);
}
if (*(int64_t *)output == TSDB_DATA_BIGINT_NULL) {
SET_TYPED_DATA(output, OutputType, INT64_MAX);
}
break;
case TSDB_DATA_TYPE_BINARY:
if (inputType == TSDB_DATA_TYPE_BOOL) {
......
......@@ -1158,10 +1158,10 @@ endi
if $data40 != 4 then
return -1
endi
if $data50 != NULL then
if $data50 != 9223372036854775807 then
return -1
endi
if $data60 != NULL then
if $data60 != 9223372036854775807 then
return -1
endi
sql select cast(c6 as binary(60)) from tb1;
......@@ -1233,10 +1233,11 @@ endi
if $data40 != @70-01-01 08:00:00.004@ then
return -1
endi
if $data50 != NULL then
print $data50
if $data50 != @94-08-17 15:12:55.807@ then
return -1
endi
if $data60 != NULL then
if $data60 != @94-08-17 15:12:55.807@ then
return -1
endi
sql select cast(c6 as nchar(50)) from tb1;
......@@ -1331,10 +1332,10 @@ endi
if $data40 != 4 then
return -1
endi
if $data50 != NULL then
if $data50 != 9223372036854775807 then
return -1
endi
if $data60 != NULL then
if $data60 != 9223372036854775807 then
return -1
endi
sql select cast(c7 as binary(400)) from tb1;
......@@ -1406,10 +1407,10 @@ endi
if $data40 != @70-01-01 08:00:00.004@ then
return -1
endi
if $data50 != NULL then
if $data50 != @94-08-17 15:12:55.807@ then
return -1
endi
if $data60 != NULL then
if $data60 != @94-08-17 15:12:55.807@ then
return -1
endi
sql select cast(c7 as nchar(500)) from tb1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册