fix: block extraction null set error
This commit is contained in:
parent
56b2529814
commit
2ba5fdc36f
|
@ -493,7 +493,7 @@ SSDataBlock* blockDataExtractBlock(SSDataBlock* pBlock, int32_t startIndex, int3
|
|||
for (int32_t j = startIndex; j < (startIndex + rowCount); ++j) {
|
||||
bool isNull = false;
|
||||
if (pBlock->pBlockAgg == NULL) {
|
||||
isNull = colDataIsNull_s(pColData, pBlock->info.rows);
|
||||
isNull = colDataIsNull_s(pColData, j);
|
||||
} else {
|
||||
isNull = colDataIsNull(pColData, pBlock->info.rows, j, pBlock->pBlockAgg[i]);
|
||||
}
|
||||
|
|
|
@ -409,7 +409,7 @@ void udfdPipeCloseCb(uv_handle_t *pipe) {
|
|||
void udfdUvHandleError(SUdfdUvConn *conn) { uv_close((uv_handle_t *)conn->client, udfdPipeCloseCb); }
|
||||
|
||||
void udfdPipeRead(uv_stream_t *client, ssize_t nread, const uv_buf_t *buf) {
|
||||
fnDebug("udf read %zu bytes from client", nread);
|
||||
fnDebug("udf read %zd bytes from client", nread);
|
||||
if (nread == 0) return;
|
||||
|
||||
SUdfdUvConn *conn = client->data;
|
||||
|
|
|
@ -64,35 +64,35 @@ if $data00 != 1.414213562 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
#sql insert into t2 values(now+2s, 1, null)(now+3s, null, 2);
|
||||
#sql select udf1(f1, f2) from t2;
|
||||
#print $rows , $data00 , $data10 , $data20 , $data30
|
||||
#if $rows != 4 then
|
||||
# return -1
|
||||
#endi
|
||||
#if $data00 != 88 then
|
||||
# return -1
|
||||
#endi
|
||||
#if $data10 != 88 then
|
||||
# return -1
|
||||
#endi
|
||||
#
|
||||
#if $data20 != NULL then
|
||||
# return -1
|
||||
#endi
|
||||
#
|
||||
#if $data30 != NULL then
|
||||
# return -1
|
||||
#endi
|
||||
#
|
||||
#sql select udf2(f1, f2) from t2;
|
||||
#print $rows, $data00
|
||||
#if $rows != 1 then
|
||||
# return -1
|
||||
#endi
|
||||
#if $data00 != 2.645751311 then
|
||||
# return -1
|
||||
#endi
|
||||
sql insert into t2 values(now+2s, 1, null)(now+3s, null, 2);
|
||||
sql select udf1(f1, f2) from t2;
|
||||
print $rows , $data00 , $data10 , $data20 , $data30
|
||||
if $rows != 4 then
|
||||
return -1
|
||||
endi
|
||||
if $data00 != 88 then
|
||||
return -1
|
||||
endi
|
||||
if $data10 != 88 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data20 != NULL then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data30 != NULL then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select udf2(f1, f2) from t2;
|
||||
print $rows, $data00
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
if $data00 != 2.645751311 then
|
||||
return -1
|
||||
endi
|
||||
sql drop function udf1;
|
||||
sql show functions;
|
||||
if $rows != 1 then
|
||||
|
|
Loading…
Reference in New Issue