interp_test.sim 18.5 KB
Newer Older
S
slguan 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
sleep 3000
sql connect

$dbPrefix = intp_db
$tbPrefix = intp_tb
$stbPrefix = intp_stb
$tbNum = 4
$rowNum = 10000
$totalNum = $tbNum * $rowNum
$ts0 = 1537146000000
$delta = 600000
print ========== intp_test.sim
$i = 0
$db = $dbPrefix . $i
$stb = $stbPrefix . $i
$tsu = $rowNum * $delta
$tsu = $tsu - $delta
$tsu = $tsu + $ts0

print ====== use db
sql use $db

##### select interp from table
print ====== select intp from table
$tb = $tbPrefix . 0
  ## interp(*) from tb
  sql select interp(*) from $tb where ts = $ts0
  if $rows != 1 then
    return -1
  endi
  if $data00 != @18-09-17 09:00:00.000@ then
    return -1
  endi
  if $data01 != 0 then
    return -1
  endi
  if $data02 != 0 then
    return -1
  endi

  ## interp + limit offset
  sql select interp(*) from $tb where ts = $ts0 limit 5 offset 1
  if $rows != 0 then
    return -1
  endi

  sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $ts0
  if $rows != 1 then
    return -1
  endi
  if $data00 != @18-09-17 09:00:00.000@ then
    return -1
  endi
  if $data01 != 0 then
    return -1
  endi
  if $data02 != 0 then
    return -1
  endi
  if $data03 != 0.00000 then
    return -1
  endi
  if $data04 != 0.000000000 then
    return -1
  endi
  if $data05 != 0 then
    return -1
  endi
  if $data06 != 0 then
     return -1
  endi
  if $data07 != 1 then
    return -1
  endi
  if $data08 != binary0 then
    return -1
  endi
  if $data09 != nchar0 then
    return -1
  endi

  ## intp + aggregation functions
  #$t = $ts0 + $delta
  #$t = $t + $delta
  #sql_error select interp(ts), max(c1), min(c2), count(c3), sum(c4), avg(c5), stddev(c6), first(c7), last(c8), interp(c9) from $tb where ts = $t

  ### illegal queries on a table
  sql_error select interp(ts), c1 from $tb where ts = $ts0
  sql_error select interp(ts) from $tb where ts >= $ts0
