Merge pull request #27811 from taosdata/fix/TS-5400
fix(query):fix the issue of return db error when the timestamp is 0
This commit is contained in:
commit
e4d218cddf
|
@ -894,13 +894,7 @@ int64_t* extractTsCol(SSDataBlock* pBlock, const SIntervalAggOperatorInfo* pInfo
|
|||
|
||||
tsCols = (int64_t*)pColDataInfo->pData;
|
||||
if(tsCols[0] == 0) {
|
||||
pTaskInfo->code = TSDB_CODE_QRY_EXECUTOR_INTERNAL_ERROR;
|
||||
T_LONG_JMP(pTaskInfo->env, terrno);
|
||||
}
|
||||
|
||||
// no data in primary ts
|
||||
if (tsCols[0] == 0 && tsCols[pBlock->info.rows - 1] == 0) {
|
||||
return NULL;
|
||||
qWarn("%s at line %d.block start ts:%" PRId64 ",end ts:%" PRId64, __func__, __LINE__, tsCols[0], tsCols[pBlock->info.rows - 1]);
|
||||
}
|
||||
|
||||
if (tsCols[0] != 0 && (pBlock->info.window.skey == 0 && pBlock->info.window.ekey == 0)) {
|
||||
|
|
|
@ -1453,6 +1453,7 @@
|
|||
,,y,script,./test.sh -f tsim/compute/diff2.sim
|
||||
,,y,script,./test.sh -f tsim/compute/first.sim
|
||||
,,y,script,./test.sh -f tsim/compute/interval.sim
|
||||
,,y,script,./test.sh -f tsim/compute/interval1.sim
|
||||
,,y,script,./test.sh -f tsim/compute/last_row.sim
|
||||
,,y,script,./test.sh -f tsim/compute/last.sim
|
||||
,,y,script,./test.sh -f tsim/compute/leastsquare.sim
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
system sh/stop_dnodes.sh
|
||||
system sh/deploy.sh -n dnode1 -i 1
|
||||
system sh/cfg.sh -n dnode1 -c timezone -v UTC
|
||||
system sh/exec.sh -n dnode1 -s start
|
||||
sql connect
|
||||
|
||||
|
||||
sql CREATE DATABASE `alphacloud_alphaess` BUFFER 512 CACHESIZE 1024 CACHEMODEL 'both' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 KEEP 365000d;
|
||||
|
||||
sql use alphacloud_alphaess;
|
||||
|
||||
sql create stable st(ts TIMESTAMP ENCODE 'delta-i' COMPRESS 'lz4' LEVEL 'medium', `uk` VARCHAR(64) ENCODE 'disabled' COMPRESS 'lz4' LEVEL 'medium' PRIMARY KEY ) tags(ta int,tb int,tc int);
|
||||
|
||||
sql create table t1 using st tags(1,1,1);
|
||||
|
||||
sql insert into t1 values ("1970-01-29 05:04:53.000"," 22:: ");
|
||||
|
||||
sql select _wstart, count(*) from st interval(1y);
|
||||
|
||||
if $rows != 1 then
|
||||
print =====rows=$rows
|
||||
return -1
|
||||
endi
|
||||
|
||||
print $data00 $data01 $data02 $data03
|
||||
print $data10 $data11 $data12 $data13
|
||||
|
||||
if $data01 != 1 then
|
||||
print =====data00=$data00
|
||||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
Loading…
Reference in New Issue