90
  sql_error select interp(ts), max(c1), min(c2), count(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(NULL)
S
slguan 已提交
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109

  ### interp from tb + fill
  $t = $ts0 + 1000
  sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t
  if $rows != 0 then
    return -1
  endi

  ## fill(none)
  sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(none)
  if $rows != 0 then
    return -1
  endi
  $t = $tsu + 1000
  sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(none)
  if $rows != 0 then
    return -1
  endi

110
  ## fill(NULL)
S
slguan 已提交
111 112 113 114 115 116 117 118
  $t = $tsu - 1000
  sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(value, NULL) order by ts asc
  if $rows != 1 then
    return -1
  endi
  if $data00 != @18-11-25 19:29:59.000@ then
    return -1
  endi
119
  if $data01 != NULL then
S
slguan 已提交
120 121
    return -1
  endi
122
  if $data02 != NULL then
S
slguan 已提交
123 124
    return -1
  endi
125
  if $data03 != NULL then
S
slguan 已提交
126 127
    return -1
  endi
128
  if $data04 != NULL then
S
slguan 已提交
129 130
    return -1
  endi
131
  if $data05 != NULL then
S
slguan 已提交
132 133
    return -1
  endi
134
  if $data06 != NULL then
S
slguan 已提交
135 136
    return -1
  endi
137
  if $data07 != NULL then
S
slguan 已提交
138 139
    return -1
  endi
140
  if $data08 != NULL then
S
slguan 已提交
141 142
    return -1
  endi
143
  if $data09 != NULL then
S
slguan 已提交
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211
    return -1
  endi

  $t = $tsu + 1000
  sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(none)
  if $rows != 0 then
    return -1
  endi

  ## fill(prev)
  $t = $ts0 + 1000
  sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(prev)
  if $rows != 1 then
    return -1
  endi

  sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $ts0 fill(prev)
  if $rows != 1 then
    return -1
  endi
  if $data00 != @18-09-17 09:00:00.000@ then
    return -1
  endi
  if $data01 != 0 then
    return -1
  endi
  if $data02 != 0 then
    return -1
  endi
  if $data03 != 0.00000 then
    return -1
  endi
  if $data04 != 0.000000000 then
    return -1
  endi
  if $data05 != 0 then
    return -1
  endi
  if $data06 != 0 then
     return -1
  endi
  if $data07 != 1 then
    return -1
  endi
  if $data08 != binary0 then
    return -1
  endi
  if $data09 != nchar0 then
    return -1
  endi

  $t = $ts0 - 1000
  sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(prev)
  if $rows != 0 then
    return -1
  endi

  $t = $ts0 + 1000
  sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from intp_tb3 where ts = $t fill(prev)
  if $rows != 1 then
    return -1
  endi
  if $data00 != @18-09-17 09:00:01.000@ then
    return -1
  endi
  if $data01 != 0 then
    return -1
  endi
212
  if $data02 != NULL then
S
slguan 已提交
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256
    return -1
  endi
  if $data03 != 0.00000 then
    return -1
  endi
#  if $data04 != NULL then
#    return -1
#  endi

  $t = $tsu + 1000
  sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(prev)
  if $rows != 0 then
    return -1
  endi

  ## fill(linear)
  $t = $ts0 + 1000
  sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(linear)
  print ====== 0:$data00, 1:$data01, 2:$data02, 3:$data03, 4:$data04, 5:$data05, 6:$data06, 7:$data07, 8:$data08, 9:$data09
  if $rows != 1 then
    return -1
  endi
  if $data00 != @18-09-17 09:00:01.000@ then
    return -1
  endi
  if $data01 != 0 then
    return -1
  endi
  if $data02 != 0 then
    return -1
  endi
  print $data03
  if $data03 != 0.00167 then
    return -1
  endi
  if $data04 != 0.001666667 then
    return -1
  endi
  if $data05 != 0 then
    return -1
  endi
  if $data06 != 0 then
     return -1
  endi
257
  if $data07 != NULL then
S
slguan 已提交
258 259
    return -1
  endi
260
  if $data08 != NULL then
S
slguan 已提交
261 262
    return -1
  endi
263
  if $data09 != NULL then
S
slguan 已提交
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278
    return -1
  endi
  # columns contain NULL values
  $t = $ts0 + 1000
  sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from intp_tb3 where ts = $t fill(linear)
  print ====== 0:$data00, 1:$data01, 2:$data02, 3:$data03, 4:$data04, 5:$data05, 6:$data06, 7:$data07, 8:$data08, 9:$data09
  if $rows != 1 then
    return -1
  endi
  if $data00 != @18-09-17 09:00:01.000@ then
    return -1
  endi
  if $data01 != 0 then
    return -1
  endi
279
  if $data02 != NULL then
S
slguan 已提交
280 281 282 283 284
    return -1
  endi
  if $data03 != 0.00167 then
    return -1
  endi
285
  if $data04 != NULL then
S
slguan 已提交
286 287 288 289 290 291 292 293
    return -1
  endi
  if $data05 != 0 then
    return -1
  endi
  if $data06 != 0 then
     return -1
  endi
294
  if $data07 != NULL then
S
slguan 已提交
295 296
    return -1
  endi
297
  if $data08 != NULL then
S
slguan 已提交
298 299
    return -1
  endi
300
  if $data09 != NULL then
S
slguan 已提交
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348
    return -1
  endi

  sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $ts0 fill(linear)
  if $rows != 1 then
    return -1
  endi
  if $data00 != @18-09-17 09:00:00.000@ then
    return -1
  endi
  if $data01 != 0 then
    return -1
  endi
  if $data02 != 0 then
    return -1
  endi
  if $data03 != 0.00000 then
    return -1
  endi
  if $data04 != 0.000000000 then
    return -1
  endi
  if $data05 != 0 then
    return -1
  endi
  if $data06 != 0 then
     return -1
  endi
  if $data07 != 1 then
    return -1
  endi
  if $data08 != binary0 then
    return -1
  endi
  if $data09 != nchar0 then
    return -1
  endi
  # columns contain NULL values
  sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from intp_tb3 where ts = $ts0 fill(linear)
  if $rows != 1 then
    return -1
  endi
  if $data00 != @18-09-17 09:00:00.000@ then
    return -1
  endi
  if $data01 != 0 then
    return -1
  endi
349
  if $data02 != NULL then
S
slguan 已提交
350 351 352 353 354
    return -1
  endi
  if $data03 != 0.00000 then
    return -1
  endi
355
  if $data04 != NULL then
S
slguan 已提交
356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415
    return -1
  endi
  if $data05 != 0 then
    return -1
  endi
  if $data06 != 0 then
     return -1
  endi
  if $data07 != 1 then
    return -1
  endi
  if $data08 != binary0 then
    return -1
  endi
  if $data09 != nchar0 then
    return -1
  endi

  $t = $ts0 - 1000
  sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(linear)
  if $rows != 0 then
    return -1
  endi

  $t = $tsu + 1000
  sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(linear)
  if $rows != 0 then
    return -1
  endi

## fill(value)
  $t = $ts0 + 1000
  sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(value, -1, -2)
  if $rows != 1 then
    return -1
  endi
  if $data00 != @18-09-17 09:00:01.000@ then
    return -1
  endi
  if $data01 != -2 then
    return -1
  endi
  if $data02 != -2 then
    return -1
  endi
  if $data03 != -2.00000 then
    return -1
  endi
  if $data04 != -2.000000000 then
    return -1
  endi
  if $data05 != -2 then
    return -1
  endi
  if $data06 != -2 then
     return -1
  endi
  if $data07 != 1 then
    return -1
  endi
416
  if $data08 != NULL then
S
slguan 已提交
417 418
    return -1
  endi
419
  if $data09 != NULL then
S
slguan 已提交
420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456
    return -1
  endi

  sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $ts0 fill(value, -1, -2, -3)
  if $rows != 1 then
    return -1
  endi
  if $data00 != @18-09-17 09:00:00.000@ then
    return -1
  endi
  if $data01 != 0 then
    return -1
  endi
  if $data02 != 0 then
    return -1
  endi
  if $data03 != 0.00000 then
    return -1
  endi
  if $data04 != 0.000000000 then
    return -1
  endi
  if $data05 != 0 then
    return -1
  endi
  if $data06 != 0 then
     return -1
  endi
  if $data07 != 1 then
    return -1
  endi
  if $data08 != binary0 then
    return -1
  endi
  if $data09 != nchar0 then
    return -1
  endi
457
  # table has NULL columns
S
slguan 已提交
458 459 460 461 462 463 464 465 466 467
  sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from intp_tb3 where ts = $ts0 fill(value, -1, -2, -3)
  if $rows != 1 then
    return -1
  endi
  if $data00 != @18-09-17 09:00:00.000@ then
    return -1
  endi
  if $data01 != 0 then
    return -1
  endi
468
  if $data02 != NULL then
S
slguan 已提交
469 470 471 472 473
    return -1
  endi
  if $data03 != 0.00000 then
    return -1
  endi
474
  if $data04 != NULL then
S
slguan 已提交
475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523
    return -1
  endi

  $t = $ts0 - 1000
  sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(value, -1, -2)
  if $rows != 0 then
    return -1
  endi

  $t = $tsu + 1000
  sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(value, -1, -2)
  if $rows != 0 then
    return -1
  endi

##### select interp from stable
  ## interp(*) from stb
  sql select interp(*) from $stb where ts = $ts0
  if $rows != 1 then
    return -1
  endi
  $t = $ts0 + 1000
  sql select interp(*) from $stb where ts = $t
  if $rows != 0 then
    return -1
  endi
  ## interp(*) from stb + group by 
  sql select interp(ts, c1, c2, c3, c4, c5, c7, c9) from $stb where ts = $ts0 group by tbname order by tbname asc
  print ====== select interp(ts, c1, c2, c3, c4, c5, c7, c9) from $stb where ts = $ts0 group by tbname order by tbname asc
  print ====== 0:$data00, 1:$data01, 2:$data02, 3:$data03, 4:$data04, 5:$data05, 6:$data06, 7:$data07, 8:$data08, 9:$data09
  print ====== 0:$data20, 1:$data21, 2:$data22, 3:$data23, 4:$data24, 5:$data25, 6:$data26, 7:$data27, 8:$data28, 9:$data29
  if $rows != $tbNum then
    return -1
  endi
  if $data00 != @18-09-17 09:00:00.000@ then
    return -1
  endi
  if $data01 != 0 then
    return -1
  endi
  if $data02 != 0 then
    return -1 
  endi
  if $data04 != 0.000000000 then
    return -1
  endi
  if $data08 != intp_tb0 then
    return -1 
  endi
524
  if $data22 != NULL then
S
slguan 已提交
525 526
    return -1
  endi
527
  if $data24 != NULL then
S
slguan 已提交
528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560
    return -1
  endi
  if $data28 != intp_tb2 then
    return -1 
  endi

  ## interp(*) from stb + group by + limit offset
  sql select interp(*) from $stb where ts = $ts0 group by tbname limit 0
  if $rows != 0 then
    return -1
  endi
  sql select interp(*) from $stb where ts = $ts0 group by tbname limit 0 offset 1

  ## interp(*) from stb + group by + fill(none)
  $t = $ts0 + 1000
  sql select interp(*) from $stb where ts = $t fill(none) group by tbname
  if $rows != 0 then
    return -1
  endi

  sql select interp(*) from $stb where ts = $ts0 fill(none) group by tbname
  if $rows != 4 then
    return -1
  endi
  if $data01 != 0 then
    return -1
  endi
  if $data02 != 0 then
    return -1
  endi
  if $data21 != 0 then
    return -1
  endi
561
  if $data22 != NULL then
S
slguan 已提交
562 563
    return -1
  endi
564
  if $data24 != NULL then
S
slguan 已提交
565 566 567 568 569
    return -1
  endi

  ## interp(*) from stb + group by + fill(none)
  $t = $ts0 + 1000
570
  sql select interp(*) from $stb where ts = $t fill(NULL) group by tbname
S
slguan 已提交
571 572 573 574 575 576
if $rows != $tbNum then
  return -1
endi
if $data00 != @18-09-17 09:00:01.000@ then
  return -1
endi
577
if $data01 != NULL then
S
slguan 已提交
578 579
  return -1
endi
580
if $data12 != NULL then
S
slguan 已提交
581 582
  return -1
endi
583
if $data23 != NULL then
S
slguan 已提交
584 585
  return -1
endi
586
if $data34 != NULL then
S
slguan 已提交
587 588
  return -1
endi
589
if $data05 != NULL then
S
slguan 已提交
590 591
  return -1
endi
592
if $data16 != NULL then
S
slguan 已提交
593 594
  return -1
endi
595
if $data27 != NULL then
S
slguan 已提交
596 597
  return -1
endi
598
if $data38 != NULL then
S
slguan 已提交
599 600
  return -1
endi
601
if $data09 != NULL then
S
slguan 已提交
602 603 604
  return -1
endi

605
sql select interp(*) from $stb where ts = $ts0 fill(NULL) group by tbname
S
slguan 已提交
606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621
print $rows

if $rows != 4 then
  return -1
endi

if $data01 != 0 then
  return -1
endi

if $data02 != 0 then
  return -1
endi
if $data21 != 0 then
  return -1
endi
622
if $data22 != NULL then
S
slguan 已提交
623 624
  return -1
endi
625
if $data24 != NULL then
S
slguan 已提交
626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672
  return -1
endi

  ## interp(*) from stb + group by + fill(prev)
  $t = $ts0 + 1000
  sql select interp(*) from $stb where ts = $t fill(prev) group by tbname
  print ====== 0:$data00, 1:$data01, 2:$data02, 3:$data03, 4:$data04, 5:$data05, 6:$data06, 7:$data07, 8:$data08, 9:$data09
  print ====== 0:$data20, 1:$data21, 2:$data22, 3:$data23, 4:$data24, 5:$data25, 6:$data26, 7:$data27, 8:$data28, 9:$data29
  if $rows != $tbNum then
    return -1
  endi
  if $data00 != @18-09-17 09:00:01.000@ then
    return -1
  endi
  if $data01 != 0 then
    return -1
  endi
  if $data02 != 0 then
    return -1
  endi
  if $data03 != 0.00000 then
    return -1
  endi
  if $data04 != 0.000000000 then
    return -1
  endi
  if $data05 != 0 then
    return -1
  endi
  if $data06 != 0 then
     return -1
  endi
  if $data07 != 1 then
    return -1
  endi
  if $data08 != binary0 then
    return -1
  endi
  if $data09 != nchar0 then
    return -1
  endi
  if $data20 != @18-09-17 09:00:01.000@ then
    return -1
  endi
  if $data21 != 0 then
    return -1
  endi
673
  if $data22 != NULL then
S
slguan 已提交
674 675 676 677 678
    return -1
  endi
  if $data23 != 0.00000 then
    return -1
  endi
679
  if $data24 != NULL then
S
slguan 已提交
680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726
    return -1
  endi
  if $data25 != 0 then
    return -1
  endi
  if $data26 != 0 then
     return -1
  endi
  if $data27 != 1 then
    return -1
  endi
  if $data28 != binary0 then
    return -1
  endi
  if $data29 != nchar0 then
    return -1
  endi

  ## interp(*) from stb + group by + fill(linear)
  $t = $ts0 + 1000
  sql select interp(*) from $stb where ts = $t fill(linear) group by tbname
  print ====== 0:$data00, 1:$data01, 2:$data02, 3:$data03, 4:$data04, 5:$data05, 6:$data06, 7:$data07, 8:$data08, 9:$data09
  print ====== 0:$data20, 1:$data21, 2:$data22, 3:$data23, 4:$data24, 5:$data25, 6:$data26, 7:$data27, 8:$data28, 9:$data29
  if $rows != $tbNum then
    return -1
  endi
  if $data00 != @18-09-17 09:00:01.000@ then
    return -1
  endi
  if $data01 != 0 then
    return -1
  endi
  if $data02 != 0 then
    return -1
  endi
  if $data03 != 0.00167 then
    return -1
  endi
  if $data04 != 0.001666667 then
    return -1
  endi
  if $data05 != 0 then
    return -1
  endi
  if $data06 != 0 then
     return -1
  endi
727
  if $data07 != NULL then
S
slguan 已提交
728 729
    return -1
  endi
730
  if $data08 != NULL then
S
slguan 已提交
731 732
    return -1
  endi
733
  if $data09 != NULL then
S
slguan 已提交
734 735 736 737 738 739 740 741
    return -1
  endi
  if $data20 != @18-09-17 09:00:01.000@ then
    return -1
  endi
  if $data21 != 0 then
    return -1
  endi
742
  if $data22 != NULL then
S
slguan 已提交
743 744 745 746 747
    return -1
  endi
  if $data23 != 0.00167 then
    return -1
  endi
748
  if $data24 != NULL then
S
slguan 已提交
749 750 751 752 753 754 755 756
    return -1
  endi
  if $data25 != 0 then
    return -1
  endi
  if $data26 != 0 then
     return -1
  endi
757
  if $data27 != NULL then
S
slguan 已提交
758 759
    return -1
  endi
760
  if $data28 != NULL then
S
slguan 已提交
761 762
    return -1
  endi
763
  if $data29 != NULL then
S
slguan 已提交
764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798
    return -1
  endi

    ## interp(*) from stb + group by + fill(value)
  $t = $ts0 + 1000
  sql select interp(*) from $stb where ts = $t fill(value, -1, -2) group by tbname
  print ====== 0:$data00, 1:$data01, 2:$data02, 3:$data03, 4:$data04, 5:$data05, 6:$data06, 7:$data07, 8:$data08, 9:$data09
  print ====== 0:$data20, 1:$data21, 2:$data22, 3:$data23, 4:$data24, 5:$data25, 6:$data26, 7:$data27, 8:$data28, 9:$data29
  if $rows != $tbNum then
    return -1
  endi
  if $data00 != @18-09-17 09:00:01.000@ then
    return -1
  endi
  if $data01 != -2 then
    return -1
  endi
  if $data02 != -2 then
    return -1
  endi
  if $data03 != -2.00000 then
    return -1
  endi
  if $data04 != -2.000000000 then
    return -1
  endi
  if $data05 != -2 then
    return -1
  endi
  if $data06 != -2 then
     return -1
  endi
  if $data07 != 1 then
    return -1
  endi
799
  if $data08 != NULL then
S
slguan 已提交
800 801
    return -1
  endi
802
  if $data09 != NULL then
S
slguan 已提交
803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828
    return -1
  endi
  if $data20 != @18-09-17 09:00:01.000@ then
    return -1
  endi
  if $data21 != -2 then
    return -1
  endi
  if $data22 != -2 then
    return -1
  endi
  if $data23 != -2.00000 then
    return -1
  endi
  if $data24 != -2.000000000 then
    return -1
  endi
  if $data25 != -2 then
    return -1
  endi
  if $data26 != -2 then
     return -1
  endi
  if $data27 != 1 then
    return -1
  endi
829
  if $data28 != NULL then
S
slguan 已提交
830 831
    return -1
  endi
832
  if $data29 != NULL then
S
slguan 已提交
833 834
    return -1
  endi