├── README.md ├── YDB编程指南.pdf └── autotest ├── 1.common.sql ├── 2.export.sql ├── 3.join.sql ├── 4.distinct_collect_set.sql ├── 5.ya100.sql ├── 6.alltype.sql ├── 7.other.sql ├── 8.1.blocksort.sql ├── 8.2.blocksort.sql ├── 8.3.blocksort.sql ├── 8.4.blocksort.sql ├── 8.5.blocksort.sql ├── 8.6.blocksort.sql ├── 8.7.blocksort.sql ├── 8.8.blocksort.sql ├── 9.big_result.sql ├── cmpall.sh ├── initdata.sh ├── initdata_quick.sh ├── runall.sh ├── runall.sql ├── runfast.sh ├── runfast.sql ├── tcph ├── maketcph.sh ├── testtcph.sql └── ydb_createtable_tcph.sql ├── test.sh ├── test_blocksort.sh ├── test_cmp_quick.sh ├── test_cmp_slow.sh ├── test_cmp_tcph.sh ├── testkafka.sh ├── tpc_ds ├── 0no-test │ ├── u-notest----query_ydb_65.sql │ ├── unsupported----query_ydb_24.sql │ ├── unsupported----query_ydb_45.sql │ ├── unsupported----query_ydb_56.sql │ ├── unsupported----query_ydb_60.sql │ ├── unsupported----query_ydb_70.sql │ └── unsupported----query_ydb_83.sql ├── all_tcpds.sql ├── count_table.sql ├── create_table_hive.sql ├── create_table_ydb.sql └── insert_table_ydb.sql ├── ydb_createtable.sql ├── ydb_droptable.sql └── ydb_truncatetable.sql /README.md: -------------------------------------------------------------------------------- 1 | ycloud.net.cn -------------------------------------------------------------------------------- /YDB编程指南.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycloudnet/ydb/d0986cd8927c70b9bedec6e462070a9ad1800804/YDB编程指南.pdf -------------------------------------------------------------------------------- /autotest/3.join.sql: -------------------------------------------------------------------------------- 1 | 2 | select sum(cnt) as cnt from 3 | ( 4 | 5 | /*ydb.pushdown('->')*/ select count(*) as cnt from ydb_example_shu where ydbpartion = '3000w' /*('<-')pushdown.ydb*/ 6 | 7 | 8 | union all 9 | /*ydb.pushdown('->')*/ select count(*) as cnt from ydb_example_shu where ydbpartion = '3000w' and amtlong>='100' and amtlong<='1000' /*('<-')pushdown.ydb*/ 10 | 11 | union all 12 | /*ydb.pushdown('->')*/ select count(*) as cnt from ydb_example_shu where ydbpartion = '20151011' and (ydb_blood in ('O','AB')) /*('<-')pushdown.ydb*/ 13 | 14 | union all 15 | /*ydb.pushdown('->')*/ select count(*) as cnt from ydb_example_shu where ydbpartion = '20151011' and ydb_sex='女' and ydb_province='广东' /*('<-')pushdown.ydb*/ 16 | 17 | union all 18 | /*ydb.pushdown('->')*/ select count(*) as cnt from ydb_example_shu where ydbpartion = '20151011' and ydb_province in ('广东','辽宁','香港','黑龙江') /*('<-')pushdown.ydb*/ 19 | 20 | 21 | ) tmp limit 10; 22 | 23 | 24 | select sum(cnt) as cnt from 25 | ( 26 | 27 | select count(*) as cnt from ydb_import_txt 28 | 29 | 30 | union all 31 | select count(*) as cnt from ydb_import_txt where amtlong>='100' and amtlong<='1000' 32 | 33 | union all 34 | select count(*) as cnt from ydb_import_txt where (ydb_blood in ('O','AB')) 35 | 36 | union all 37 | select count(*) as cnt from ydb_import_txt where ydb_sex='女' and ydb_province='广东' 38 | union all 39 | select count(*) as cnt from ydb_import_txt where ydb_province in ('广东','辽宁','香港','黑龙江') 40 | 41 | 42 | ) tmp limit 10; 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | select phonenum,usernick,ydb_sex,ydb_province,ydb_grade,ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtdouble,amtlong,content from 53 | ( 54 | 55 | /*ydb.pushdown('->')*/ select phonenum,usernick,ydb_sex,ydb_province,ydb_grade,ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtdouble,amtlong,content from ydb_example_shu where ydbpartion = '3000w' and amtlong>='100' and amtlong<='1000' order by amtdouble desc, amtlong limit 10 /*('<-')pushdown.ydb*/ 56 | 57 | union all 58 | /*ydb.pushdown('->')*/ select phonenum,usernick,ydb_sex,ydb_province,ydb_grade,ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtdouble,amtlong,content from ydb_example_shu where ydbpartion = '20151011' and (ydb_blood in ('O','AB')) order by amtdouble desc, amtlong limit 10 /*('<-')pushdown.ydb*/ 59 | 60 | union all 61 | /*ydb.pushdown('->')*/ select phonenum,usernick,ydb_sex,ydb_province,ydb_grade,ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtdouble,amtlong,content from ydb_example_shu where ydbpartion = '20151011' and ydb_sex='女' and ydb_province='广东' order by amtdouble desc, amtlong limit 10 /*('<-')pushdown.ydb*/ 62 | 63 | union all 64 | /*ydb.pushdown('->')*/ select phonenum,usernick,ydb_sex,ydb_province,ydb_grade,ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtdouble,amtlong,content from ydb_example_shu where ydbpartion = '20151011' and ydb_province in ('广东','辽宁','香港','黑龙江') order by amtdouble desc, amtlong limit 10 /*('<-')pushdown.ydb*/ 65 | 66 | 67 | ) tmp order by tmp.amtdouble desc, tmp.amtlong,tmp.phonenum limit 100; 68 | 69 | 70 | select phonenum,usernick,ydb_sex,ydb_province,ydb_grade,ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtdouble,amtlong,content from 71 | ( 72 | 73 | select * from ( 74 | select phonenum,usernick,ydb_sex,ydb_province,ydb_grade,ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtdouble,amtlong,content from ydb_import_txt where amtlong>='100' and amtlong<='1000' order by amtdouble desc, amtlong limit 10 75 | ) t1 76 | 77 | union all 78 | select * from ( 79 | 80 | select phonenum,usernick,ydb_sex,ydb_province,ydb_grade,ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtdouble,amtlong,content from ydb_import_txt where (ydb_blood in ('O','AB')) order by amtdouble desc, amtlong limit 10 81 | 82 | )t2 83 | union all 84 | select * from ( 85 | select phonenum,usernick,ydb_sex,ydb_province,ydb_grade,ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtdouble,amtlong,content from ydb_import_txt where ydb_sex='女' and ydb_province='广东' order by amtdouble desc, amtlong limit 10 86 | 87 | )t3 88 | 89 | union all 90 | select * from ( 91 | select phonenum,usernick,ydb_sex,ydb_province,ydb_grade,ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtdouble,amtlong,content from ydb_import_txt where ydb_province in ('广东','辽宁','香港','黑龙江') order by amtdouble desc, amtlong limit 10 92 | 93 | )t4 94 | 95 | ) tmp2 96 | 97 | order by tmp2.amtdouble desc, tmp2.amtlong ,tmp2.phonenum limit 100; 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | select k21.vehiclePlate from( 111 | select k1.vehiclePlate as vehiclePlate from ( 112 | /*ydb.pushdown('->')*/ 113 | select vehiclePlate,tollCode from vehiclepass where ydbpartion = '3000w' and tollCode='1' 114 | /*('<-')pushdown.ydb*/ 115 | 116 | ) k1 117 | LEFT SEMI JOIN 118 | ( 119 | /*ydb.pushdown('->')*/ 120 | select vehiclePlate,tollCode from vehiclepass where ydbpartion = '3000w' and tollCode='2' 121 | /*('<-')pushdown.ydb*/ 122 | 123 | ) k2 124 | on (k1.vehiclePlate=k2.vehiclePlate) 125 | ) k21 126 | LEFT SEMI JOIN 127 | ( 128 | /*ydb.pushdown('->')*/ 129 | select vehiclePlate,tollCode from vehiclepass where ydbpartion = '3000w' and tollCode='3' 130 | /*('<-')pushdown.ydb*/ 131 | ) k22 on k21.vehiclePlate=k22.vehiclePlate order by k21.vehiclePlate; 132 | 133 | 134 | select k21.vehiclePlate from( 135 | select k1.vehiclePlate as vehiclePlate from ( 136 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='1' 137 | ) k1 138 | LEFT SEMI JOIN 139 | ( 140 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='2' 141 | ) k2 142 | on (k1.vehiclePlate=k2.vehiclePlate) 143 | ) k21 144 | LEFT SEMI JOIN 145 | ( 146 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='3' 147 | ) k22 on k21.vehiclePlate=k22.vehiclePlate order by k21.vehiclePlate; 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | select k21.vehiclePlate,k22.vehiclePlate from( 156 | select k1.vehiclePlate as vehiclePlate from ( 157 | /*ydb.pushdown('->')*/ 158 | select vehiclePlate,tollCode from vehiclepass where ydbpartion = '3000w' and tollCode='1' 159 | /*('<-')pushdown.ydb*/ 160 | ) k1 161 | LEFT JOIN 162 | ( 163 | /*ydb.pushdown('->')*/ 164 | select vehiclePlate,tollCode from vehiclepass where ydbpartion = '3000w' and tollCode='2' 165 | /*('<-')pushdown.ydb*/ 166 | ) k2 167 | on (k1.vehiclePlate=k2.vehiclePlate) 168 | ) k21 169 | LEFT JOIN 170 | ( 171 | /*ydb.pushdown('->')*/ 172 | select vehiclePlate,tollCode from vehiclepass where ydbpartion = '3000w' and tollCode='3' 173 | /*('<-')pushdown.ydb*/ 174 | ) k22 on k21.vehiclePlate=k22.vehiclePlate order by k21.vehiclePlate; 175 | 176 | 177 | select k21.vehiclePlate,k22.vehiclePlate from( 178 | select k1.vehiclePlate as vehiclePlate from ( 179 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='1' 180 | ) k1 181 | LEFT JOIN 182 | ( 183 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='2' 184 | ) k2 185 | on (k1.vehiclePlate=k2.vehiclePlate) 186 | ) k21 187 | LEFT JOIN 188 | ( 189 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='3' 190 | ) k22 on k21.vehiclePlate=k22.vehiclePlate order by k21.vehiclePlate; 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | select k21.vehiclePlate,k22.vehiclePlate from( 201 | select k1.vehiclePlate as vehiclePlate from ( 202 | 203 | /*ydb.pushdown('->')*/ 204 | select vehiclePlate,tollCode from vehiclepass where ydbpartion = '3000w' and tollCode='1' 205 | /*('<-')pushdown.ydb*/ 206 | ) k1 207 | LEFT SEMI JOIN 208 | ( 209 | /*ydb.pushdown('->')*/ 210 | select vehiclePlate,tollCode from vehiclepass where ydbpartion = '3000w' and tollCode='2' 211 | /*('<-')pushdown.ydb*/ 212 | ) k2 213 | on (k1.vehiclePlate=k2.vehiclePlate) 214 | ) k21 215 | LEFT JOIN 216 | ( 217 | /*ydb.pushdown('->')*/ 218 | select vehiclePlate,tollCode from vehiclepass where ydbpartion = '3000w' and tollCode='3' 219 | /*('<-')pushdown.ydb*/ 220 | ) k22 on k21.vehiclePlate=k22.vehiclePlate order by k21.vehiclePlate; 221 | 222 | 223 | 224 | 225 | select k21.vehiclePlate,k22.vehiclePlate from( 226 | select k1.vehiclePlate as vehiclePlate from ( 227 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='1' 228 | ) k1 229 | LEFT SEMI JOIN 230 | ( 231 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='2' 232 | ) k2 233 | on (k1.vehiclePlate=k2.vehiclePlate) 234 | ) k21 235 | LEFT JOIN 236 | ( 237 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='3' 238 | ) k22 on k21.vehiclePlate=k22.vehiclePlate order by k21.vehiclePlate; 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | select k1.vehiclePlate as vehiclePlate from ( 267 | /*ydb.pushdown('->')*/ 268 | select vehiclePlate,tollCode from vehiclepass where ydbpartion = '3000w' and tollCode='1' 269 | /*('<-')pushdown.ydb*/ 270 | ) k1 271 | LEFT SEMI JOIN 272 | ( 273 | /*ydb.pushdown('->')*/ 274 | select vehiclePlate,tollCode from vehiclepass where ydbpartion = '3000w' and tollCode='2' 275 | /*('<-')pushdown.ydb*/ 276 | ) k2 277 | on (k1.vehiclePlate=k2.vehiclePlate) order by k1.vehiclePlate; 278 | 279 | 280 | select k1.vehiclePlate as vehiclePlate from ( 281 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='1' 282 | 283 | ) k1 284 | LEFT SEMI JOIN 285 | ( 286 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='2' 287 | 288 | ) k2 289 | on (k1.vehiclePlate=k2.vehiclePlate) order by k1.vehiclePlate; 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | select k1.vehiclePlate as vehiclePlate,k2.vehiclePlate from ( 308 | /*ydb.pushdown('->')*/ 309 | select vehiclePlate,tollCode from vehiclepass where ydbpartion = '3000w' and tollCode='1' 310 | /*('<-')pushdown.ydb*/ 311 | ) k1 312 | LEFT JOIN 313 | ( 314 | /*ydb.pushdown('->')*/ 315 | select vehiclePlate,tollCode from vehiclepass where ydbpartion = '3000w' and tollCode='2' 316 | /*('<-')pushdown.ydb*/ 317 | ) k2 318 | on (k1.vehiclePlate=k2.vehiclePlate) order by k1.vehiclePlate; 319 | 320 | 321 | 322 | 323 | select k1.vehiclePlate as vehiclePlate,k2.vehiclePlate from ( 324 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='1' 325 | 326 | ) k1 327 | LEFT JOIN 328 | ( 329 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='2' 330 | 331 | ) k2 332 | on (k1.vehiclePlate=k2.vehiclePlate) order by k1.vehiclePlate; 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | select k1.vehiclePlate as vehiclePlate from ( 344 | /*ydb.pushdown('->')*/ 345 | select vehiclePlate,tollCode from vehiclepass where ydbpartion = '3000w' and tollCode='1' 346 | /*('<-')pushdown.ydb*/ 347 | ) k1 348 | LEFT SEMI JOIN 349 | ( 350 | /*ydb.pushdown('->')*/ 351 | select vehiclePlate,tollCode from vehiclepass where ydbpartion = '3000w' and tollCode='2' 352 | /*('<-')pushdown.ydb*/ 353 | ) k2 354 | on (k1.vehiclePlate=k2.vehiclePlate) order by k1.vehiclePlate; 355 | 356 | 357 | 358 | 359 | select k1.vehiclePlate as vehiclePlate from ( 360 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='1' 361 | 362 | ) k1 363 | LEFT SEMI JOIN 364 | ( 365 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='2' 366 | 367 | ) k2 368 | on (k1.vehiclePlate=k2.vehiclePlate) order by k1.vehiclePlate; 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | select k1.vehiclePlate as vehiclePlate,k2.vehiclePlate from ( 381 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='1' 382 | 383 | ) k1 384 | LEFT JOIN 385 | ( 386 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='2' 387 | 388 | ) k2 389 | on (k1.vehiclePlate=k2.vehiclePlate) order by k1.vehiclePlate; 390 | 391 | 392 | 393 | 394 | select k1.vehiclePlate as vehiclePlate,k2.vehiclePlate from ( 395 | /*ydb.pushdown('->')*/ 396 | select vehiclePlate,tollCode from vehiclepass where ydbpartion = '3000w' and tollCode='1' 397 | /*('<-')pushdown.ydb*/ 398 | ) k1 399 | LEFT JOIN 400 | ( 401 | /*ydb.pushdown('->')*/ 402 | select vehiclePlate,tollCode from vehiclepass where ydbpartion = '3000w' and tollCode='2' 403 | /*('<-')pushdown.ydb*/ 404 | ) k2 405 | on (k1.vehiclePlate=k2.vehiclePlate) order by k1.vehiclePlate; 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 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 | 457 | 458 | select k21.vehiclePlate from( 459 | select k1.vehiclePlate as vehiclePlate from ( 460 | select r[0] as vehiclePlate ,r[1] as tollCode from 461 | ydb where YSQL('from','select vehiclePlate,tollCode from vehiclepass where ydbpartion = "3000w" and tollCode="1" ','segment') 462 | ) k1 463 | LEFT SEMI JOIN 464 | ( 465 | select r[0] as vehiclePlate ,r[1] as tollCode from 466 | ydb1 where YSQL('from ydb1','select vehiclePlate,tollCode from vehiclepass where ydbpartion = "3000w" and tollCode="2" ','segment') 467 | ) k2 468 | on (k1.vehiclePlate=k2.vehiclePlate) 469 | ) k21 470 | LEFT SEMI JOIN 471 | ( 472 | select r[0] as vehiclePlate from 473 | ydb2 where YSQL('from ydb2','select vehiclePlate,tollCode from vehiclepass where ydbpartion = "3000w" and tollCode="3" ','segment') 474 | ) k22 on k21.vehiclePlate=k22.vehiclePlate order by k21.vehiclePlate; 475 | 476 | 477 | select k21.vehiclePlate from( 478 | select k1.vehiclePlate as vehiclePlate from ( 479 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='1' 480 | ) k1 481 | LEFT SEMI JOIN 482 | ( 483 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='2' 484 | ) k2 485 | on (k1.vehiclePlate=k2.vehiclePlate) 486 | ) k21 487 | LEFT SEMI JOIN 488 | ( 489 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='3' 490 | ) k22 on k21.vehiclePlate=k22.vehiclePlate order by k21.vehiclePlate; 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | select k21.vehiclePlate,k22.vehiclePlate from( 499 | select k1.vehiclePlate as vehiclePlate from ( 500 | select r[0] as vehiclePlate ,r[1] as tollCode from 501 | ydb where YSQL('from','select vehiclePlate,tollCode from vehiclepass where ydbpartion = "3000w" and tollCode="1" ','segment') 502 | ) k1 503 | LEFT JOIN 504 | ( 505 | select r[0] as vehiclePlate ,r[1] as tollCode from 506 | ydb1 where YSQL('from ydb1','select vehiclePlate,tollCode from vehiclepass where ydbpartion = "3000w" and tollCode="2" ','segment') 507 | ) k2 508 | on (k1.vehiclePlate=k2.vehiclePlate) 509 | ) k21 510 | LEFT JOIN 511 | ( 512 | select r[0] as vehiclePlate from 513 | ydb2 where YSQL('from ydb2','select vehiclePlate,tollCode from vehiclepass where ydbpartion = "3000w" and tollCode="3" ','segment') 514 | ) k22 on k21.vehiclePlate=k22.vehiclePlate order by k21.vehiclePlate; 515 | 516 | 517 | select k21.vehiclePlate,k22.vehiclePlate from( 518 | select k1.vehiclePlate as vehiclePlate from ( 519 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='1' 520 | ) k1 521 | LEFT JOIN 522 | ( 523 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='2' 524 | ) k2 525 | on (k1.vehiclePlate=k2.vehiclePlate) 526 | ) k21 527 | LEFT JOIN 528 | ( 529 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='3' 530 | ) k22 on k21.vehiclePlate=k22.vehiclePlate order by k21.vehiclePlate; 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | select k21.vehiclePlate,k22.vehiclePlate from( 541 | select k1.vehiclePlate as vehiclePlate from ( 542 | select r[0] as vehiclePlate ,r[1] as tollCode from 543 | ydb where YSQL('from','select vehiclePlate,tollCode from vehiclepass where ydbpartion = "3000w" and tollCode="1" ','segment') 544 | ) k1 545 | LEFT SEMI JOIN 546 | ( 547 | select r[0] as vehiclePlate ,r[1] as tollCode from 548 | ydb1 where YSQL('from ydb1','select vehiclePlate,tollCode from vehiclepass where ydbpartion = "3000w" and tollCode="2" ','segment') 549 | ) k2 550 | on (k1.vehiclePlate=k2.vehiclePlate) 551 | ) k21 552 | LEFT JOIN 553 | ( 554 | select r[0] as vehiclePlate from 555 | ydb2 where YSQL('from ydb2','select vehiclePlate,tollCode from vehiclepass where ydbpartion = "3000w" and tollCode="3" ','segment') 556 | ) k22 on k21.vehiclePlate=k22.vehiclePlate order by k21.vehiclePlate; 557 | 558 | 559 | 560 | 561 | select k21.vehiclePlate,k22.vehiclePlate from( 562 | select k1.vehiclePlate as vehiclePlate from ( 563 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='1' 564 | ) k1 565 | LEFT SEMI JOIN 566 | ( 567 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='2' 568 | ) k2 569 | on (k1.vehiclePlate=k2.vehiclePlate) 570 | ) k21 571 | LEFT JOIN 572 | ( 573 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='3' 574 | ) k22 on k21.vehiclePlate=k22.vehiclePlate order by k21.vehiclePlate; 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | select k1.vehiclePlate as vehiclePlate from ( 603 | select r[0] as vehiclePlate ,r[1] as tollCode from 604 | ydb where YSQL('from','select vehiclePlate,tollCode from vehiclepass where ydbpartion = "3000w" and tollCode="1" ','segment') 605 | ) k1 606 | LEFT SEMI JOIN 607 | ( 608 | select r[0] as vehiclePlate ,r[1] as tollCode from 609 | ydb1 where YSQL('from ydb1','select vehiclePlate,tollCode from vehiclepass where ydbpartion = "3000w" and tollCode="2" ','segment') 610 | ) k2 611 | on (k1.vehiclePlate=k2.vehiclePlate) order by k1.vehiclePlate; 612 | 613 | 614 | select k1.vehiclePlate as vehiclePlate from ( 615 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='1' 616 | 617 | ) k1 618 | LEFT SEMI JOIN 619 | ( 620 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='2' 621 | 622 | ) k2 623 | on (k1.vehiclePlate=k2.vehiclePlate) order by k1.vehiclePlate; 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | select k1.vehiclePlate as vehiclePlate,k2.vehiclePlate from ( 642 | select r[0] as vehiclePlate ,r[1] as tollCode from 643 | ydb where YSQL('from','select vehiclePlate,tollCode from vehiclepass where ydbpartion = "3000w" and tollCode="1" ','segment') 644 | ) k1 645 | LEFT JOIN 646 | ( 647 | select r[0] as vehiclePlate ,r[1] as tollCode from 648 | ydb1 where YSQL('from ydb1','select vehiclePlate,tollCode from vehiclepass where ydbpartion = "3000w" and tollCode="2" ','segment') 649 | ) k2 650 | on (k1.vehiclePlate=k2.vehiclePlate) order by k1.vehiclePlate; 651 | 652 | 653 | 654 | 655 | select k1.vehiclePlate as vehiclePlate,k2.vehiclePlate from ( 656 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='1' 657 | 658 | ) k1 659 | LEFT JOIN 660 | ( 661 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='2' 662 | 663 | ) k2 664 | on (k1.vehiclePlate=k2.vehiclePlate) order by k1.vehiclePlate; 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | select k1.vehiclePlate as vehiclePlate from ( 676 | select r[0] as vehiclePlate ,r[1] as tollCode from 677 | ydb where YSQL('from','select vehiclePlate,tollCode from vehiclepass where ydbpartion = "3000w" and tollCode="1" ','segment') 678 | ) k1 679 | LEFT SEMI JOIN 680 | ( 681 | select r[0] as vehiclePlate ,r[1] as tollCode from 682 | ydb1 where YSQL('from ydb1','select vehiclePlate,tollCode from vehiclepass where ydbpartion = "3000w" and tollCode="2" ','segment') 683 | ) k2 684 | on (k1.vehiclePlate=k2.vehiclePlate) order by k1.vehiclePlate; 685 | 686 | 687 | 688 | 689 | select k1.vehiclePlate as vehiclePlate from ( 690 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='1' 691 | 692 | ) k1 693 | LEFT SEMI JOIN 694 | ( 695 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='2' 696 | 697 | ) k2 698 | on (k1.vehiclePlate=k2.vehiclePlate) order by k1.vehiclePlate; 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | select k1.vehiclePlate as vehiclePlate,k2.vehiclePlate from ( 711 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='1' 712 | 713 | ) k1 714 | LEFT JOIN 715 | ( 716 | select vehiclePlate,tollCode from vehiclepass_txt where tollCode='2' 717 | 718 | ) k2 719 | on (k1.vehiclePlate=k2.vehiclePlate) order by k1.vehiclePlate; 720 | 721 | 722 | 723 | 724 | select k1.vehiclePlate as vehiclePlate,k2.vehiclePlate from ( 725 | select r[0] as vehiclePlate ,r[1] as tollCode from 726 | ydb where YSQL('from','select vehiclePlate,tollCode from vehiclepass where ydbpartion = "3000w" and tollCode="1" ','segment') 727 | ) k1 728 | LEFT JOIN 729 | ( 730 | select r[0] as vehiclePlate ,r[1] as tollCode from 731 | ydb1 where YSQL('from ydb1','select vehiclePlate,tollCode from vehiclepass where ydbpartion = "3000w" and tollCode="2" ','segment') 732 | ) k2 733 | on (k1.vehiclePlate=k2.vehiclePlate) order by k1.vehiclePlate; 734 | 735 | 736 | 737 | -------------------------------------------------------------------------------- /autotest/4.distinct_collect_set.sql: -------------------------------------------------------------------------------- 1 | 2 | select 3 | size(collect_set(tmp.ydb_sex)) as dist_sex, 4 | size(collect_set(tmp.ydb_province)) as dist_province, 5 | count(*) as cnt, 6 | count(tmp.amtlong) as cnt_long, 7 | count(distinct tmp.amtlong) as dist_long 8 | from ( 9 | /*ydb.pushdown('->')*/ 10 | select ydb_sex,ydb_province,amtlong from ydb_example_shu where ydbpartion = '3000w' and content='王老吉' 11 | /*('<-')pushdown.ydb*/ 12 | ) tmp limit 10; 13 | 14 | select 15 | size(collect_set(ydb_sex)) as dist_sex, 16 | size(collect_set(ydb_province)) as dist_province, 17 | count(*) as cnt, 18 | count(amtlong) as cnt_long, 19 | count(distinct amtlong) as dist_long 20 | from 21 | ydb_import_txt where content like '%王老吉%' 22 | limit 10; 23 | 24 | 25 | 26 | 27 | 28 | select 29 | tmp.ydb_sex as ydb_sex, 30 | size(collect_set(tmp.ydb_province)) as dist_province, 31 | count(*) as cnt, 32 | count(tmp.amtlong) as cnt_long, 33 | count(distinct tmp.amtlong) as dist_long 34 | from 35 | ( 36 | /*ydb.pushdown('->')*/ 37 | select ydb_sex,ydb_province,amtlong from ydb_example_shu where ydbpartion = '3000w' and content='王老吉' 38 | /*('<-')pushdown.ydb*/ 39 | ) tmp 40 | group by tmp.ydb_sex order by cnt limit 10; 41 | 42 | 43 | select 44 | ydb_sex, 45 | size(collect_set(ydb_province)) as dist_province, 46 | count(*) as cnt, 47 | count(amtlong) as cnt_long, 48 | count(distinct amtlong) as dist_long 49 | from 50 | ydb_import_txt where content like '%王老吉%' 51 | group by ydb_sex order by cnt 52 | limit 10; 53 | 54 | 55 | 56 | 57 | 58 | 59 | select ydb_province,sum(cnt) as scnt,concat_ws('#', sort_array(collect_set(concat_ws(',',ydb_sex,cnt,cntamt,sumamt)))) from ( 60 | /*ydb.pushdown('->')*/ 61 | select ydb_sex,ydb_province,count(*) as cnt,count(amtlong) as cntamt,sum(amtlong) as sumamt from ydb_example_shu where ydbpartion = '3000w' group by ydb_sex,ydb_province 62 | /*('<-')pushdown.ydb*/ 63 | )tmp group by ydb_province order by scnt desc,ydb_province limit 10; 64 | 65 | select ydb_province,sum(cnt) as scnt,concat_ws('#', sort_array(collect_set(concat_ws(',',ydb_sex,cnt,cntamt,sumamt)))) from ( 66 | select 67 | ydb_sex, 68 | ydb_province, 69 | count(*) as cnt, 70 | count(amtlong) as cntamt, 71 | sum(amtlong) as sumamt 72 | from ydb_import_txt group by ydb_sex,ydb_province 73 | 74 | )tmp group by ydb_province order by scnt desc,ydb_province limit 10; 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | select ydb_province,sum(cnt) as scnt,concat_ws('#', sort_array(collect_set(concat_ws(',',ydb_blood,ydb_sex,cnt,cntamt)))) from ( 85 | /*ydb.pushdown('->')*/ 86 | select ydb_blood,ydb_sex,ydb_province,count(*) as cnt,count(amtlong) as cntamt,sum(amtlong) as sumamt from ydb_example_shu where ydbpartion = '3000w' group by ydb_blood,ydb_sex,ydb_province 87 | /*('<-')pushdown.ydb*/ 88 | )tmp group by ydb_province order by scnt desc,ydb_province limit 10; 89 | 90 | select ydb_province,sum(cnt) as scnt,concat_ws('#', sort_array(collect_set(concat_ws(',',ydb_blood,ydb_sex,cnt,cntamt)))) from ( 91 | select ydb_blood, 92 | ydb_sex, 93 | ydb_province, 94 | count(*) as cnt, 95 | count(amtlong) as cntamt, 96 | sum(amtlong) as sumamt 97 | from ydb_import_txt group by ydb_blood,ydb_sex,ydb_province 98 | 99 | )tmp group by ydb_province order by scnt desc,ydb_province limit 10; 100 | 101 | 102 | 103 | 104 | 105 | select ydb_day,sum(cnt) as scnt,concat_ws('#', sort_array(collect_set(concat_ws(',',ydb_blood,ydb_sex,cnt,cntamt)))) from ( 106 | /*ydb.pushdown('->')*/ 107 | select ydb_day,ydb_sex,ydb_blood,count(*) as cnt,count(amtlong) as cntamt,sum(amtlong) as sumamt from ydb_example_shu where ydbpartion = '3000w' group by ydb_day,ydb_sex,ydb_blood 108 | /*('<-')pushdown.ydb*/ 109 | )tmp group by ydb_day order by scnt desc,ydb_day limit 10; 110 | 111 | select ydb_day,sum(cnt) as scnt,concat_ws('#', sort_array(collect_set(concat_ws(',',ydb_blood,ydb_sex,cnt,cntamt)))) from ( 112 | 113 | 114 | select ydb_day, 115 | ydb_sex, 116 | ydb_blood, 117 | count(*) as cnt, 118 | count(amtlong) as cntamt, 119 | sum(amtlong) as sumamt 120 | from ydb_import_txt group by ydb_day,ydb_sex,ydb_blood 121 | 122 | )tmp group by ydb_day order by scnt desc,ydb_day limit 10; 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | select 140 | size(collect_set(r[0])) as dist_sex, 141 | size(collect_set(r[1])) as dist_province, 142 | count(*) as cnt, 143 | count(r[2]) as cnt_long, 144 | count(distinct r[2]) as dist_long 145 | from 146 | ydb where YSQL('from','select ydb_sex,ydb_province,amtlong from ydb_example_shu where ydbpartion = "3000w" and content="王老吉" ','segment') 147 | limit 10; 148 | 149 | select 150 | size(collect_set(ydb_sex)) as dist_sex, 151 | size(collect_set(ydb_province)) as dist_province, 152 | count(*) as cnt, 153 | count(amtlong) as cnt_long, 154 | count(distinct amtlong) as dist_long 155 | from 156 | ydb_import_txt where content like '%王老吉%' 157 | limit 10; 158 | 159 | 160 | 161 | 162 | 163 | select 164 | r[0] as ydb_sex, 165 | size(collect_set(r[1])) as dist_province, 166 | count(*) as cnt, 167 | count(r[2]) as cnt_long, 168 | count(distinct r[2]) as dist_long 169 | from 170 | ydb where YSQL('from','select ydb_sex,ydb_province,amtlong from ydb_example_shu where ydbpartion = "3000w" and content="王老吉" ','segment') 171 | group by r[0] order by cnt 172 | limit 10; 173 | 174 | 175 | select 176 | ydb_sex, 177 | size(collect_set(ydb_province)) as dist_province, 178 | count(*) as cnt, 179 | count(amtlong) as cnt_long, 180 | count(distinct amtlong) as dist_long 181 | from 182 | ydb_import_txt where content like '%王老吉%' 183 | group by ydb_sex order by cnt 184 | limit 10; 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 | select ydb_province,sum(cnt) as scnt,concat_ws('#', sort_array(collect_set(concat_ws(',',ydb_sex,cnt,cntamt,sumamt)))) from ( 212 | select 213 | r[0] as ydb_sex, 214 | r[1] as ydb_province, 215 | sum(cast(r[2] as bigint)) as cnt, 216 | sum(cast(r[3] as bigint)) as cntamt, 217 | sum(cast(r[4] as bigint)) as sumamt 218 | from 219 | ydb where YSQL('from','select ydb_sex,ydb_province,count(*),count(amtlong),sum(amtlong) from ydb_example_shu where ydbpartion = "3000w" group by ydb_sex,ydb_province ','segment') 220 | group by r[0], r[1] 221 | 222 | )tmp group by ydb_province order by scnt desc,ydb_province limit 10; 223 | 224 | select ydb_province,sum(cnt) as scnt,concat_ws('#', sort_array(collect_set(concat_ws(',',ydb_sex,cnt,cntamt,sumamt)))) from ( 225 | select 226 | ydb_sex, 227 | ydb_province, 228 | count(*) as cnt, 229 | count(amtlong) as cntamt, 230 | sum(amtlong) as sumamt 231 | from ydb_import_txt group by ydb_sex,ydb_province 232 | 233 | )tmp group by ydb_province order by scnt desc,ydb_province limit 10; 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | select ydb_province,sum(cnt) as scnt,concat_ws('#', sort_array(collect_set(concat_ws(',',ydb_blood,ydb_sex,cnt,cntamt)))) from ( 244 | select 245 | r[0] as ydb_blood, 246 | r[1] as ydb_sex, 247 | r[2] as ydb_province, 248 | sum(cast(r[3] as bigint)) as cnt, 249 | sum(cast(r[4] as bigint)) as cntamt 250 | from 251 | ydb where YSQL('from','select ydb_blood,ydb_sex,ydb_province,count(*),count(amtlong) from ydb_example_shu where ydbpartion = "3000w" group by ydb_blood,ydb_sex,ydb_province ','segment') 252 | group by r[0], r[1], r[2] 253 | 254 | )tmp group by ydb_province order by scnt desc,ydb_province limit 10; 255 | 256 | 257 | 258 | 259 | select ydb_province,sum(cnt) as scnt,concat_ws('#', sort_array(collect_set(concat_ws(',',ydb_blood,ydb_sex,cnt,cntamt)))) from ( 260 | select ydb_blood, 261 | ydb_sex, 262 | ydb_province, 263 | count(*) as cnt, 264 | count(amtlong) as cntamt, 265 | sum(amtlong) as sumamt 266 | from ydb_import_txt group by ydb_blood,ydb_sex,ydb_province 267 | 268 | )tmp group by ydb_province order by scnt desc,ydb_province limit 10; 269 | 270 | 271 | 272 | 273 | 274 | 275 | select ydb_day,sum(cnt) as scnt,concat_ws('#', sort_array(collect_set(concat_ws(',',ydb_blood,ydb_sex,cnt,cntamt)))) from ( 276 | select 277 | r[0] as ydb_day, 278 | r[1] as ydb_sex, 279 | r[2] as ydb_blood, 280 | sum(cast(r[3] as bigint)) as cnt, 281 | sum(cast(r[4] as bigint)) as cntamt 282 | from 283 | ydb where YSQL('from','select ydb_day,ydb_sex,ydb_blood,count(*),count(amtlong) from ydb_example_shu where ydbpartion = "3000w" group by ydb_day,ydb_sex,ydb_blood ','segment') 284 | group by r[0], r[1], r[2] 285 | 286 | )tmp group by ydb_day order by scnt desc,ydb_day limit 10; 287 | 288 | 289 | select ydb_day,sum(cnt) as scnt,concat_ws('#', sort_array(collect_set(concat_ws(',',ydb_blood,ydb_sex,cnt,cntamt)))) from ( 290 | 291 | 292 | select ydb_day, 293 | ydb_sex, 294 | ydb_blood, 295 | count(*) as cnt, 296 | count(amtlong) as cntamt, 297 | sum(amtlong) as sumamt 298 | from ydb_import_txt group by ydb_day,ydb_sex,ydb_blood 299 | 300 | )tmp group by ydb_day order by scnt desc,ydb_day limit 10; 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | select ydb_day,sum(cnt) as scnt,concat_ws('#', sort_array(collect_set(concat_ws(',',ydb_blood,ydb_sex,cnt)))) from ( 309 | select ydb_day,ydb_sex,ydb_blood,Ycount('*',ya100_pipe) as cnt from ydb_example_shu where Yfilter('ydb_example_shu','ydbpartion="3000w"',ya100_pipe) and Ycombine('ydb_example_shu','*',ya100_pipe) group by ydb_day,ydb_sex,ydb_blood 310 | )tmp group by ydb_day order by scnt desc,ydb_day limit 10; 311 | 312 | 313 | select ydb_day,sum(cnt) as scnt,concat_ws('#', sort_array(collect_set(concat_ws(',',ydb_blood,ydb_sex,cnt)))) from ( 314 | 315 | select ydb_day, 316 | ydb_sex, 317 | ydb_blood, 318 | count(*) as cnt, 319 | count(amtlong) as cntamt, 320 | sum(amtlong) as sumamt 321 | from ydb_import_txt group by ydb_day,ydb_sex,ydb_blood 322 | 323 | )tmp group by ydb_day order by scnt desc,ydb_day limit 10; 324 | 325 | 326 | 327 | 328 | 329 | select ydb_province,sum(cnt) as scnt,concat_ws('#', sort_array(collect_set(concat_ws(',',ydb_blood,ydb_sex,cnt)))) from ( 330 | select ydb_blood,ydb_sex,ydb_province,Ycount('*',ya100_pipe) as cnt from ydb_example_shu where Yfilter('ydb_example_shu','ydbpartion="3000w"',ya100_pipe) and Ycombine('ydb_example_shu','*',ya100_pipe) group by ydb_blood,ydb_sex,ydb_province 331 | )tmp group by ydb_province order by scnt desc,ydb_province limit 10; 332 | 333 | select ydb_province,sum(cnt) as scnt,concat_ws('#', sort_array(collect_set(concat_ws(',',ydb_blood,ydb_sex,cnt)))) from ( 334 | select ydb_blood, 335 | ydb_sex, 336 | ydb_province, 337 | count(*) as cnt, 338 | count(amtlong) as cntamt, 339 | sum(amtlong) as sumamt 340 | from ydb_import_txt group by ydb_blood,ydb_sex,ydb_province 341 | 342 | )tmp group by ydb_province order by scnt desc,ydb_province limit 10; 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | -------------------------------------------------------------------------------- /autotest/5.ya100.sql: -------------------------------------------------------------------------------- 1 | 2 | 3 | select Ycount('*',ya100_pipe) from spark_index_ya100 where Ycombine('spark_index_ya100','*',ya100_pipe) limit 10; 4 | select count(*) from spark_import_txt limit 10; 5 | 6 | 7 | select ydb_province,Ycount('*',ya100_pipe) as cnt from spark_index_ya100 8 | where Yfilter('spark_index_ya100','ydb_province="辽宁" or ydb_province="山东" or ydb_province="浙江"',ya100_pipe) 9 | and Ycombine('spark_index_ya100','*',ya100_pipe) 10 | group by ydb_province order by cnt,ydb_province limit 10; 11 | select ydb_province,count(*) as cnt from spark_import_txt where ydb_province='辽宁' or ydb_province='山东' or ydb_province='浙江' group by ydb_province order by cnt,ydb_province limit 10; 12 | 13 | 14 | select Ycount('*',ya100_pipe) from spark_index_ya100 15 | where Yfilter('spark_index_ya100','ydb_sex="女" and ydb_grade="本科" and (ydb_age="20到30岁" or ydb_blood="O") and (amtlong like "([3000 TO 4000] )")',ya100_pipe) 16 | and Ycombine('spark_index_ya100','*',ya100_pipe) 17 | limit 100; 18 | select count(*) from spark_import_txt where ydb_sex='女' and ydb_grade='本科' and (ydb_age='20到30岁' or ydb_blood='O') and amtlong>=3000 and amtlong<=4000 limit 100; 19 | 20 | 21 | select Ycount('*',ya100_pipe) ,Ysum('amtdouble', ya100_pipe),Yavg('amtdouble', ya100_pipe) ,Ymin('amtdouble', ya100_pipe) ,Ymax('amtdouble', ya100_pipe) ,Ymaxstring('ydb_province', ya100_pipe),Yminstring('ydb_province', ya100_pipe) from spark_index_ya100 22 | where Ycombine('spark_index_ya100','*,amtdouble,ydb_province',ya100_pipe) 23 | limit 10; 24 | select count(*),sum(amtdouble),avg(amtdouble),min(amtdouble),max(amtdouble),max(ydb_province),min(ydb_province) from spark_import_txt; 25 | 26 | 27 | select ydb_sex, ydb_province,Ycount('*',ya100_pipe),Ycount('amtdouble',ya100_pipe) as cnt,Ysum('amtdouble',ya100_pipe) from spark_index_ya100 28 | where Ycombine('spark_index_ya100','*,amtdouble',ya100_pipe) 29 | group by ydb_sex, ydb_province order by cnt desc,ydb_sex, ydb_province limit 10; 30 | select ydb_sex,ydb_province,count(*),count(amtdouble) as cnt,sum(amtdouble) from spark_import_txt group by ydb_sex, ydb_province order by cnt desc,ydb_sex, ydb_province limit 10; 31 | 32 | 33 | select ydb_sex,Ycount('*',ya100_pipe),Ycount('amtdouble',ya100_pipe) as cnt,Ysum('amtdouble',ya100_pipe) from spark_index_ya100 34 | where Ycombine('spark_index_ya100','*,amtdouble',ya100_pipe) 35 | group by ydb_sex order by cnt desc,ydb_sex limit 10; 36 | 37 | select ydb_sex,count(*),count(amtdouble) as cnt,sum(amtdouble) from spark_import_txt group by ydb_sex order by cnt desc,ydb_sex limit 10; 38 | 39 | 40 | select ydb_sex, phonenum,amtlong,amtdouble from spark_index_ya100 where Ytop10000('spark_index_ya100','amtdouble desc ,amtlong limit 10',ya100_pipe) order by amtdouble desc ,amtlong,phonenum limit 10; 41 | select ydb_sex, phonenum,amtlong,amtdouble from spark_import_txt order by amtdouble desc ,amtlong,phonenum limit 10; 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | select Ycount('*',ya100_pipe) from spark_index_ya100 where Ycombine('spark_index_ya100','*',ya100_pipe) limit 10; 63 | select count(*) from spark_import_txt limit 10; 64 | 65 | 66 | select ydb_province,Ycount('*',ya100_pipe) as cnt from spark_index_ya100 67 | where Yfilter('spark_index_ya100','ydb_province=\'辽宁\' or ydb_province=\'山东\' or ydb_province=\'浙江\'',ya100_pipe) 68 | and Ycombine('spark_index_ya100','*',ya100_pipe) 69 | group by ydb_province order by cnt limit 10; 70 | select ydb_province,count(*) as cnt from spark_import_txt where ydb_province='辽宁' or ydb_province='山东' or ydb_province='浙江' group by ydb_province order by cnt limit 10; 71 | 72 | 73 | select Ycount('*',ya100_pipe) from spark_index_ya100 74 | where Yfilter('spark_index_ya100','ydb_sex=\'女\' and ydb_grade=\'本科\' and (ydb_age=\'20到30岁\' or ydb_blood=\'O\') and (amtlong like \'([3000 TO 4000] )\')',ya100_pipe) 75 | and Ycombine('spark_index_ya100','*',ya100_pipe) 76 | limit 100; 77 | select count(*) from spark_import_txt where ydb_sex='女' and ydb_grade='本科' and (ydb_age='20到30岁' or ydb_blood='O') and amtlong>=3000 and amtlong<=4000 limit 100; 78 | 79 | 80 | select Ycount('*',ya100_pipe) ,Ysum('amtdouble', ya100_pipe),Yavg('amtdouble', ya100_pipe) ,Ymin('amtdouble', ya100_pipe) ,Ymax('amtdouble', ya100_pipe) ,Ymaxstring('ydb_province', ya100_pipe),Yminstring('ydb_province', ya100_pipe) from spark_index_ya100 81 | where Ycombine('spark_index_ya100','*,amtdouble,ydb_province',ya100_pipe) 82 | limit 10; 83 | select count(*),sum(amtdouble),avg(amtdouble),min(amtdouble),max(amtdouble),max(ydb_province),min(ydb_province) from spark_import_txt; 84 | 85 | 86 | 87 | select ydb_sex, ydb_province,Ycount('*',ya100_pipe),Ycount('amtdouble',ya100_pipe) as cnt,Ysum('amtdouble',ya100_pipe) from spark_index_ya100 88 | where Ycombine('spark_index_ya100','*,amtdouble',ya100_pipe) 89 | group by ydb_sex, ydb_province order by cnt desc limit 10; 90 | select ydb_sex,ydb_province,count(*),count(amtdouble) as cnt,sum(amtdouble) from spark_import_txt group by ydb_sex, ydb_province order by cnt desc limit 10; 91 | 92 | 93 | select ydb_sex,Ycount('*',ya100_pipe),Ycount('amtdouble',ya100_pipe) as cnt,Ysum('amtdouble',ya100_pipe) from spark_index_ya100 94 | where Ycombine('spark_index_ya100','*,amtdouble',ya100_pipe) 95 | group by ydb_sex order by cnt desc limit 10; 96 | 97 | select ydb_sex,count(*),count(amtdouble) as cnt,sum(amtdouble) from spark_import_txt group by ydb_sex order by cnt desc limit 10; 98 | 99 | 100 | select ydb_sex, phonenum,amtlong,amtdouble from spark_index_ya100 where Ytop10000('spark_index_ya100','amtdouble desc ,amtlong limit 10',ya100_pipe) order by amtdouble desc ,amtlong limit 10; 101 | select ydb_sex, phonenum,amtlong,amtdouble from spark_import_txt order by amtdouble desc ,amtlong limit 10; 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | set ya100.spark.filter.spark_index_ya100= 111 | @session@ 112 | set ya100.spark.combine.spark_index_ya100=* 113 | @session@ 114 | set ya100.spark.top10000.spark_index_ya100= 115 | @session@ 116 | select Ycount('*',ya100_pipe) from spark_index_ya100 limit 10; 117 | select count(*) from spark_import_txt limit 10; 118 | 119 | 120 | set ya100.spark.filter.spark_index_ya100= ydb_province='辽宁' or ydb_province='山东' or ydb_province='浙江' 121 | @session@ 122 | set ya100.spark.combine.spark_index_ya100=* 123 | @session@ 124 | set ya100.spark.top10000.spark_index_ya100= 125 | @session@ 126 | select ydb_province,Ycount('*',ya100_pipe) as cnt from spark_index_ya100 group by ydb_province order by cnt limit 100; 127 | 128 | select ydb_province,count(*) as cnt from spark_import_txt where ydb_province='辽宁' or ydb_province='山东' or ydb_province='浙江' group by ydb_province order by cnt limit 10; 129 | 130 | 131 | set ya100.spark.filter.spark_index_ya100= ydb_sex='女' and ydb_grade='本科' and (ydb_age='20到30岁' or ydb_blood='O') and (amtlong like '([3000 TO 4000] )') 132 | @session@ 133 | set ya100.spark.combine.spark_index_ya100=* 134 | @session@ 135 | set ya100.spark.top10000.spark_index_ya100= 136 | @session@ 137 | select Ycount('*',ya100_pipe) from spark_index_ya100 limit 100; 138 | 139 | select count(*) from spark_import_txt where ydb_sex='女' and ydb_grade='本科' and (ydb_age='20到30岁' or ydb_blood='O') and amtlong>=3000 and amtlong<=4000 limit 100; 140 | 141 | 142 | set ya100.spark.filter.spark_index_ya100= 143 | @session@ 144 | set ya100.spark.combine.spark_index_ya100=*,amtdouble,ydb_province 145 | @session@ 146 | set ya100.spark.top10000.spark_index_ya100= 147 | @session@ 148 | select Ycount('*',ya100_pipe) ,Ysum('amtdouble', ya100_pipe),Yavg('amtdouble', ya100_pipe) ,Ymin('amtdouble', ya100_pipe) ,Ymax('amtdouble', ya100_pipe) ,Ymaxstring('ydb_province', ya100_pipe),Yminstring('ydb_province', ya100_pipe) from spark_index_ya100 limit 10; 149 | 150 | select count(*),sum(amtdouble),avg(amtdouble),min(amtdouble),max(amtdouble),max(ydb_province),min(ydb_province) from spark_import_txt; 151 | 152 | 153 | 154 | set ya100.spark.filter.spark_index_ya100= 155 | @session@ 156 | set ya100.spark.combine.spark_index_ya100=*,amtdouble 157 | @session@ 158 | set ya100.spark.top10000.spark_index_ya100= 159 | @session@ 160 | select ydb_sex, ydb_province,Ycount('*',ya100_pipe),Ycount('amtdouble',ya100_pipe) as cnt,Ysum('amtdouble',ya100_pipe) from spark_index_ya100 group by ydb_sex, ydb_province order by cnt desc limit 10; 161 | 162 | select ydb_sex,ydb_province,count(*),count(amtdouble) as cnt,sum(amtdouble) from spark_import_txt group by ydb_sex, ydb_province order by cnt desc limit 10; 163 | 164 | 165 | set ya100.spark.filter.spark_index_ya100= 166 | @session@ 167 | set ya100.spark.combine.spark_index_ya100=*,amtdouble 168 | @session@ 169 | set ya100.spark.top10000.spark_index_ya100= 170 | @session@ 171 | select ydb_sex,Ycount('*',ya100_pipe),Ycount('amtdouble',ya100_pipe) as cnt,Ysum('amtdouble',ya100_pipe) from spark_index_ya100 group by ydb_sex order by cnt desc limit 10; 172 | 173 | select ydb_sex,count(*),count(amtdouble) as cnt,sum(amtdouble) from spark_import_txt group by ydb_sex order by cnt desc limit 10; 174 | 175 | 176 | set ya100.spark.filter.spark_index_ya100= 177 | @session@ 178 | set ya100.spark.combine.spark_index_ya100= 179 | @session@ 180 | set ya100.spark.top10000.spark_index_ya100=amtdouble desc ,amtlong limit 10 181 | @session@ 182 | select ydb_sex, phonenum,amtlong,amtdouble from spark_index_ya100 order by amtdouble desc ,amtlong limit 10; 183 | 184 | select ydb_sex, phonenum,amtlong,amtdouble from spark_import_txt order by amtdouble desc ,amtlong limit 10; 185 | 186 | -------------------------------------------------------------------------------- /autotest/7.other.sql: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | set ya100.spark.filter.spark_ya100= 5 | @session@ 6 | set ya100.spark.combine.spark_ya100=* 7 | @session@ 8 | set ya100.spark.top10000.spark_ya100= 9 | @session@ 10 | select Ycount('*',ya100_pipe) from spark_ya100 limit 10; 11 | select count(*) from spark_txt limit 10; 12 | 13 | 14 | 15 | 16 | set ya100.spark.filter.spark_ya100= amtlong like '([1095 TO 1100] )' 17 | @session@ 18 | set ya100.spark.combine.spark_ya100=* 19 | @session@ 20 | set ya100.spark.top10000.spark_ya100= 21 | @session@ 22 | select Ycount('*',ya100_pipe) from spark_ya100 limit 10; 23 | 24 | select count(*) from spark_txt where amtlong>=1095 and amtlong<=1100 limit 10; 25 | 26 | 27 | 28 | 29 | set ya100.spark.filter.spark_ya100= content='黑牛核桃芝麻糊' 30 | @session@ 31 | set ya100.spark.combine.spark_ya100=* 32 | @session@ 33 | set ya100.spark.top10000.spark_ya100= 34 | @session@ 35 | select Ycount('*',ya100_pipe) from spark_ya100 limit 10; 36 | select count(*) from spark_txt where content like '%黑牛核桃芝麻糊%' limit 10; 37 | 38 | 39 | set ya100.spark.filter.spark_ya100= ydb_sex='女' and ydb_grade='本科' and (ydb_age='20到30岁' or ydb_blood='O') and ydb_day='20160216' 40 | @session@ 41 | set ya100.spark.combine.spark_ya100=* 42 | @session@ 43 | set ya100.spark.top10000.spark_ya100= 44 | @session@ 45 | select Ycount('*',ya100_pipe) from spark_ya100 limit 10; 46 | select count(*) from spark_txt where ydb_sex='女' and ydb_grade='本科' and (ydb_age='20到30岁' or ydb_blood='O') and ydb_day='20160216' limit 10; 47 | 48 | 49 | 50 | 51 | 52 | set ya100.spark.filter.spark_ya100= 53 | @session@ 54 | set ya100.spark.combine.spark_ya100=amtlong,amtdouble 55 | @session@ 56 | set ya100.spark.top10000.spark_ya100= 57 | @session@ 58 | select Ycount('amtdouble',ya100_pipe),Ysum('amtdouble',ya100_pipe) ,Yavg('amtdouble',ya100_pipe),Ymax('amtdouble',ya100_pipe),Ymin('amtdouble',ya100_pipe),Ycount('amtlong',ya100_pipe) ,Ysum('amtlong',ya100_pipe) ,Yavg('amtlong',ya100_pipe), Ymax('amtlong',ya100_pipe), Ymin('amtlong',ya100_pipe) from spark_ya100 limit 10; 59 | 60 | select count(amtdouble),sum(amtdouble) ,avg(amtdouble),max(amtdouble),min(amtdouble),count(amtlong),sum(amtlong) ,avg(amtlong),max(amtlong),min(amtlong) from spark_txt limit 10; 61 | 62 | 63 | 64 | 65 | set ya100.spark.filter.spark_ya100= 66 | @session@ 67 | set ya100.spark.combine.spark_ya100=ydb_sex 68 | @session@ 69 | set ya100.spark.top10000.spark_ya100= 70 | @session@ 71 | select Ycount('ydb_sex',ya100_pipe), Ymaxstring('ydb_sex',ya100_pipe), Yminstring('ydb_sex',ya100_pipe) from spark_ya100 limit 10; 72 | select count(ydb_sex),max(ydb_sex),min(ydb_sex) from spark_txt limit 10; 73 | 74 | 75 | 76 | 77 | set ya100.spark.filter.spark_ya100= 78 | @session@ 79 | set ya100.spark.combine.spark_ya100=ydb_sex,ydb_province,ydb_grade,ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtlong 80 | @session@ 81 | set ya100.spark.top10000.spark_ya100= 82 | @session@ 83 | select Ycount('ydb_sex',ya100_pipe),Ycount('ydb_province',ya100_pipe),Ycount('ydb_grade',ya100_pipe),Ycount('ydb_age',ya100_pipe),Ycount('ydb_blood',ya100_pipe),Ycount('ydb_zhiye',ya100_pipe),Ycount('ydb_earn',ya100_pipe),Ycount('ydb_prefer',ya100_pipe),Ycount('ydb_consume',ya100_pipe),Ycount('ydb_day',ya100_pipe),Ycount('amtlong',ya100_pipe), Ymaxstring('ydb_sex',ya100_pipe),Ymaxstring('ydb_province',ya100_pipe),Ymaxstring('ydb_grade',ya100_pipe),Ymaxstring('ydb_age',ya100_pipe),Ymaxstring('ydb_blood',ya100_pipe),Ymaxstring('ydb_zhiye',ya100_pipe),Ymaxstring('ydb_earn',ya100_pipe),Ymaxstring('ydb_prefer',ya100_pipe),Ymaxstring('ydb_consume',ya100_pipe),Ymaxstring('ydb_day',ya100_pipe),Ymax('amtlong',ya100_pipe) from spark_ya100 limit 10; 84 | select count(ydb_sex),count(ydb_province),count(ydb_grade),count(ydb_age),count(ydb_blood),count(ydb_zhiye),count(ydb_earn),count(ydb_prefer),count(ydb_consume),count(ydb_day),count(amtlong), max(ydb_sex),max(ydb_province),max(ydb_grade),max(ydb_age),max(ydb_blood),max(ydb_zhiye),max(ydb_earn),max(ydb_prefer),max(ydb_consume),max(ydb_day),max(amtlong) from spark_txt limit 10; 85 | 86 | 87 | 88 | set ya100.spark.filter.spark_ya100= 89 | @session@ 90 | set ya100.spark.combine.spark_ya100=* 91 | @session@ 92 | set ya100.spark.top10000.spark_ya100= 93 | @session@ 94 | select ydb_sex,Ycount('*',ya100_pipe) as cnt from spark_ya100 group by ydb_sex order by cnt,ydb_sex limit 10; 95 | select ydb_sex,count(*) as cnt from spark_txt group by ydb_sex order by cnt,ydb_sex limit 10; 96 | 97 | 98 | set ya100.spark.filter.spark_ya100= 99 | @session@ 100 | set ya100.spark.combine.spark_ya100=* 101 | @session@ 102 | set ya100.spark.top10000.spark_ya100= 103 | @session@ 104 | select ydb_sex, ydb_province,Ycount('*',ya100_pipe) as cnt from spark_ya100 group by ydb_sex, ydb_province order by cnt desc,ydb_sex, ydb_province limit 10; 105 | select ydb_sex, ydb_province,count(*) as cnt from spark_txt group by ydb_sex, ydb_province order by cnt desc,ydb_sex, ydb_province limit 10; 106 | 107 | 108 | 109 | set ya100.spark.filter.spark_ya100= 110 | @session@ 111 | set ya100.spark.combine.spark_ya100=*,amtlong 112 | @session@ 113 | set ya100.spark.top10000.spark_ya100= 114 | @session@ 115 | select ydb_sex, ydb_province,Ycount('*',ya100_pipe),Ycount('amtlong',ya100_pipe),Ysum('amtlong',ya100_pipe) as cnt from spark_ya100 group by ydb_sex, ydb_province order by cnt desc,ydb_sex, ydb_province limit 10; 116 | select ydb_sex, ydb_province,count(*),count(amtlong),sum(amtlong) as cnt from spark_txt group by ydb_sex, ydb_province order by cnt desc,ydb_sex, ydb_province limit 10; 117 | 118 | 119 | 120 | set ya100.spark.filter.spark_ya100= 121 | @session@ 122 | set ya100.spark.combine.spark_ya100=ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtlong 123 | @session@ 124 | set ya100.spark.top10000.spark_ya100= 125 | @session@ 126 | select ydb_sex,ydb_province,ydb_grade, Ymaxstring('ydb_age',ya100_pipe),Ymaxstring('ydb_blood',ya100_pipe),Ymaxstring('ydb_zhiye',ya100_pipe),Ymaxstring('ydb_earn',ya100_pipe),Ymaxstring('ydb_prefer',ya100_pipe),Ymaxstring('ydb_consume',ya100_pipe),Ymaxstring('ydb_day',ya100_pipe),Ysum('amtlong',ya100_pipe) as cnt from spark_ya100 group by ydb_sex,ydb_province,ydb_grade order by cnt desc,ydb_sex,ydb_province,ydb_grade limit 10; 127 | select ydb_sex,ydb_province,ydb_grade, max(ydb_age),max(ydb_blood),max(ydb_zhiye),max(ydb_earn),max(ydb_prefer),max(ydb_consume),max(ydb_day),sum(amtlong) as cnt from spark_txt group by ydb_sex,ydb_province,ydb_grade order by cnt desc,ydb_sex,ydb_province,ydb_grade limit 10; 128 | 129 | 130 | 131 | set ya100.spark.filter.spark_ya100= 132 | @session@ 133 | set ya100.spark.combine.spark_ya100= 134 | @session@ 135 | set ya100.spark.top10000.spark_ya100=usernick desc,amtdouble desc limit 10 136 | @session@ 137 | select phonenum,usernick,ydb_sex,ydb_province,ydb_grade,ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtdouble,amtlong from spark_ya100 order by usernick desc,amtdouble desc,phonenum,usernick limit 10; 138 | select phonenum,usernick,ydb_sex,ydb_province,ydb_grade,ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtdouble,amtlong from spark_txt order by usernick desc,amtdouble desc,phonenum,usernick limit 10; 139 | 140 | 141 | 142 | 143 | 144 | set ya100.spark.filter.spark_ya100= 145 | @session@ 146 | set ya100.spark.combine.spark_ya100= 147 | @session@ 148 | set ya100.spark.top10000.spark_ya100=amtdouble asc,amtlong desc limit 10 149 | @session@ 150 | select phonenum,usernick,ydb_sex,ydb_province,ydb_grade,ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtdouble,amtlong from spark_ya100 order by amtdouble asc,amtlong desc,phonenum,usernick limit 10; 151 | select phonenum,usernick,ydb_sex,ydb_province,ydb_grade,ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtdouble,amtlong from spark_txt order by amtdouble asc,amtlong desc,phonenum,usernick limit 10; 152 | 153 | 154 | 155 | set ya100.spark.filter.spark_ya100= 156 | @session@ 157 | set ya100.spark.combine.spark_ya100= 158 | @session@ 159 | set ya100.spark.top10000.spark_ya100=phonenum asc,amtlong desc limit 10 160 | @session@ 161 | select phonenum,usernick,ydb_sex,ydb_province,ydb_grade,ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtdouble,amtlong from spark_ya100 order by phonenum asc,amtlong desc,phonenum,usernick limit 10; 162 | select phonenum,usernick,ydb_sex,ydb_province,ydb_grade,ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtdouble,amtlong from spark_txt order by phonenum asc,amtlong desc,phonenum,usernick limit 10; 163 | 164 | 165 | 166 | set ya100.spark.filter.spark_ya100=content='黑牛核桃芝麻糊' 167 | @session@ 168 | set ya100.spark.combine.spark_ya100=ydb_sex,ydb_province,ydb_grade,ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtlong 169 | @session@ 170 | set ya100.spark.top10000.spark_ya100= 171 | @session@ 172 | select Ycount('ydb_sex',ya100_pipe),Ycount('ydb_province',ya100_pipe),Ycount('ydb_grade',ya100_pipe),Ycount('ydb_age',ya100_pipe),Ycount('ydb_blood',ya100_pipe),Ycount('ydb_zhiye',ya100_pipe),Ycount('ydb_earn',ya100_pipe),Ycount('ydb_prefer',ya100_pipe),Ycount('ydb_consume',ya100_pipe),Ycount('ydb_day',ya100_pipe),Ycount('amtlong',ya100_pipe), Ymaxstring('ydb_sex',ya100_pipe),Ymaxstring('ydb_province',ya100_pipe),Ymaxstring('ydb_grade',ya100_pipe),Ymaxstring('ydb_age',ya100_pipe),Ymaxstring('ydb_blood',ya100_pipe),Ymaxstring('ydb_zhiye',ya100_pipe),Ymaxstring('ydb_earn',ya100_pipe),Ymaxstring('ydb_prefer',ya100_pipe),Ymaxstring('ydb_consume',ya100_pipe),Ymaxstring('ydb_day',ya100_pipe),Ymax('amtlong',ya100_pipe) from spark_ya100 limit 10; 173 | select count(ydb_sex),count(ydb_province),count(ydb_grade),count(ydb_age),count(ydb_blood),count(ydb_zhiye),count(ydb_earn),count(ydb_prefer),count(ydb_consume),count(ydb_day),count(amtlong), max(ydb_sex),max(ydb_province),max(ydb_grade),max(ydb_age),max(ydb_blood),max(ydb_zhiye),max(ydb_earn),max(ydb_prefer),max(ydb_consume),max(ydb_day),max(amtlong) from spark_txt where content like '%黑牛核桃芝麻糊%' limit 10; 174 | 175 | 176 | 177 | set ya100.spark.filter.spark_ya100=content='黑牛核桃芝麻糊' 178 | @session@ 179 | set ya100.spark.combine.spark_ya100=ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtlong 180 | @session@ 181 | set ya100.spark.top10000.spark_ya100= 182 | @session@ 183 | select ydb_sex,ydb_province,ydb_grade, Ymaxstring('ydb_age',ya100_pipe),Ymaxstring('ydb_blood',ya100_pipe),Ymaxstring('ydb_zhiye',ya100_pipe),Ymaxstring('ydb_earn',ya100_pipe),Ymaxstring('ydb_prefer',ya100_pipe),Ymaxstring('ydb_consume',ya100_pipe),Ymaxstring('ydb_day',ya100_pipe),Ysum('amtlong',ya100_pipe) as cnt from spark_ya100 group by ydb_sex,ydb_province,ydb_grade order by cnt desc,ydb_sex,ydb_province,ydb_grade limit 10; 184 | select ydb_sex,ydb_province,ydb_grade, max(ydb_age),max(ydb_blood),max(ydb_zhiye),max(ydb_earn),max(ydb_prefer),max(ydb_consume),max(ydb_day),sum(amtlong) as cnt from spark_txt where content like '%黑牛核桃芝麻糊%' group by ydb_sex,ydb_province,ydb_grade order by cnt desc,ydb_sex,ydb_province,ydb_grade limit 10; 185 | 186 | 187 | 188 | set ya100.spark.filter.spark_ya100=content='黑牛核桃芝麻糊' 189 | @session@ 190 | set ya100.spark.combine.spark_ya100= 191 | @session@ 192 | set ya100.spark.top10000.spark_ya100=amtdouble asc,amtlong desc limit 10 193 | @session@ 194 | select phonenum,usernick,ydb_sex,ydb_province,ydb_grade,ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtdouble,amtlong from spark_ya100 order by amtdouble asc,amtlong desc,phonenum,usernick limit 10; 195 | select phonenum,usernick,ydb_sex,ydb_province,ydb_grade,ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtdouble,amtlong from spark_txt where content like '%黑牛核桃芝麻糊%' order by amtdouble asc,amtlong desc,phonenum,usernick limit 10; 196 | 197 | 198 | set ya100.spark.filter.spark_ya100=content='黑牛核桃芝麻糊' 199 | @session@ 200 | set ya100.spark.combine.spark_ya100=*,ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtlong 201 | @session@ 202 | set ya100.spark.top10000.spark_ya100= 203 | @session@ 204 | select phonenum,Ycount('*',ya100_pipe), Ymaxstring('ydb_age',ya100_pipe),Ymaxstring('ydb_blood',ya100_pipe),Ymaxstring('ydb_zhiye',ya100_pipe),Ymaxstring('ydb_earn',ya100_pipe),Ymaxstring('ydb_prefer',ya100_pipe),Ymaxstring('ydb_consume',ya100_pipe),Ymaxstring('ydb_day',ya100_pipe),Ysum('amtlong',ya100_pipe) as cnt from spark_ya100 group by phonenum order by cnt desc,phonenum limit 10; 205 | select phonenum,count(*),max(ydb_age),max(ydb_blood),max(ydb_zhiye),max(ydb_earn),max(ydb_prefer),max(ydb_consume),max(ydb_day),sum(amtlong) as cnt from spark_txt where content like '%黑牛核桃芝麻糊%' group by phonenum order by cnt desc,phonenum limit 10; 206 | 207 | 208 | 209 | 210 | set ya100.spark.filter.spark_ya100=content='黑牛核桃芝麻糊' 211 | @session@ 212 | set ya100.spark.combine.spark_ya100=*,ydb_age,ydb_blood,ydb_zhiye,ydb_earn,ydb_prefer,ydb_consume,ydb_day,amtlong 213 | @session@ 214 | set ya100.spark.top10000.spark_ya100= 215 | @session@ 216 | select usernick, Ycount('*',ya100_pipe),Ymaxstring('ydb_age',ya100_pipe),Ymaxstring('ydb_blood',ya100_pipe),Ymaxstring('ydb_zhiye',ya100_pipe),Ymaxstring('ydb_earn',ya100_pipe),Ymaxstring('ydb_prefer',ya100_pipe),Ymaxstring('ydb_consume',ya100_pipe),Ymaxstring('ydb_day',ya100_pipe),Ysum('amtlong',ya100_pipe) as cnt from spark_ya100 group by usernick order by cnt desc,usernick limit 10; 217 | select usernick,count(*), max(ydb_age),max(ydb_blood),max(ydb_zhiye),max(ydb_earn),max(ydb_prefer),max(ydb_consume),max(ydb_day),sum(amtlong) as cnt from spark_txt where content like '%黑牛核桃芝麻糊%' group by usernick order by cnt desc,usernick limit 10; 218 | 219 | 220 | set ya100.spark.filter.spark_ya100=content='黑牛核桃芝麻糊' 221 | @session@ 222 | set ya100.spark.combine.spark_ya100=*,phonenum,usernick 223 | @session@ 224 | set ya100.spark.top10000.spark_ya100= 225 | @session@ 226 | select Ycount('*',ya100_pipe),Ycount('phonenum',ya100_pipe),Ymax('phonenum',ya100_pipe),Ymin('phonenum',ya100_pipe),Ycount('usernick',ya100_pipe) , Ymaxstring('usernick',ya100_pipe), Yminstring('usernick',ya100_pipe) from spark_ya100 limit 10; 227 | select count(*),count(phonenum),max(phonenum),min(phonenum),count(usernick),max(usernick),min(usernick) from spark_txt where content like '%黑牛核桃芝麻糊%' limit 10; 228 | 229 | 230 | 231 | 232 | set ya100.spark.filter.ya100_all_type= 233 | @session@ 234 | set ya100.spark.combine.ya100_all_type=* 235 | @session@ 236 | set ya100.spark.top10000.ya100_all_type= 237 | @session@ 238 | select Ycount('*',ya100_pipe) from ya100_all_type limit 10; 239 | select count(*) from ya100_all_type_raw limit 10; 240 | 241 | 242 | 243 | 244 | 245 | set ya100.spark.filter.ya100_all_type= 246 | @session@ 247 | set ya100.spark.combine.ya100_all_type=*,c1_double,c1_float,c1_long,c1_int,c1_short,c1_byte 248 | @session@ 249 | set ya100.spark.top10000.ya100_all_type= 250 | @session@ 251 | select 252 | Ycount('*',ya100_pipe), 253 | Ycount('c1_double',ya100_pipe),Ysum('c1_double',ya100_pipe) ,Yavg('c1_double',ya100_pipe),Ymax('c1_double',ya100_pipe),Ymin('c1_double',ya100_pipe), 254 | Ycount('c1_float',ya100_pipe),Ysum('c1_float',ya100_pipe) ,Yavg('c1_float',ya100_pipe),Ymax('c1_float',ya100_pipe),Ymin('c1_float',ya100_pipe), 255 | Ycount('c1_long',ya100_pipe),Ysum('c1_long',ya100_pipe) ,Yavg('c1_long',ya100_pipe),Ymax('c1_long',ya100_pipe),Ymin('c1_long',ya100_pipe), 256 | Ycount('c1_int',ya100_pipe),Ysum('c1_int',ya100_pipe) ,Yavg('c1_int',ya100_pipe),Ymax('c1_int',ya100_pipe),Ymin('c1_int',ya100_pipe), 257 | Ycount('c1_short',ya100_pipe),Ysum('c1_short',ya100_pipe) ,Yavg('c1_short',ya100_pipe),Ymax('c1_short',ya100_pipe),Ymin('c1_short',ya100_pipe), 258 | Ycount('c1_byte',ya100_pipe),Ysum('c1_byte',ya100_pipe) ,Yavg('c1_byte',ya100_pipe),Ymax('c1_byte',ya100_pipe),Ymin('c1_byte',ya100_pipe) 259 | from ya100_all_type limit 10; 260 | 261 | select count(*),count(c1_double),sum(c1_double),avg(c1_double),max(c1_double),min(c1_double) 262 | ,count(c1_float),sum(c1_float),avg(c1_float),max(c1_float),min(c1_float) 263 | ,count(c1_long),sum(c1_long),avg(c1_long),max(c1_long),min(c1_long) 264 | ,count(c1_int),sum(c1_int),avg(c1_int),max(c1_int),min(c1_int) 265 | ,count(c1_short),sum(c1_short),avg(c1_short),max(c1_short),min(c1_short) 266 | ,count(c1_byte),sum(c1_byte),avg(c1_byte),max(c1_byte),min(c1_byte) 267 | from ya100_all_type_raw limit 10; 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | set ya100.spark.filter.ya100_all_type= 277 | @session@ 278 | set ya100.spark.combine.ya100_all_type=* 279 | @session@ 280 | set ya100.spark.top10000.ya100_all_type= 281 | @session@ 282 | select c1_string,c1_double,Ycount('*',ya100_pipe) as cnt from ya100_all_type group by c1_string,c1_double order by cnt desc,c1_string,c1_double limit 10; 283 | 284 | select c1_string,c1_double,count(*) as cnt from ya100_all_type_raw group by c1_string,c1_double order by cnt desc,c1_string,c1_double limit 10; 285 | 286 | 287 | set ya100.spark.filter.ya100_all_type= 288 | @session@ 289 | set ya100.spark.combine.ya100_all_type=*,c2_short,c1_short 290 | @session@ 291 | set ya100.spark.top10000.ya100_all_type= 292 | @session@ 293 | select c1_byte,c2_byte,Ycount('*',ya100_pipe) as cnt, 294 | Ycount('c1_short',ya100_pipe),Ysum('c1_short',ya100_pipe) ,Yavg('c1_short',ya100_pipe),Ymax('c1_short',ya100_pipe),Ymin('c1_short',ya100_pipe), 295 | Ycount('c2_short',ya100_pipe),Ysum('c2_short',ya100_pipe) ,Yavg('c2_short',ya100_pipe),Ymax('c2_short',ya100_pipe),Ymin('c2_short',ya100_pipe) 296 | from ya100_all_type group by c1_byte,c2_byte order by cnt desc,c1_byte,c2_byte limit 10; 297 | 298 | select c1_byte,c2_byte,count(*) as cnt, 299 | count(c1_short),sum(c1_short),avg(c1_short),max(c1_short),min(c1_short) 300 | ,count(c2_short),sum(c2_short),avg(c2_short),max(c2_short),min(c2_short) 301 | 302 | from ya100_all_type_raw group by c1_byte,c2_byte order by cnt desc,c1_byte,c2_byte limit 10; 303 | 304 | 305 | set ya100.spark.filter.ya100_all_type= 306 | @session@ 307 | set ya100.spark.combine.ya100_all_type= 308 | @session@ 309 | set ya100.spark.top10000.ya100_all_type=c1_short asc,c4_double desc,c4_string desc,c4_long desc limit 10 310 | @session@ 311 | select c1_byte,c2_byte,c1_short,c2_short,c1_int,c2_int,c3_int,c4_int,c1_long,c2_long,c3_long,c4_long,c1_float,c2_float,c3_float,c4_float,c1_double,c2_double,c3_double,c4_double,c1_string,c2_string,c3_string,c4_string,c1_text from ya100_all_type order by c1_short asc,c4_double desc,c4_string desc,c4_long desc limit 10; 312 | 313 | select c1_byte,c2_byte,c1_short,c2_short,c1_int,c2_int,c3_int,c4_int,c1_long,c2_long,c3_long,c4_long,c1_float,c2_float,c3_float,c4_float,c1_double,c2_double,c3_double,c4_double,c1_string,c2_string,c3_string,c4_string,c1_text from ya100_all_type_raw order by c1_short asc,c4_double desc,c4_string desc,c4_long desc limit 10; 314 | 315 | 316 | -------------------------------------------------------------------------------- /autotest/8.1.blocksort.sql: -------------------------------------------------------------------------------- 1 | 2 | /*ydb.pushdown('->')*/ 3 | select tradetime, amtfloat from blocksort_ydb 4 | order by tradetime,amtfloat limit 1000 5 | /*('<-')pushdown.ydb*/; 6 | 7 | 8 | /*ydb.pushdown('->')*/ 9 | select tradetime, amtfloat from blocksort_ydb where 10 | ydbkv='blocksort.field:tradetime' and 11 | ydbkv='blocksort.desc:false' and 12 | ydbkv='blocksort.limit:1000' 13 | order by tradetime,amtfloat limit 1000 14 | /*('<-')pushdown.ydb*/; 15 | 16 | 17 | 18 | /*ydb.pushdown('->')*/ 19 | select tradetime, amtfloat from blocksort_ydb 20 | order by tradetime desc,amtfloat limit 1000 21 | /*('<-')pushdown.ydb*/; 22 | 23 | 24 | /*ydb.pushdown('->')*/ 25 | select tradetime, amtfloat from blocksort_ydb where 26 | ydbkv='blocksort.field:tradetime' and 27 | ydbkv='blocksort.desc:true' and 28 | ydbkv='blocksort.limit:1000' 29 | order by tradetime desc,amtfloat limit 1000 30 | /*('<-')pushdown.ydb*/; 31 | 32 | 33 | --tint 34 | 35 | /*ydb.pushdown('->')*/ 36 | select amtint, amtfloat from blocksort_ydb 37 | order by amtint,amtfloat limit 1000 38 | /*('<-')pushdown.ydb*/; 39 | 40 | 41 | /*ydb.pushdown('->')*/ 42 | select amtint, amtfloat from blocksort_ydb where 43 | ydbkv='blocksort.field:amtint' and 44 | ydbkv='blocksort.desc:false' and 45 | ydbkv='blocksort.limit:1000' 46 | order by amtint,amtfloat limit 1000 47 | /*('<-')pushdown.ydb*/; 48 | 49 | 50 | 51 | /*ydb.pushdown('->')*/ 52 | select amtint, amtfloat from blocksort_ydb 53 | order by amtint desc,amtfloat limit 1000 54 | /*('<-')pushdown.ydb*/; 55 | 56 | 57 | /*ydb.pushdown('->')*/ 58 | select amtint, amtfloat from blocksort_ydb where 59 | ydbkv='blocksort.field:amtint' and 60 | ydbkv='blocksort.desc:true' and 61 | ydbkv='blocksort.limit:1000' 62 | order by amtint desc,amtfloat limit 1000 63 | /*('<-')pushdown.ydb*/; 64 | 65 | 66 | --tdouble 67 | 68 | 69 | /*ydb.pushdown('->')*/ 70 | select amtdouble, amtfloat from blocksort_ydb 71 | order by amtdouble,amtfloat limit 1000 72 | /*('<-')pushdown.ydb*/; 73 | 74 | 75 | /*ydb.pushdown('->')*/ 76 | select amtdouble, amtfloat from blocksort_ydb where 77 | ydbkv='blocksort.field:amtdouble' and 78 | ydbkv='blocksort.desc:false' and 79 | ydbkv='blocksort.limit:1000' 80 | order by amtdouble,amtfloat limit 1000 81 | /*('<-')pushdown.ydb*/; 82 | 83 | 84 | 85 | /*ydb.pushdown('->')*/ 86 | select amtdouble, amtfloat from blocksort_ydb 87 | order by amtdouble desc,amtfloat limit 1000 88 | /*('<-')pushdown.ydb*/; 89 | 90 | 91 | /*ydb.pushdown('->')*/ 92 | select amtdouble, amtfloat from blocksort_ydb where 93 | ydbkv='blocksort.field:amtdouble' and 94 | ydbkv='blocksort.desc:true' and 95 | ydbkv='blocksort.limit:1000' 96 | order by amtdouble desc,amtfloat limit 1000 97 | /*('<-')pushdown.ydb*/; 98 | 99 | 100 | 101 | --tfloat 102 | 103 | 104 | /*ydb.pushdown('->')*/ 105 | select amtfloat, tradetime from blocksort_ydb 106 | order by amtfloat,tradetime limit 1000 107 | /*('<-')pushdown.ydb*/; 108 | 109 | 110 | /*ydb.pushdown('->')*/ 111 | select amtfloat, tradetime from blocksort_ydb where 112 | ydbkv='blocksort.field:amtfloat' and 113 | ydbkv='blocksort.desc:false' and 114 | ydbkv='blocksort.limit:1000' 115 | order by amtfloat,tradetime limit 1000 116 | /*('<-')pushdown.ydb*/; 117 | 118 | 119 | 120 | /*ydb.pushdown('->')*/ 121 | select amtfloat, tradetime from blocksort_ydb 122 | order by amtfloat desc,tradetime limit 1000 123 | /*('<-')pushdown.ydb*/; 124 | 125 | 126 | /*ydb.pushdown('->')*/ 127 | select amtfloat, tradetime from blocksort_ydb where 128 | ydbkv='blocksort.field:amtfloat' and 129 | ydbkv='blocksort.desc:true' and 130 | ydbkv='blocksort.limit:1000' 131 | order by amtfloat desc,tradetime limit 1000 132 | /*('<-')pushdown.ydb*/; 133 | 134 | 135 | 136 | 137 | 138 | /*ydb.pushdown('->')*/ 139 | select tradetime, amtfloat from blocksort_ydb 140 | order by tradetime,amtfloat limit 1000 141 | /*('<-')pushdown.ydb*/; 142 | 143 | 144 | /*ydb.pushdown('->')*/ 145 | select tradetime, amtfloat from blocksort_ydb where 146 | ydbkv='blocksort.field:tradetime' and 147 | ydbkv='blocksort.desc:false' and 148 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 149 | order by tradetime,amtfloat limit 1000 150 | /*('<-')pushdown.ydb*/; 151 | 152 | 153 | 154 | /*ydb.pushdown('->')*/ 155 | select tradetime, amtfloat from blocksort_ydb 156 | order by tradetime desc,amtfloat limit 1000 157 | /*('<-')pushdown.ydb*/; 158 | 159 | 160 | /*ydb.pushdown('->')*/ 161 | select tradetime, amtfloat from blocksort_ydb where 162 | ydbkv='blocksort.field:tradetime' and 163 | ydbkv='blocksort.desc:true' and 164 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 165 | order by tradetime desc,amtfloat limit 1000 166 | /*('<-')pushdown.ydb*/; 167 | 168 | 169 | --tint 170 | 171 | /*ydb.pushdown('->')*/ 172 | select amtint, amtfloat from blocksort_ydb 173 | order by amtint,amtfloat limit 1000 174 | /*('<-')pushdown.ydb*/; 175 | 176 | 177 | /*ydb.pushdown('->')*/ 178 | select amtint, amtfloat from blocksort_ydb where 179 | ydbkv='blocksort.field:amtint' and 180 | ydbkv='blocksort.desc:false' and 181 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 182 | order by amtint,amtfloat limit 1000 183 | /*('<-')pushdown.ydb*/; 184 | 185 | 186 | 187 | /*ydb.pushdown('->')*/ 188 | select amtint, amtfloat from blocksort_ydb 189 | order by amtint desc,amtfloat limit 1000 190 | /*('<-')pushdown.ydb*/; 191 | 192 | 193 | /*ydb.pushdown('->')*/ 194 | select amtint, amtfloat from blocksort_ydb where 195 | ydbkv='blocksort.field:amtint' and 196 | ydbkv='blocksort.desc:true' and 197 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 198 | order by amtint desc,amtfloat limit 1000 199 | /*('<-')pushdown.ydb*/; 200 | 201 | 202 | --tdouble 203 | 204 | 205 | /*ydb.pushdown('->')*/ 206 | select amtdouble, amtfloat from blocksort_ydb 207 | order by amtdouble,amtfloat limit 1000 208 | /*('<-')pushdown.ydb*/; 209 | 210 | 211 | /*ydb.pushdown('->')*/ 212 | select amtdouble, amtfloat from blocksort_ydb where 213 | ydbkv='blocksort.field:amtdouble' and 214 | ydbkv='blocksort.desc:false' and 215 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 216 | order by amtdouble,amtfloat limit 1000 217 | /*('<-')pushdown.ydb*/; 218 | 219 | 220 | 221 | /*ydb.pushdown('->')*/ 222 | select amtdouble, amtfloat from blocksort_ydb 223 | order by amtdouble desc,amtfloat limit 1000 224 | /*('<-')pushdown.ydb*/; 225 | 226 | 227 | /*ydb.pushdown('->')*/ 228 | select amtdouble, amtfloat from blocksort_ydb where 229 | ydbkv='blocksort.field:amtdouble' and 230 | ydbkv='blocksort.desc:true' and 231 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 232 | order by amtdouble desc,amtfloat limit 1000 233 | /*('<-')pushdown.ydb*/; 234 | 235 | 236 | 237 | --tfloat 238 | 239 | 240 | /*ydb.pushdown('->')*/ 241 | select amtfloat, tradetime from blocksort_ydb 242 | order by amtfloat,tradetime limit 1000 243 | /*('<-')pushdown.ydb*/; 244 | 245 | 246 | /*ydb.pushdown('->')*/ 247 | select amtfloat, tradetime from blocksort_ydb where 248 | ydbkv='blocksort.field:amtfloat' and 249 | ydbkv='blocksort.desc:false' and 250 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 251 | order by amtfloat,tradetime limit 1000 252 | /*('<-')pushdown.ydb*/; 253 | 254 | 255 | 256 | /*ydb.pushdown('->')*/ 257 | select amtfloat, tradetime from blocksort_ydb 258 | order by amtfloat desc,tradetime limit 1000 259 | /*('<-')pushdown.ydb*/; 260 | 261 | 262 | /*ydb.pushdown('->')*/ 263 | select amtfloat, tradetime from blocksort_ydb where 264 | ydbkv='blocksort.field:amtfloat' and 265 | ydbkv='blocksort.desc:true' and 266 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 267 | order by amtfloat desc,tradetime limit 1000 268 | /*('<-')pushdown.ydb*/; 269 | 270 | 271 | 272 | 273 | /*ydb.pushdown('->')*/ 274 | select tradetime, amtfloat from blocksort_ydb 275 | order by tradetime,amtfloat limit 1000 276 | /*('<-')pushdown.ydb*/; 277 | 278 | 279 | /*ydb.pushdown('->')*/ 280 | select tradetime, amtfloat from blocksort_ydb where 281 | ydbkv='blocksort.field:tradetime' and 282 | ydbkv='blocksort.desc:false' and 283 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 284 | order by tradetime,amtfloat limit 1000 285 | /*('<-')pushdown.ydb*/; 286 | 287 | 288 | 289 | /*ydb.pushdown('->')*/ 290 | select tradetime, amtfloat from blocksort_ydb 291 | order by tradetime desc,amtfloat limit 1000 292 | /*('<-')pushdown.ydb*/; 293 | 294 | 295 | /*ydb.pushdown('->')*/ 296 | select tradetime, amtfloat from blocksort_ydb where 297 | ydbkv='blocksort.field:tradetime' and 298 | ydbkv='blocksort.desc:true' and 299 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 300 | order by tradetime desc,amtfloat limit 1000 301 | /*('<-')pushdown.ydb*/; 302 | 303 | 304 | --tint 305 | 306 | /*ydb.pushdown('->')*/ 307 | select amtint, amtfloat from blocksort_ydb 308 | order by amtint,amtfloat limit 1000 309 | /*('<-')pushdown.ydb*/; 310 | 311 | 312 | /*ydb.pushdown('->')*/ 313 | select amtint, amtfloat from blocksort_ydb where 314 | ydbkv='blocksort.field:amtint' and 315 | ydbkv='blocksort.desc:false' and 316 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 317 | order by amtint,amtfloat limit 1000 318 | /*('<-')pushdown.ydb*/; 319 | 320 | 321 | 322 | /*ydb.pushdown('->')*/ 323 | select amtint, amtfloat from blocksort_ydb 324 | order by amtint desc,amtfloat limit 1000 325 | /*('<-')pushdown.ydb*/; 326 | 327 | 328 | /*ydb.pushdown('->')*/ 329 | select amtint, amtfloat from blocksort_ydb where 330 | ydbkv='blocksort.field:amtint' and 331 | ydbkv='blocksort.desc:true' and 332 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 333 | order by amtint desc,amtfloat limit 1000 334 | /*('<-')pushdown.ydb*/; 335 | 336 | 337 | --tdouble 338 | 339 | 340 | /*ydb.pushdown('->')*/ 341 | select amtdouble, amtfloat from blocksort_ydb 342 | order by amtdouble,amtfloat limit 1000 343 | /*('<-')pushdown.ydb*/; 344 | 345 | 346 | /*ydb.pushdown('->')*/ 347 | select amtdouble, amtfloat from blocksort_ydb where 348 | ydbkv='blocksort.field:amtdouble' and 349 | ydbkv='blocksort.desc:false' and 350 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 351 | order by amtdouble,amtfloat limit 1000 352 | /*('<-')pushdown.ydb*/; 353 | 354 | 355 | 356 | /*ydb.pushdown('->')*/ 357 | select amtdouble, amtfloat from blocksort_ydb 358 | order by amtdouble desc,amtfloat limit 1000 359 | /*('<-')pushdown.ydb*/; 360 | 361 | 362 | /*ydb.pushdown('->')*/ 363 | select amtdouble, amtfloat from blocksort_ydb where 364 | ydbkv='blocksort.field:amtdouble' and 365 | ydbkv='blocksort.desc:true' and 366 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 367 | order by amtdouble desc,amtfloat limit 1000 368 | /*('<-')pushdown.ydb*/; 369 | 370 | 371 | 372 | --tfloat 373 | 374 | 375 | /*ydb.pushdown('->')*/ 376 | select amtfloat, tradetime from blocksort_ydb 377 | order by amtfloat,tradetime limit 1000 378 | /*('<-')pushdown.ydb*/; 379 | 380 | 381 | /*ydb.pushdown('->')*/ 382 | select amtfloat, tradetime from blocksort_ydb where 383 | ydbkv='blocksort.field:amtfloat' and 384 | ydbkv='blocksort.desc:false' and 385 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 386 | order by amtfloat,tradetime limit 1000 387 | /*('<-')pushdown.ydb*/; 388 | 389 | 390 | 391 | /*ydb.pushdown('->')*/ 392 | select amtfloat, tradetime from blocksort_ydb 393 | order by amtfloat desc,tradetime limit 1000 394 | /*('<-')pushdown.ydb*/; 395 | 396 | 397 | /*ydb.pushdown('->')*/ 398 | select amtfloat, tradetime from blocksort_ydb where 399 | ydbkv='blocksort.field:amtfloat' and 400 | ydbkv='blocksort.desc:true' and 401 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 402 | order by amtfloat desc,tradetime limit 1000 403 | /*('<-')pushdown.ydb*/; -------------------------------------------------------------------------------- /autotest/8.2.blocksort.sql: -------------------------------------------------------------------------------- 1 | 2 | /*ydb.pushdown('->')*/ 3 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 4 | order by tradetime,amtfloat limit 1000 5 | /*('<-')pushdown.ydb*/; 6 | 7 | 8 | /*ydb.pushdown('->')*/ 9 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 10 | ydbkv='blocksort.field:tradetime' and 11 | ydbkv='blocksort.desc:false' and 12 | ydbkv='blocksort.limit:1000' 13 | order by tradetime,amtfloat limit 1000 14 | /*('<-')pushdown.ydb*/; 15 | 16 | 17 | 18 | /*ydb.pushdown('->')*/ 19 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 20 | order by tradetime desc,amtfloat limit 1000 21 | /*('<-')pushdown.ydb*/; 22 | 23 | 24 | /*ydb.pushdown('->')*/ 25 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 26 | ydbkv='blocksort.field:tradetime' and 27 | ydbkv='blocksort.desc:true' and 28 | ydbkv='blocksort.limit:1000' 29 | order by tradetime desc,amtfloat limit 1000 30 | /*('<-')pushdown.ydb*/; 31 | 32 | 33 | --tint 34 | 35 | /*ydb.pushdown('->')*/ 36 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 37 | order by amtint,amtfloat limit 1000 38 | /*('<-')pushdown.ydb*/; 39 | 40 | 41 | /*ydb.pushdown('->')*/ 42 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 43 | ydbkv='blocksort.field:amtint' and 44 | ydbkv='blocksort.desc:false' and 45 | ydbkv='blocksort.limit:1000' 46 | order by amtint,amtfloat limit 1000 47 | /*('<-')pushdown.ydb*/; 48 | 49 | 50 | 51 | /*ydb.pushdown('->')*/ 52 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 53 | order by amtint desc,amtfloat limit 1000 54 | /*('<-')pushdown.ydb*/; 55 | 56 | 57 | /*ydb.pushdown('->')*/ 58 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 59 | ydbkv='blocksort.field:amtint' and 60 | ydbkv='blocksort.desc:true' and 61 | ydbkv='blocksort.limit:1000' 62 | order by amtint desc,amtfloat limit 1000 63 | /*('<-')pushdown.ydb*/; 64 | 65 | 66 | --tdouble 67 | 68 | 69 | /*ydb.pushdown('->')*/ 70 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 71 | order by amtdouble,amtfloat limit 1000 72 | /*('<-')pushdown.ydb*/; 73 | 74 | 75 | /*ydb.pushdown('->')*/ 76 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 77 | ydbkv='blocksort.field:amtdouble' and 78 | ydbkv='blocksort.desc:false' and 79 | ydbkv='blocksort.limit:1000' 80 | order by amtdouble,amtfloat limit 1000 81 | /*('<-')pushdown.ydb*/; 82 | 83 | 84 | 85 | /*ydb.pushdown('->')*/ 86 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 87 | order by amtdouble desc,amtfloat limit 1000 88 | /*('<-')pushdown.ydb*/; 89 | 90 | 91 | /*ydb.pushdown('->')*/ 92 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 93 | ydbkv='blocksort.field:amtdouble' and 94 | ydbkv='blocksort.desc:true' and 95 | ydbkv='blocksort.limit:1000' 96 | order by amtdouble desc,amtfloat limit 1000 97 | /*('<-')pushdown.ydb*/; 98 | 99 | 100 | 101 | --tfloat 102 | 103 | 104 | /*ydb.pushdown('->')*/ 105 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 106 | order by amtfloat,tradetime limit 1000 107 | /*('<-')pushdown.ydb*/; 108 | 109 | 110 | /*ydb.pushdown('->')*/ 111 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 112 | ydbkv='blocksort.field:amtfloat' and 113 | ydbkv='blocksort.desc:false' and 114 | ydbkv='blocksort.limit:1000' 115 | order by amtfloat,tradetime limit 1000 116 | /*('<-')pushdown.ydb*/; 117 | 118 | 119 | 120 | /*ydb.pushdown('->')*/ 121 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 122 | order by amtfloat desc,tradetime limit 1000 123 | /*('<-')pushdown.ydb*/; 124 | 125 | 126 | /*ydb.pushdown('->')*/ 127 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 128 | ydbkv='blocksort.field:amtfloat' and 129 | ydbkv='blocksort.desc:true' and 130 | ydbkv='blocksort.limit:1000' 131 | order by amtfloat desc,tradetime limit 1000 132 | /*('<-')pushdown.ydb*/; 133 | 134 | 135 | 136 | 137 | /*ydb.pushdown('->')*/ 138 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 139 | order by tradetime,amtfloat limit 1000 140 | /*('<-')pushdown.ydb*/; 141 | 142 | 143 | /*ydb.pushdown('->')*/ 144 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 145 | ydbkv='blocksort.field:tradetime' and 146 | ydbkv='blocksort.desc:false' and 147 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 148 | order by tradetime,amtfloat limit 1000 149 | /*('<-')pushdown.ydb*/; 150 | 151 | 152 | 153 | /*ydb.pushdown('->')*/ 154 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 155 | order by tradetime desc,amtfloat limit 1000 156 | /*('<-')pushdown.ydb*/; 157 | 158 | 159 | /*ydb.pushdown('->')*/ 160 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 161 | ydbkv='blocksort.field:tradetime' and 162 | ydbkv='blocksort.desc:true' and 163 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 164 | order by tradetime desc,amtfloat limit 1000 165 | /*('<-')pushdown.ydb*/; 166 | 167 | 168 | --tint 169 | 170 | /*ydb.pushdown('->')*/ 171 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 172 | order by amtint,amtfloat limit 1000 173 | /*('<-')pushdown.ydb*/; 174 | 175 | 176 | /*ydb.pushdown('->')*/ 177 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 178 | ydbkv='blocksort.field:amtint' and 179 | ydbkv='blocksort.desc:false' and 180 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 181 | order by amtint,amtfloat limit 1000 182 | /*('<-')pushdown.ydb*/; 183 | 184 | 185 | 186 | /*ydb.pushdown('->')*/ 187 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 188 | order by amtint desc,amtfloat limit 1000 189 | /*('<-')pushdown.ydb*/; 190 | 191 | 192 | /*ydb.pushdown('->')*/ 193 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 194 | ydbkv='blocksort.field:amtint' and 195 | ydbkv='blocksort.desc:true' and 196 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 197 | order by amtint desc,amtfloat limit 1000 198 | /*('<-')pushdown.ydb*/; 199 | 200 | 201 | --tdouble 202 | 203 | 204 | /*ydb.pushdown('->')*/ 205 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 206 | order by amtdouble,amtfloat limit 1000 207 | /*('<-')pushdown.ydb*/; 208 | 209 | 210 | /*ydb.pushdown('->')*/ 211 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 212 | ydbkv='blocksort.field:amtdouble' and 213 | ydbkv='blocksort.desc:false' and 214 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 215 | order by amtdouble,amtfloat limit 1000 216 | /*('<-')pushdown.ydb*/; 217 | 218 | 219 | 220 | /*ydb.pushdown('->')*/ 221 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 222 | order by amtdouble desc,amtfloat limit 1000 223 | /*('<-')pushdown.ydb*/; 224 | 225 | 226 | /*ydb.pushdown('->')*/ 227 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 228 | ydbkv='blocksort.field:amtdouble' and 229 | ydbkv='blocksort.desc:true' and 230 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 231 | order by amtdouble desc,amtfloat limit 1000 232 | /*('<-')pushdown.ydb*/; 233 | 234 | 235 | 236 | --tfloat 237 | 238 | 239 | /*ydb.pushdown('->')*/ 240 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 241 | order by amtfloat,tradetime limit 1000 242 | /*('<-')pushdown.ydb*/; 243 | 244 | 245 | /*ydb.pushdown('->')*/ 246 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 247 | ydbkv='blocksort.field:amtfloat' and 248 | ydbkv='blocksort.desc:false' and 249 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 250 | order by amtfloat,tradetime limit 1000 251 | /*('<-')pushdown.ydb*/; 252 | 253 | 254 | 255 | /*ydb.pushdown('->')*/ 256 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 257 | order by amtfloat desc,tradetime limit 1000 258 | /*('<-')pushdown.ydb*/; 259 | 260 | 261 | /*ydb.pushdown('->')*/ 262 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 263 | ydbkv='blocksort.field:amtfloat' and 264 | ydbkv='blocksort.desc:true' and 265 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 266 | order by amtfloat desc,tradetime limit 1000 267 | /*('<-')pushdown.ydb*/; 268 | 269 | 270 | 271 | 272 | /*ydb.pushdown('->')*/ 273 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 274 | order by tradetime,amtfloat limit 1000 275 | /*('<-')pushdown.ydb*/; 276 | 277 | 278 | /*ydb.pushdown('->')*/ 279 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 280 | ydbkv='blocksort.field:tradetime' and 281 | ydbkv='blocksort.desc:false' and 282 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 283 | order by tradetime,amtfloat limit 1000 284 | /*('<-')pushdown.ydb*/; 285 | 286 | 287 | 288 | /*ydb.pushdown('->')*/ 289 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 290 | order by tradetime desc,amtfloat limit 1000 291 | /*('<-')pushdown.ydb*/; 292 | 293 | 294 | /*ydb.pushdown('->')*/ 295 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 296 | ydbkv='blocksort.field:tradetime' and 297 | ydbkv='blocksort.desc:true' and 298 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 299 | order by tradetime desc,amtfloat limit 1000 300 | /*('<-')pushdown.ydb*/; 301 | 302 | 303 | --tint 304 | 305 | /*ydb.pushdown('->')*/ 306 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 307 | order by amtint,amtfloat limit 1000 308 | /*('<-')pushdown.ydb*/; 309 | 310 | 311 | /*ydb.pushdown('->')*/ 312 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 313 | ydbkv='blocksort.field:amtint' and 314 | ydbkv='blocksort.desc:false' and 315 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 316 | order by amtint,amtfloat limit 1000 317 | /*('<-')pushdown.ydb*/; 318 | 319 | 320 | 321 | /*ydb.pushdown('->')*/ 322 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 323 | order by amtint desc,amtfloat limit 1000 324 | /*('<-')pushdown.ydb*/; 325 | 326 | 327 | /*ydb.pushdown('->')*/ 328 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 329 | ydbkv='blocksort.field:amtint' and 330 | ydbkv='blocksort.desc:true' and 331 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 332 | order by amtint desc,amtfloat limit 1000 333 | /*('<-')pushdown.ydb*/; 334 | 335 | 336 | --tdouble 337 | 338 | 339 | /*ydb.pushdown('->')*/ 340 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 341 | order by amtdouble,amtfloat limit 1000 342 | /*('<-')pushdown.ydb*/; 343 | 344 | 345 | /*ydb.pushdown('->')*/ 346 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 347 | ydbkv='blocksort.field:amtdouble' and 348 | ydbkv='blocksort.desc:false' and 349 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 350 | order by amtdouble,amtfloat limit 1000 351 | /*('<-')pushdown.ydb*/; 352 | 353 | 354 | 355 | /*ydb.pushdown('->')*/ 356 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 357 | order by amtdouble desc,amtfloat limit 1000 358 | /*('<-')pushdown.ydb*/; 359 | 360 | 361 | /*ydb.pushdown('->')*/ 362 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 363 | ydbkv='blocksort.field:amtdouble' and 364 | ydbkv='blocksort.desc:true' and 365 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 366 | order by amtdouble desc,amtfloat limit 1000 367 | /*('<-')pushdown.ydb*/; 368 | 369 | 370 | 371 | --tfloat 372 | 373 | 374 | /*ydb.pushdown('->')*/ 375 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 376 | order by amtfloat,tradetime limit 1000 377 | /*('<-')pushdown.ydb*/; 378 | 379 | 380 | /*ydb.pushdown('->')*/ 381 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 382 | ydbkv='blocksort.field:amtfloat' and 383 | ydbkv='blocksort.desc:false' and 384 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 385 | order by amtfloat,tradetime limit 1000 386 | /*('<-')pushdown.ydb*/; 387 | 388 | 389 | 390 | /*ydb.pushdown('->')*/ 391 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' 392 | order by amtfloat desc,tradetime limit 1000 393 | /*('<-')pushdown.ydb*/; 394 | 395 | 396 | /*ydb.pushdown('->')*/ 397 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='50000' and 398 | ydbkv='blocksort.field:amtfloat' and 399 | ydbkv='blocksort.desc:true' and 400 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 401 | order by amtfloat desc,tradetime limit 1000 402 | /*('<-')pushdown.ydb*/; -------------------------------------------------------------------------------- /autotest/8.3.blocksort.sql: -------------------------------------------------------------------------------- 1 | 2 | /*ydb.pushdown('->')*/ 3 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 4 | order by tradetime,amtfloat limit 1000 5 | /*('<-')pushdown.ydb*/; 6 | 7 | 8 | /*ydb.pushdown('->')*/ 9 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 10 | ydbkv='blocksort.field:tradetime' and 11 | ydbkv='blocksort.desc:false' and 12 | ydbkv='blocksort.limit:1000' 13 | order by tradetime,amtfloat limit 1000 14 | /*('<-')pushdown.ydb*/; 15 | 16 | 17 | 18 | /*ydb.pushdown('->')*/ 19 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 20 | order by tradetime desc,amtfloat limit 1000 21 | /*('<-')pushdown.ydb*/; 22 | 23 | 24 | /*ydb.pushdown('->')*/ 25 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 26 | ydbkv='blocksort.field:tradetime' and 27 | ydbkv='blocksort.desc:true' and 28 | ydbkv='blocksort.limit:1000' 29 | order by tradetime desc,amtfloat limit 1000 30 | /*('<-')pushdown.ydb*/; 31 | 32 | 33 | --tint 34 | 35 | /*ydb.pushdown('->')*/ 36 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 37 | order by amtint,amtfloat limit 1000 38 | /*('<-')pushdown.ydb*/; 39 | 40 | 41 | /*ydb.pushdown('->')*/ 42 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 43 | ydbkv='blocksort.field:amtint' and 44 | ydbkv='blocksort.desc:false' and 45 | ydbkv='blocksort.limit:1000' 46 | order by amtint,amtfloat limit 1000 47 | /*('<-')pushdown.ydb*/; 48 | 49 | 50 | 51 | /*ydb.pushdown('->')*/ 52 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 53 | order by amtint desc,amtfloat limit 1000 54 | /*('<-')pushdown.ydb*/; 55 | 56 | 57 | /*ydb.pushdown('->')*/ 58 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 59 | ydbkv='blocksort.field:amtint' and 60 | ydbkv='blocksort.desc:true' and 61 | ydbkv='blocksort.limit:1000' 62 | order by amtint desc,amtfloat limit 1000 63 | /*('<-')pushdown.ydb*/; 64 | 65 | 66 | --tdouble 67 | 68 | 69 | /*ydb.pushdown('->')*/ 70 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 71 | order by amtdouble,amtfloat limit 1000 72 | /*('<-')pushdown.ydb*/; 73 | 74 | 75 | /*ydb.pushdown('->')*/ 76 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 77 | ydbkv='blocksort.field:amtdouble' and 78 | ydbkv='blocksort.desc:false' and 79 | ydbkv='blocksort.limit:1000' 80 | order by amtdouble,amtfloat limit 1000 81 | /*('<-')pushdown.ydb*/; 82 | 83 | 84 | 85 | /*ydb.pushdown('->')*/ 86 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 87 | order by amtdouble desc,amtfloat limit 1000 88 | /*('<-')pushdown.ydb*/; 89 | 90 | 91 | /*ydb.pushdown('->')*/ 92 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 93 | ydbkv='blocksort.field:amtdouble' and 94 | ydbkv='blocksort.desc:true' and 95 | ydbkv='blocksort.limit:1000' 96 | order by amtdouble desc,amtfloat limit 1000 97 | /*('<-')pushdown.ydb*/; 98 | 99 | 100 | 101 | --tfloat 102 | 103 | 104 | /*ydb.pushdown('->')*/ 105 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 106 | order by amtfloat,tradetime limit 1000 107 | /*('<-')pushdown.ydb*/; 108 | 109 | 110 | /*ydb.pushdown('->')*/ 111 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 112 | ydbkv='blocksort.field:amtfloat' and 113 | ydbkv='blocksort.desc:false' and 114 | ydbkv='blocksort.limit:1000' 115 | order by amtfloat,tradetime limit 1000 116 | /*('<-')pushdown.ydb*/; 117 | 118 | 119 | 120 | /*ydb.pushdown('->')*/ 121 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 122 | order by amtfloat desc,tradetime limit 1000 123 | /*('<-')pushdown.ydb*/; 124 | 125 | 126 | /*ydb.pushdown('->')*/ 127 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 128 | ydbkv='blocksort.field:amtfloat' and 129 | ydbkv='blocksort.desc:true' and 130 | ydbkv='blocksort.limit:1000' 131 | order by amtfloat desc,tradetime limit 1000 132 | /*('<-')pushdown.ydb*/; 133 | 134 | 135 | 136 | 137 | /*ydb.pushdown('->')*/ 138 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 139 | order by tradetime,amtfloat limit 1000 140 | /*('<-')pushdown.ydb*/; 141 | 142 | 143 | /*ydb.pushdown('->')*/ 144 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 145 | ydbkv='blocksort.field:tradetime' and 146 | ydbkv='blocksort.desc:false' and 147 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 148 | order by tradetime,amtfloat limit 1000 149 | /*('<-')pushdown.ydb*/; 150 | 151 | 152 | 153 | /*ydb.pushdown('->')*/ 154 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 155 | order by tradetime desc,amtfloat limit 1000 156 | /*('<-')pushdown.ydb*/; 157 | 158 | 159 | /*ydb.pushdown('->')*/ 160 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 161 | ydbkv='blocksort.field:tradetime' and 162 | ydbkv='blocksort.desc:true' and 163 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 164 | order by tradetime desc,amtfloat limit 1000 165 | /*('<-')pushdown.ydb*/; 166 | 167 | 168 | --tint 169 | 170 | /*ydb.pushdown('->')*/ 171 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 172 | order by amtint,amtfloat limit 1000 173 | /*('<-')pushdown.ydb*/; 174 | 175 | 176 | /*ydb.pushdown('->')*/ 177 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 178 | ydbkv='blocksort.field:amtint' and 179 | ydbkv='blocksort.desc:false' and 180 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 181 | order by amtint,amtfloat limit 1000 182 | /*('<-')pushdown.ydb*/; 183 | 184 | 185 | 186 | /*ydb.pushdown('->')*/ 187 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 188 | order by amtint desc,amtfloat limit 1000 189 | /*('<-')pushdown.ydb*/; 190 | 191 | 192 | /*ydb.pushdown('->')*/ 193 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 194 | ydbkv='blocksort.field:amtint' and 195 | ydbkv='blocksort.desc:true' and 196 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 197 | order by amtint desc,amtfloat limit 1000 198 | /*('<-')pushdown.ydb*/; 199 | 200 | 201 | --tdouble 202 | 203 | 204 | /*ydb.pushdown('->')*/ 205 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 206 | order by amtdouble,amtfloat limit 1000 207 | /*('<-')pushdown.ydb*/; 208 | 209 | 210 | /*ydb.pushdown('->')*/ 211 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 212 | ydbkv='blocksort.field:amtdouble' and 213 | ydbkv='blocksort.desc:false' and 214 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 215 | order by amtdouble,amtfloat limit 1000 216 | /*('<-')pushdown.ydb*/; 217 | 218 | 219 | 220 | /*ydb.pushdown('->')*/ 221 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 222 | order by amtdouble desc,amtfloat limit 1000 223 | /*('<-')pushdown.ydb*/; 224 | 225 | 226 | /*ydb.pushdown('->')*/ 227 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 228 | ydbkv='blocksort.field:amtdouble' and 229 | ydbkv='blocksort.desc:true' and 230 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 231 | order by amtdouble desc,amtfloat limit 1000 232 | /*('<-')pushdown.ydb*/; 233 | 234 | 235 | 236 | --tfloat 237 | 238 | 239 | /*ydb.pushdown('->')*/ 240 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 241 | order by amtfloat,tradetime limit 1000 242 | /*('<-')pushdown.ydb*/; 243 | 244 | 245 | /*ydb.pushdown('->')*/ 246 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 247 | ydbkv='blocksort.field:amtfloat' and 248 | ydbkv='blocksort.desc:false' and 249 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 250 | order by amtfloat,tradetime limit 1000 251 | /*('<-')pushdown.ydb*/; 252 | 253 | 254 | 255 | /*ydb.pushdown('->')*/ 256 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 257 | order by amtfloat desc,tradetime limit 1000 258 | /*('<-')pushdown.ydb*/; 259 | 260 | 261 | /*ydb.pushdown('->')*/ 262 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 263 | ydbkv='blocksort.field:amtfloat' and 264 | ydbkv='blocksort.desc:true' and 265 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 266 | order by amtfloat desc,tradetime limit 1000 267 | /*('<-')pushdown.ydb*/; 268 | 269 | 270 | /*ydb.pushdown('->')*/ 271 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 272 | order by tradetime,amtfloat limit 1000 273 | /*('<-')pushdown.ydb*/; 274 | 275 | 276 | /*ydb.pushdown('->')*/ 277 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 278 | ydbkv='blocksort.field:tradetime' and 279 | ydbkv='blocksort.desc:false' and 280 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 281 | order by tradetime,amtfloat limit 1000 282 | /*('<-')pushdown.ydb*/; 283 | 284 | 285 | 286 | /*ydb.pushdown('->')*/ 287 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 288 | order by tradetime desc,amtfloat limit 1000 289 | /*('<-')pushdown.ydb*/; 290 | 291 | 292 | /*ydb.pushdown('->')*/ 293 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 294 | ydbkv='blocksort.field:tradetime' and 295 | ydbkv='blocksort.desc:true' and 296 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 297 | order by tradetime desc,amtfloat limit 1000 298 | /*('<-')pushdown.ydb*/; 299 | 300 | 301 | --tint 302 | 303 | /*ydb.pushdown('->')*/ 304 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 305 | order by amtint,amtfloat limit 1000 306 | /*('<-')pushdown.ydb*/; 307 | 308 | 309 | /*ydb.pushdown('->')*/ 310 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 311 | ydbkv='blocksort.field:amtint' and 312 | ydbkv='blocksort.desc:false' and 313 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 314 | order by amtint,amtfloat limit 1000 315 | /*('<-')pushdown.ydb*/; 316 | 317 | 318 | 319 | /*ydb.pushdown('->')*/ 320 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 321 | order by amtint desc,amtfloat limit 1000 322 | /*('<-')pushdown.ydb*/; 323 | 324 | 325 | /*ydb.pushdown('->')*/ 326 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 327 | ydbkv='blocksort.field:amtint' and 328 | ydbkv='blocksort.desc:true' and 329 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 330 | order by amtint desc,amtfloat limit 1000 331 | /*('<-')pushdown.ydb*/; 332 | 333 | 334 | --tdouble 335 | 336 | 337 | /*ydb.pushdown('->')*/ 338 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 339 | order by amtdouble,amtfloat limit 1000 340 | /*('<-')pushdown.ydb*/; 341 | 342 | 343 | /*ydb.pushdown('->')*/ 344 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 345 | ydbkv='blocksort.field:amtdouble' and 346 | ydbkv='blocksort.desc:false' and 347 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 348 | order by amtdouble,amtfloat limit 1000 349 | /*('<-')pushdown.ydb*/; 350 | 351 | 352 | 353 | /*ydb.pushdown('->')*/ 354 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 355 | order by amtdouble desc,amtfloat limit 1000 356 | /*('<-')pushdown.ydb*/; 357 | 358 | 359 | /*ydb.pushdown('->')*/ 360 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 361 | ydbkv='blocksort.field:amtdouble' and 362 | ydbkv='blocksort.desc:true' and 363 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 364 | order by amtdouble desc,amtfloat limit 1000 365 | /*('<-')pushdown.ydb*/; 366 | 367 | 368 | 369 | --tfloat 370 | 371 | 372 | /*ydb.pushdown('->')*/ 373 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 374 | order by amtfloat,tradetime limit 1000 375 | /*('<-')pushdown.ydb*/; 376 | 377 | 378 | /*ydb.pushdown('->')*/ 379 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 380 | ydbkv='blocksort.field:amtfloat' and 381 | ydbkv='blocksort.desc:false' and 382 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 383 | order by amtfloat,tradetime limit 1000 384 | /*('<-')pushdown.ydb*/; 385 | 386 | 387 | 388 | /*ydb.pushdown('->')*/ 389 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' 390 | order by amtfloat desc,tradetime limit 1000 391 | /*('<-')pushdown.ydb*/; 392 | 393 | 394 | /*ydb.pushdown('->')*/ 395 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30000' and amtfloat<='90000' and 396 | ydbkv='blocksort.field:amtfloat' and 397 | ydbkv='blocksort.desc:true' and 398 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 399 | order by amtfloat desc,tradetime limit 1000 400 | /*('<-')pushdown.ydb*/; -------------------------------------------------------------------------------- /autotest/8.4.blocksort.sql: -------------------------------------------------------------------------------- 1 | 2 | /*ydb.pushdown('->')*/ 3 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 4 | order by tradetime,amtfloat limit 1000 5 | /*('<-')pushdown.ydb*/; 6 | 7 | 8 | /*ydb.pushdown('->')*/ 9 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 10 | ydbkv='blocksort.field:tradetime' and 11 | ydbkv='blocksort.desc:false' and 12 | ydbkv='blocksort.limit:1000' 13 | order by tradetime,amtfloat limit 1000 14 | /*('<-')pushdown.ydb*/; 15 | 16 | 17 | 18 | /*ydb.pushdown('->')*/ 19 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 20 | order by tradetime desc,amtfloat limit 1000 21 | /*('<-')pushdown.ydb*/; 22 | 23 | 24 | /*ydb.pushdown('->')*/ 25 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 26 | ydbkv='blocksort.field:tradetime' and 27 | ydbkv='blocksort.desc:true' and 28 | ydbkv='blocksort.limit:1000' 29 | order by tradetime desc,amtfloat limit 1000 30 | /*('<-')pushdown.ydb*/; 31 | 32 | 33 | --tint 34 | 35 | /*ydb.pushdown('->')*/ 36 | select amtint, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 37 | order by amtint,amtfloat limit 1000 38 | /*('<-')pushdown.ydb*/; 39 | 40 | 41 | /*ydb.pushdown('->')*/ 42 | select amtint, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 43 | ydbkv='blocksort.field:amtint' and 44 | ydbkv='blocksort.desc:false' and 45 | ydbkv='blocksort.limit:1000' 46 | order by amtint,amtfloat limit 1000 47 | /*('<-')pushdown.ydb*/; 48 | 49 | 50 | 51 | /*ydb.pushdown('->')*/ 52 | select amtint, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 53 | order by amtint desc,amtfloat limit 1000 54 | /*('<-')pushdown.ydb*/; 55 | 56 | 57 | /*ydb.pushdown('->')*/ 58 | select amtint, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 59 | ydbkv='blocksort.field:amtint' and 60 | ydbkv='blocksort.desc:true' and 61 | ydbkv='blocksort.limit:1000' 62 | order by amtint desc,amtfloat limit 1000 63 | /*('<-')pushdown.ydb*/; 64 | 65 | 66 | --tdouble 67 | 68 | 69 | /*ydb.pushdown('->')*/ 70 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 71 | order by amtdouble,amtfloat limit 1000 72 | /*('<-')pushdown.ydb*/; 73 | 74 | 75 | /*ydb.pushdown('->')*/ 76 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 77 | ydbkv='blocksort.field:amtdouble' and 78 | ydbkv='blocksort.desc:false' and 79 | ydbkv='blocksort.limit:1000' 80 | order by amtdouble,amtfloat limit 1000 81 | /*('<-')pushdown.ydb*/; 82 | 83 | 84 | 85 | /*ydb.pushdown('->')*/ 86 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 87 | order by amtdouble desc,amtfloat limit 1000 88 | /*('<-')pushdown.ydb*/; 89 | 90 | 91 | /*ydb.pushdown('->')*/ 92 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 93 | ydbkv='blocksort.field:amtdouble' and 94 | ydbkv='blocksort.desc:true' and 95 | ydbkv='blocksort.limit:1000' 96 | order by amtdouble desc,amtfloat limit 1000 97 | /*('<-')pushdown.ydb*/; 98 | 99 | 100 | 101 | --tfloat 102 | 103 | 104 | /*ydb.pushdown('->')*/ 105 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 106 | order by amtfloat,tradetime limit 1000 107 | /*('<-')pushdown.ydb*/; 108 | 109 | 110 | /*ydb.pushdown('->')*/ 111 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 112 | ydbkv='blocksort.field:amtfloat' and 113 | ydbkv='blocksort.desc:false' and 114 | ydbkv='blocksort.limit:1000' 115 | order by amtfloat,tradetime limit 1000 116 | /*('<-')pushdown.ydb*/; 117 | 118 | 119 | 120 | /*ydb.pushdown('->')*/ 121 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 122 | order by amtfloat desc,tradetime limit 1000 123 | /*('<-')pushdown.ydb*/; 124 | 125 | 126 | /*ydb.pushdown('->')*/ 127 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 128 | ydbkv='blocksort.field:amtfloat' and 129 | ydbkv='blocksort.desc:true' and 130 | ydbkv='blocksort.limit:1000' 131 | order by amtfloat desc,tradetime limit 1000 132 | /*('<-')pushdown.ydb*/; 133 | 134 | 135 | 136 | /*ydb.pushdown('->')*/ 137 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 138 | order by tradetime,amtfloat limit 1000 139 | /*('<-')pushdown.ydb*/; 140 | 141 | 142 | /*ydb.pushdown('->')*/ 143 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 144 | ydbkv='blocksort.field:tradetime' and 145 | ydbkv='blocksort.desc:false' and 146 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 147 | order by tradetime,amtfloat limit 1000 148 | /*('<-')pushdown.ydb*/; 149 | 150 | 151 | 152 | /*ydb.pushdown('->')*/ 153 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 154 | order by tradetime desc,amtfloat limit 1000 155 | /*('<-')pushdown.ydb*/; 156 | 157 | 158 | /*ydb.pushdown('->')*/ 159 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 160 | ydbkv='blocksort.field:tradetime' and 161 | ydbkv='blocksort.desc:true' and 162 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 163 | order by tradetime desc,amtfloat limit 1000 164 | /*('<-')pushdown.ydb*/; 165 | 166 | 167 | --tint 168 | 169 | /*ydb.pushdown('->')*/ 170 | select amtint, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 171 | order by amtint,amtfloat limit 1000 172 | /*('<-')pushdown.ydb*/; 173 | 174 | 175 | /*ydb.pushdown('->')*/ 176 | select amtint, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 177 | ydbkv='blocksort.field:amtint' and 178 | ydbkv='blocksort.desc:false' and 179 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 180 | order by amtint,amtfloat limit 1000 181 | /*('<-')pushdown.ydb*/; 182 | 183 | 184 | 185 | /*ydb.pushdown('->')*/ 186 | select amtint, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 187 | order by amtint desc,amtfloat limit 1000 188 | /*('<-')pushdown.ydb*/; 189 | 190 | 191 | /*ydb.pushdown('->')*/ 192 | select amtint, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 193 | ydbkv='blocksort.field:amtint' and 194 | ydbkv='blocksort.desc:true' and 195 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 196 | order by amtint desc,amtfloat limit 1000 197 | /*('<-')pushdown.ydb*/; 198 | 199 | 200 | --tdouble 201 | 202 | 203 | /*ydb.pushdown('->')*/ 204 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 205 | order by amtdouble,amtfloat limit 1000 206 | /*('<-')pushdown.ydb*/; 207 | 208 | 209 | /*ydb.pushdown('->')*/ 210 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 211 | ydbkv='blocksort.field:amtdouble' and 212 | ydbkv='blocksort.desc:false' and 213 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 214 | order by amtdouble,amtfloat limit 1000 215 | /*('<-')pushdown.ydb*/; 216 | 217 | 218 | 219 | /*ydb.pushdown('->')*/ 220 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 221 | order by amtdouble desc,amtfloat limit 1000 222 | /*('<-')pushdown.ydb*/; 223 | 224 | 225 | /*ydb.pushdown('->')*/ 226 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 227 | ydbkv='blocksort.field:amtdouble' and 228 | ydbkv='blocksort.desc:true' and 229 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 230 | order by amtdouble desc,amtfloat limit 1000 231 | /*('<-')pushdown.ydb*/; 232 | 233 | 234 | 235 | --tfloat 236 | 237 | 238 | /*ydb.pushdown('->')*/ 239 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 240 | order by amtfloat,tradetime limit 1000 241 | /*('<-')pushdown.ydb*/; 242 | 243 | 244 | /*ydb.pushdown('->')*/ 245 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 246 | ydbkv='blocksort.field:amtfloat' and 247 | ydbkv='blocksort.desc:false' and 248 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 249 | order by amtfloat,tradetime limit 1000 250 | /*('<-')pushdown.ydb*/; 251 | 252 | 253 | 254 | /*ydb.pushdown('->')*/ 255 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 256 | order by amtfloat desc,tradetime limit 1000 257 | /*('<-')pushdown.ydb*/; 258 | 259 | 260 | /*ydb.pushdown('->')*/ 261 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 262 | ydbkv='blocksort.field:amtfloat' and 263 | ydbkv='blocksort.desc:true' and 264 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 265 | order by amtfloat desc,tradetime limit 1000 266 | /*('<-')pushdown.ydb*/; 267 | 268 | 269 | 270 | /*ydb.pushdown('->')*/ 271 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 272 | order by tradetime,amtfloat limit 1000 273 | /*('<-')pushdown.ydb*/; 274 | 275 | 276 | /*ydb.pushdown('->')*/ 277 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 278 | ydbkv='blocksort.field:tradetime' and 279 | ydbkv='blocksort.desc:false' and 280 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 281 | order by tradetime,amtfloat limit 1000 282 | /*('<-')pushdown.ydb*/; 283 | 284 | 285 | 286 | /*ydb.pushdown('->')*/ 287 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 288 | order by tradetime desc,amtfloat limit 1000 289 | /*('<-')pushdown.ydb*/; 290 | 291 | 292 | /*ydb.pushdown('->')*/ 293 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 294 | ydbkv='blocksort.field:tradetime' and 295 | ydbkv='blocksort.desc:true' and 296 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 297 | order by tradetime desc,amtfloat limit 1000 298 | /*('<-')pushdown.ydb*/; 299 | 300 | 301 | --tint 302 | 303 | /*ydb.pushdown('->')*/ 304 | select amtint, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 305 | order by amtint,amtfloat limit 1000 306 | /*('<-')pushdown.ydb*/; 307 | 308 | 309 | /*ydb.pushdown('->')*/ 310 | select amtint, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 311 | ydbkv='blocksort.field:amtint' and 312 | ydbkv='blocksort.desc:false' and 313 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 314 | order by amtint,amtfloat limit 1000 315 | /*('<-')pushdown.ydb*/; 316 | 317 | 318 | 319 | /*ydb.pushdown('->')*/ 320 | select amtint, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 321 | order by amtint desc,amtfloat limit 1000 322 | /*('<-')pushdown.ydb*/; 323 | 324 | 325 | /*ydb.pushdown('->')*/ 326 | select amtint, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 327 | ydbkv='blocksort.field:amtint' and 328 | ydbkv='blocksort.desc:true' and 329 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 330 | order by amtint desc,amtfloat limit 1000 331 | /*('<-')pushdown.ydb*/; 332 | 333 | 334 | --tdouble 335 | 336 | 337 | /*ydb.pushdown('->')*/ 338 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 339 | order by amtdouble,amtfloat limit 1000 340 | /*('<-')pushdown.ydb*/; 341 | 342 | 343 | /*ydb.pushdown('->')*/ 344 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 345 | ydbkv='blocksort.field:amtdouble' and 346 | ydbkv='blocksort.desc:false' and 347 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 348 | order by amtdouble,amtfloat limit 1000 349 | /*('<-')pushdown.ydb*/; 350 | 351 | 352 | 353 | /*ydb.pushdown('->')*/ 354 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 355 | order by amtdouble desc,amtfloat limit 1000 356 | /*('<-')pushdown.ydb*/; 357 | 358 | 359 | /*ydb.pushdown('->')*/ 360 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 361 | ydbkv='blocksort.field:amtdouble' and 362 | ydbkv='blocksort.desc:true' and 363 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 364 | order by amtdouble desc,amtfloat limit 1000 365 | /*('<-')pushdown.ydb*/; 366 | 367 | 368 | 369 | --tfloat 370 | 371 | 372 | /*ydb.pushdown('->')*/ 373 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 374 | order by amtfloat,tradetime limit 1000 375 | /*('<-')pushdown.ydb*/; 376 | 377 | 378 | /*ydb.pushdown('->')*/ 379 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 380 | ydbkv='blocksort.field:amtfloat' and 381 | ydbkv='blocksort.desc:false' and 382 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 383 | order by amtfloat,tradetime limit 1000 384 | /*('<-')pushdown.ydb*/; 385 | 386 | 387 | 388 | /*ydb.pushdown('->')*/ 389 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='300' and amtfloat<='900' 390 | order by amtfloat desc,tradetime limit 1000 391 | /*('<-')pushdown.ydb*/; 392 | 393 | 394 | /*ydb.pushdown('->')*/ 395 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='300' and amtfloat<='900' and 396 | ydbkv='blocksort.field:amtfloat' and 397 | ydbkv='blocksort.desc:true' and 398 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 399 | order by amtfloat desc,tradetime limit 1000 400 | /*('<-')pushdown.ydb*/; 401 | -------------------------------------------------------------------------------- /autotest/8.5.blocksort.sql: -------------------------------------------------------------------------------- 1 | 2 | /*ydb.pushdown('->')*/ 3 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 4 | order by tradetime,amtfloat limit 1000 5 | /*('<-')pushdown.ydb*/; 6 | 7 | 8 | /*ydb.pushdown('->')*/ 9 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 10 | ydbkv='blocksort.field:tradetime' and 11 | ydbkv='blocksort.desc:false' and 12 | ydbkv='blocksort.limit:1000' 13 | order by tradetime,amtfloat limit 1000 14 | /*('<-')pushdown.ydb*/; 15 | 16 | 17 | 18 | /*ydb.pushdown('->')*/ 19 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 20 | order by tradetime desc,amtfloat limit 1000 21 | /*('<-')pushdown.ydb*/; 22 | 23 | 24 | /*ydb.pushdown('->')*/ 25 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 26 | ydbkv='blocksort.field:tradetime' and 27 | ydbkv='blocksort.desc:true' and 28 | ydbkv='blocksort.limit:1000' 29 | order by tradetime desc,amtfloat limit 1000 30 | /*('<-')pushdown.ydb*/; 31 | 32 | 33 | --tint 34 | 35 | /*ydb.pushdown('->')*/ 36 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 37 | order by amtint,amtfloat limit 1000 38 | /*('<-')pushdown.ydb*/; 39 | 40 | 41 | /*ydb.pushdown('->')*/ 42 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 43 | ydbkv='blocksort.field:amtint' and 44 | ydbkv='blocksort.desc:false' and 45 | ydbkv='blocksort.limit:1000' 46 | order by amtint,amtfloat limit 1000 47 | /*('<-')pushdown.ydb*/; 48 | 49 | 50 | 51 | /*ydb.pushdown('->')*/ 52 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 53 | order by amtint desc,amtfloat limit 1000 54 | /*('<-')pushdown.ydb*/; 55 | 56 | 57 | /*ydb.pushdown('->')*/ 58 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 59 | ydbkv='blocksort.field:amtint' and 60 | ydbkv='blocksort.desc:true' and 61 | ydbkv='blocksort.limit:1000' 62 | order by amtint desc,amtfloat limit 1000 63 | /*('<-')pushdown.ydb*/; 64 | 65 | 66 | --tdouble 67 | 68 | 69 | /*ydb.pushdown('->')*/ 70 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 71 | order by amtdouble,amtfloat limit 1000 72 | /*('<-')pushdown.ydb*/; 73 | 74 | 75 | /*ydb.pushdown('->')*/ 76 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 77 | ydbkv='blocksort.field:amtdouble' and 78 | ydbkv='blocksort.desc:false' and 79 | ydbkv='blocksort.limit:1000' 80 | order by amtdouble,amtfloat limit 1000 81 | /*('<-')pushdown.ydb*/; 82 | 83 | 84 | 85 | /*ydb.pushdown('->')*/ 86 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 87 | order by amtdouble desc,amtfloat limit 1000 88 | /*('<-')pushdown.ydb*/; 89 | 90 | 91 | /*ydb.pushdown('->')*/ 92 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 93 | ydbkv='blocksort.field:amtdouble' and 94 | ydbkv='blocksort.desc:true' and 95 | ydbkv='blocksort.limit:1000' 96 | order by amtdouble desc,amtfloat limit 1000 97 | /*('<-')pushdown.ydb*/; 98 | 99 | 100 | 101 | --tfloat 102 | 103 | 104 | /*ydb.pushdown('->')*/ 105 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 106 | order by amtfloat,tradetime limit 1000 107 | /*('<-')pushdown.ydb*/; 108 | 109 | 110 | /*ydb.pushdown('->')*/ 111 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 112 | ydbkv='blocksort.field:amtfloat' and 113 | ydbkv='blocksort.desc:false' and 114 | ydbkv='blocksort.limit:1000' 115 | order by amtfloat,tradetime limit 1000 116 | /*('<-')pushdown.ydb*/; 117 | 118 | 119 | 120 | /*ydb.pushdown('->')*/ 121 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 122 | order by amtfloat desc,tradetime limit 1000 123 | /*('<-')pushdown.ydb*/; 124 | 125 | 126 | /*ydb.pushdown('->')*/ 127 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 128 | ydbkv='blocksort.field:amtfloat' and 129 | ydbkv='blocksort.desc:true' and 130 | ydbkv='blocksort.limit:1000' 131 | order by amtfloat desc,tradetime limit 1000 132 | /*('<-')pushdown.ydb*/; 133 | 134 | 135 | 136 | /*ydb.pushdown('->')*/ 137 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 138 | order by tradetime,amtfloat limit 1000 139 | /*('<-')pushdown.ydb*/; 140 | 141 | 142 | /*ydb.pushdown('->')*/ 143 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 144 | ydbkv='blocksort.field:tradetime' and 145 | ydbkv='blocksort.desc:false' and 146 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 147 | order by tradetime,amtfloat limit 1000 148 | /*('<-')pushdown.ydb*/; 149 | 150 | 151 | 152 | /*ydb.pushdown('->')*/ 153 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 154 | order by tradetime desc,amtfloat limit 1000 155 | /*('<-')pushdown.ydb*/; 156 | 157 | 158 | /*ydb.pushdown('->')*/ 159 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 160 | ydbkv='blocksort.field:tradetime' and 161 | ydbkv='blocksort.desc:true' and 162 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 163 | order by tradetime desc,amtfloat limit 1000 164 | /*('<-')pushdown.ydb*/; 165 | 166 | 167 | --tint 168 | 169 | /*ydb.pushdown('->')*/ 170 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 171 | order by amtint,amtfloat limit 1000 172 | /*('<-')pushdown.ydb*/; 173 | 174 | 175 | /*ydb.pushdown('->')*/ 176 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 177 | ydbkv='blocksort.field:amtint' and 178 | ydbkv='blocksort.desc:false' and 179 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 180 | order by amtint,amtfloat limit 1000 181 | /*('<-')pushdown.ydb*/; 182 | 183 | 184 | 185 | /*ydb.pushdown('->')*/ 186 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 187 | order by amtint desc,amtfloat limit 1000 188 | /*('<-')pushdown.ydb*/; 189 | 190 | 191 | /*ydb.pushdown('->')*/ 192 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 193 | ydbkv='blocksort.field:amtint' and 194 | ydbkv='blocksort.desc:true' and 195 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 196 | order by amtint desc,amtfloat limit 1000 197 | /*('<-')pushdown.ydb*/; 198 | 199 | 200 | --tdouble 201 | 202 | 203 | /*ydb.pushdown('->')*/ 204 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 205 | order by amtdouble,amtfloat limit 1000 206 | /*('<-')pushdown.ydb*/; 207 | 208 | 209 | /*ydb.pushdown('->')*/ 210 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 211 | ydbkv='blocksort.field:amtdouble' and 212 | ydbkv='blocksort.desc:false' and 213 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 214 | order by amtdouble,amtfloat limit 1000 215 | /*('<-')pushdown.ydb*/; 216 | 217 | 218 | 219 | /*ydb.pushdown('->')*/ 220 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 221 | order by amtdouble desc,amtfloat limit 1000 222 | /*('<-')pushdown.ydb*/; 223 | 224 | 225 | /*ydb.pushdown('->')*/ 226 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 227 | ydbkv='blocksort.field:amtdouble' and 228 | ydbkv='blocksort.desc:true' and 229 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 230 | order by amtdouble desc,amtfloat limit 1000 231 | /*('<-')pushdown.ydb*/; 232 | 233 | 234 | 235 | --tfloat 236 | 237 | 238 | /*ydb.pushdown('->')*/ 239 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 240 | order by amtfloat,tradetime limit 1000 241 | /*('<-')pushdown.ydb*/; 242 | 243 | 244 | /*ydb.pushdown('->')*/ 245 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 246 | ydbkv='blocksort.field:amtfloat' and 247 | ydbkv='blocksort.desc:false' and 248 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 249 | order by amtfloat,tradetime limit 1000 250 | /*('<-')pushdown.ydb*/; 251 | 252 | 253 | 254 | /*ydb.pushdown('->')*/ 255 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 256 | order by amtfloat desc,tradetime limit 1000 257 | /*('<-')pushdown.ydb*/; 258 | 259 | 260 | /*ydb.pushdown('->')*/ 261 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 262 | ydbkv='blocksort.field:amtfloat' and 263 | ydbkv='blocksort.desc:true' and 264 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 265 | order by amtfloat desc,tradetime limit 1000 266 | /*('<-')pushdown.ydb*/; 267 | 268 | 269 | 270 | /*ydb.pushdown('->')*/ 271 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 272 | order by tradetime,amtfloat limit 1000 273 | /*('<-')pushdown.ydb*/; 274 | 275 | 276 | /*ydb.pushdown('->')*/ 277 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 278 | ydbkv='blocksort.field:tradetime' and 279 | ydbkv='blocksort.desc:false' and 280 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 281 | order by tradetime,amtfloat limit 1000 282 | /*('<-')pushdown.ydb*/; 283 | 284 | 285 | 286 | /*ydb.pushdown('->')*/ 287 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 288 | order by tradetime desc,amtfloat limit 1000 289 | /*('<-')pushdown.ydb*/; 290 | 291 | 292 | /*ydb.pushdown('->')*/ 293 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 294 | ydbkv='blocksort.field:tradetime' and 295 | ydbkv='blocksort.desc:true' and 296 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 297 | order by tradetime desc,amtfloat limit 1000 298 | /*('<-')pushdown.ydb*/; 299 | 300 | 301 | --tint 302 | 303 | /*ydb.pushdown('->')*/ 304 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 305 | order by amtint,amtfloat limit 1000 306 | /*('<-')pushdown.ydb*/; 307 | 308 | 309 | /*ydb.pushdown('->')*/ 310 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 311 | ydbkv='blocksort.field:amtint' and 312 | ydbkv='blocksort.desc:false' and 313 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 314 | order by amtint,amtfloat limit 1000 315 | /*('<-')pushdown.ydb*/; 316 | 317 | 318 | 319 | /*ydb.pushdown('->')*/ 320 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 321 | order by amtint desc,amtfloat limit 1000 322 | /*('<-')pushdown.ydb*/; 323 | 324 | 325 | /*ydb.pushdown('->')*/ 326 | select amtint, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 327 | ydbkv='blocksort.field:amtint' and 328 | ydbkv='blocksort.desc:true' and 329 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 330 | order by amtint desc,amtfloat limit 1000 331 | /*('<-')pushdown.ydb*/; 332 | 333 | 334 | --tdouble 335 | 336 | 337 | /*ydb.pushdown('->')*/ 338 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 339 | order by amtdouble,amtfloat limit 1000 340 | /*('<-')pushdown.ydb*/; 341 | 342 | 343 | /*ydb.pushdown('->')*/ 344 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 345 | ydbkv='blocksort.field:amtdouble' and 346 | ydbkv='blocksort.desc:false' and 347 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 348 | order by amtdouble,amtfloat limit 1000 349 | /*('<-')pushdown.ydb*/; 350 | 351 | 352 | 353 | /*ydb.pushdown('->')*/ 354 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 355 | order by amtdouble desc,amtfloat limit 1000 356 | /*('<-')pushdown.ydb*/; 357 | 358 | 359 | /*ydb.pushdown('->')*/ 360 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 361 | ydbkv='blocksort.field:amtdouble' and 362 | ydbkv='blocksort.desc:true' and 363 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 364 | order by amtdouble desc,amtfloat limit 1000 365 | /*('<-')pushdown.ydb*/; 366 | 367 | 368 | 369 | --tfloat 370 | 371 | 372 | /*ydb.pushdown('->')*/ 373 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 374 | order by amtfloat,tradetime limit 1000 375 | /*('<-')pushdown.ydb*/; 376 | 377 | 378 | /*ydb.pushdown('->')*/ 379 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 380 | ydbkv='blocksort.field:amtfloat' and 381 | ydbkv='blocksort.desc:false' and 382 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 383 | order by amtfloat,tradetime limit 1000 384 | /*('<-')pushdown.ydb*/; 385 | 386 | 387 | 388 | /*ydb.pushdown('->')*/ 389 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30' and amtfloat<='90' 390 | order by amtfloat desc,tradetime limit 1000 391 | /*('<-')pushdown.ydb*/; 392 | 393 | 394 | /*ydb.pushdown('->')*/ 395 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='30' and amtfloat<='90' and 396 | ydbkv='blocksort.field:amtfloat' and 397 | ydbkv='blocksort.desc:true' and 398 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 399 | order by amtfloat desc,tradetime limit 1000 400 | /*('<-')pushdown.ydb*/; -------------------------------------------------------------------------------- /autotest/8.6.blocksort.sql: -------------------------------------------------------------------------------- 1 | 2 | /*ydb.pushdown('->')*/ 3 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 4 | order by tradetime,amtfloat limit 1000 5 | /*('<-')pushdown.ydb*/; 6 | 7 | 8 | /*ydb.pushdown('->')*/ 9 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 10 | ydbkv='blocksort.field:tradetime' and 11 | ydbkv='blocksort.desc:false' and 12 | ydbkv='blocksort.limit:1000' 13 | order by tradetime,amtfloat limit 1000 14 | /*('<-')pushdown.ydb*/; 15 | 16 | 17 | 18 | /*ydb.pushdown('->')*/ 19 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 20 | order by tradetime desc,amtfloat limit 1000 21 | /*('<-')pushdown.ydb*/; 22 | 23 | 24 | /*ydb.pushdown('->')*/ 25 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 26 | ydbkv='blocksort.field:tradetime' and 27 | ydbkv='blocksort.desc:true' and 28 | ydbkv='blocksort.limit:1000' 29 | order by tradetime desc,amtfloat limit 1000 30 | /*('<-')pushdown.ydb*/; 31 | 32 | 33 | --tint 34 | 35 | /*ydb.pushdown('->')*/ 36 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 37 | order by amtint,amtfloat limit 1000 38 | /*('<-')pushdown.ydb*/; 39 | 40 | 41 | /*ydb.pushdown('->')*/ 42 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 43 | ydbkv='blocksort.field:amtint' and 44 | ydbkv='blocksort.desc:false' and 45 | ydbkv='blocksort.limit:1000' 46 | order by amtint,amtfloat limit 1000 47 | /*('<-')pushdown.ydb*/; 48 | 49 | 50 | 51 | /*ydb.pushdown('->')*/ 52 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 53 | order by amtint desc,amtfloat limit 1000 54 | /*('<-')pushdown.ydb*/; 55 | 56 | 57 | /*ydb.pushdown('->')*/ 58 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 59 | ydbkv='blocksort.field:amtint' and 60 | ydbkv='blocksort.desc:true' and 61 | ydbkv='blocksort.limit:1000' 62 | order by amtint desc,amtfloat limit 1000 63 | /*('<-')pushdown.ydb*/; 64 | 65 | 66 | --tdouble 67 | 68 | 69 | /*ydb.pushdown('->')*/ 70 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 71 | order by amtdouble,amtfloat limit 1000 72 | /*('<-')pushdown.ydb*/; 73 | 74 | 75 | /*ydb.pushdown('->')*/ 76 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 77 | ydbkv='blocksort.field:amtdouble' and 78 | ydbkv='blocksort.desc:false' and 79 | ydbkv='blocksort.limit:1000' 80 | order by amtdouble,amtfloat limit 1000 81 | /*('<-')pushdown.ydb*/; 82 | 83 | 84 | 85 | /*ydb.pushdown('->')*/ 86 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 87 | order by amtdouble desc,amtfloat limit 1000 88 | /*('<-')pushdown.ydb*/; 89 | 90 | 91 | /*ydb.pushdown('->')*/ 92 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 93 | ydbkv='blocksort.field:amtdouble' and 94 | ydbkv='blocksort.desc:true' and 95 | ydbkv='blocksort.limit:1000' 96 | order by amtdouble desc,amtfloat limit 1000 97 | /*('<-')pushdown.ydb*/; 98 | 99 | 100 | 101 | --tfloat 102 | 103 | 104 | /*ydb.pushdown('->')*/ 105 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 106 | order by amtfloat,tradetime limit 1000 107 | /*('<-')pushdown.ydb*/; 108 | 109 | 110 | /*ydb.pushdown('->')*/ 111 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 112 | ydbkv='blocksort.field:amtfloat' and 113 | ydbkv='blocksort.desc:false' and 114 | ydbkv='blocksort.limit:1000' 115 | order by amtfloat,tradetime limit 1000 116 | /*('<-')pushdown.ydb*/; 117 | 118 | 119 | 120 | /*ydb.pushdown('->')*/ 121 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 122 | order by amtfloat desc,tradetime limit 1000 123 | /*('<-')pushdown.ydb*/; 124 | 125 | 126 | /*ydb.pushdown('->')*/ 127 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 128 | ydbkv='blocksort.field:amtfloat' and 129 | ydbkv='blocksort.desc:true' and 130 | ydbkv='blocksort.limit:1000' 131 | order by amtfloat desc,tradetime limit 1000 132 | /*('<-')pushdown.ydb*/; 133 | 134 | 135 | 136 | /*ydb.pushdown('->')*/ 137 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 138 | order by tradetime,amtfloat limit 1000 139 | /*('<-')pushdown.ydb*/; 140 | 141 | 142 | /*ydb.pushdown('->')*/ 143 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 144 | ydbkv='blocksort.field:tradetime' and 145 | ydbkv='blocksort.desc:false' and 146 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 147 | order by tradetime,amtfloat limit 1000 148 | /*('<-')pushdown.ydb*/; 149 | 150 | 151 | 152 | /*ydb.pushdown('->')*/ 153 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 154 | order by tradetime desc,amtfloat limit 1000 155 | /*('<-')pushdown.ydb*/; 156 | 157 | 158 | /*ydb.pushdown('->')*/ 159 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 160 | ydbkv='blocksort.field:tradetime' and 161 | ydbkv='blocksort.desc:true' and 162 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 163 | order by tradetime desc,amtfloat limit 1000 164 | /*('<-')pushdown.ydb*/; 165 | 166 | 167 | --tint 168 | 169 | /*ydb.pushdown('->')*/ 170 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 171 | order by amtint,amtfloat limit 1000 172 | /*('<-')pushdown.ydb*/; 173 | 174 | 175 | /*ydb.pushdown('->')*/ 176 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 177 | ydbkv='blocksort.field:amtint' and 178 | ydbkv='blocksort.desc:false' and 179 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 180 | order by amtint,amtfloat limit 1000 181 | /*('<-')pushdown.ydb*/; 182 | 183 | 184 | 185 | /*ydb.pushdown('->')*/ 186 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 187 | order by amtint desc,amtfloat limit 1000 188 | /*('<-')pushdown.ydb*/; 189 | 190 | 191 | /*ydb.pushdown('->')*/ 192 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 193 | ydbkv='blocksort.field:amtint' and 194 | ydbkv='blocksort.desc:true' and 195 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 196 | order by amtint desc,amtfloat limit 1000 197 | /*('<-')pushdown.ydb*/; 198 | 199 | 200 | --tdouble 201 | 202 | 203 | /*ydb.pushdown('->')*/ 204 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 205 | order by amtdouble,amtfloat limit 1000 206 | /*('<-')pushdown.ydb*/; 207 | 208 | 209 | /*ydb.pushdown('->')*/ 210 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 211 | ydbkv='blocksort.field:amtdouble' and 212 | ydbkv='blocksort.desc:false' and 213 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 214 | order by amtdouble,amtfloat limit 1000 215 | /*('<-')pushdown.ydb*/; 216 | 217 | 218 | 219 | /*ydb.pushdown('->')*/ 220 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 221 | order by amtdouble desc,amtfloat limit 1000 222 | /*('<-')pushdown.ydb*/; 223 | 224 | 225 | /*ydb.pushdown('->')*/ 226 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 227 | ydbkv='blocksort.field:amtdouble' and 228 | ydbkv='blocksort.desc:true' and 229 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 230 | order by amtdouble desc,amtfloat limit 1000 231 | /*('<-')pushdown.ydb*/; 232 | 233 | 234 | 235 | --tfloat 236 | 237 | 238 | /*ydb.pushdown('->')*/ 239 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 240 | order by amtfloat,tradetime limit 1000 241 | /*('<-')pushdown.ydb*/; 242 | 243 | 244 | /*ydb.pushdown('->')*/ 245 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 246 | ydbkv='blocksort.field:amtfloat' and 247 | ydbkv='blocksort.desc:false' and 248 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 249 | order by amtfloat,tradetime limit 1000 250 | /*('<-')pushdown.ydb*/; 251 | 252 | 253 | 254 | /*ydb.pushdown('->')*/ 255 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 256 | order by amtfloat desc,tradetime limit 1000 257 | /*('<-')pushdown.ydb*/; 258 | 259 | 260 | /*ydb.pushdown('->')*/ 261 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 262 | ydbkv='blocksort.field:amtfloat' and 263 | ydbkv='blocksort.desc:true' and 264 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 265 | order by amtfloat desc,tradetime limit 1000 266 | /*('<-')pushdown.ydb*/; 267 | 268 | 269 | 270 | /*ydb.pushdown('->')*/ 271 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 272 | order by tradetime,amtfloat limit 1000 273 | /*('<-')pushdown.ydb*/; 274 | 275 | 276 | /*ydb.pushdown('->')*/ 277 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 278 | ydbkv='blocksort.field:tradetime' and 279 | ydbkv='blocksort.desc:false' and 280 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 281 | order by tradetime,amtfloat limit 1000 282 | /*('<-')pushdown.ydb*/; 283 | 284 | 285 | 286 | /*ydb.pushdown('->')*/ 287 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 288 | order by tradetime desc,amtfloat limit 1000 289 | /*('<-')pushdown.ydb*/; 290 | 291 | 292 | /*ydb.pushdown('->')*/ 293 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 294 | ydbkv='blocksort.field:tradetime' and 295 | ydbkv='blocksort.desc:true' and 296 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 297 | order by tradetime desc,amtfloat limit 1000 298 | /*('<-')pushdown.ydb*/; 299 | 300 | 301 | --tint 302 | 303 | /*ydb.pushdown('->')*/ 304 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 305 | order by amtint,amtfloat limit 1000 306 | /*('<-')pushdown.ydb*/; 307 | 308 | 309 | /*ydb.pushdown('->')*/ 310 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 311 | ydbkv='blocksort.field:amtint' and 312 | ydbkv='blocksort.desc:false' and 313 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 314 | order by amtint,amtfloat limit 1000 315 | /*('<-')pushdown.ydb*/; 316 | 317 | 318 | 319 | /*ydb.pushdown('->')*/ 320 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 321 | order by amtint desc,amtfloat limit 1000 322 | /*('<-')pushdown.ydb*/; 323 | 324 | 325 | /*ydb.pushdown('->')*/ 326 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 327 | ydbkv='blocksort.field:amtint' and 328 | ydbkv='blocksort.desc:true' and 329 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 330 | order by amtint desc,amtfloat limit 1000 331 | /*('<-')pushdown.ydb*/; 332 | 333 | 334 | --tdouble 335 | 336 | 337 | /*ydb.pushdown('->')*/ 338 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 339 | order by amtdouble,amtfloat limit 1000 340 | /*('<-')pushdown.ydb*/; 341 | 342 | 343 | /*ydb.pushdown('->')*/ 344 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 345 | ydbkv='blocksort.field:amtdouble' and 346 | ydbkv='blocksort.desc:false' and 347 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 348 | order by amtdouble,amtfloat limit 1000 349 | /*('<-')pushdown.ydb*/; 350 | 351 | 352 | 353 | /*ydb.pushdown('->')*/ 354 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 355 | order by amtdouble desc,amtfloat limit 1000 356 | /*('<-')pushdown.ydb*/; 357 | 358 | 359 | /*ydb.pushdown('->')*/ 360 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 361 | ydbkv='blocksort.field:amtdouble' and 362 | ydbkv='blocksort.desc:true' and 363 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 364 | order by amtdouble desc,amtfloat limit 1000 365 | /*('<-')pushdown.ydb*/; 366 | 367 | 368 | 369 | --tfloat 370 | 371 | 372 | /*ydb.pushdown('->')*/ 373 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 374 | order by amtfloat,tradetime limit 1000 375 | /*('<-')pushdown.ydb*/; 376 | 377 | 378 | /*ydb.pushdown('->')*/ 379 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 380 | ydbkv='blocksort.field:amtfloat' and 381 | ydbkv='blocksort.desc:false' and 382 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 383 | order by amtfloat,tradetime limit 1000 384 | /*('<-')pushdown.ydb*/; 385 | 386 | 387 | 388 | /*ydb.pushdown('->')*/ 389 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' 390 | order by amtfloat desc,tradetime limit 1000 391 | /*('<-')pushdown.ydb*/; 392 | 393 | 394 | /*ydb.pushdown('->')*/ 395 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.3' and amtfloat<='0.9' and 396 | ydbkv='blocksort.field:amtfloat' and 397 | ydbkv='blocksort.desc:true' and 398 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 399 | order by amtfloat desc,tradetime limit 1000 400 | /*('<-')pushdown.ydb*/; -------------------------------------------------------------------------------- /autotest/8.7.blocksort.sql: -------------------------------------------------------------------------------- 1 | 2 | /*ydb.pushdown('->')*/ 3 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 4 | order by tradetime,amtfloat limit 1000 5 | /*('<-')pushdown.ydb*/; 6 | 7 | 8 | /*ydb.pushdown('->')*/ 9 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 10 | ydbkv='blocksort.field:tradetime' and 11 | ydbkv='blocksort.desc:false' and 12 | ydbkv='blocksort.limit:1000' 13 | order by tradetime,amtfloat limit 1000 14 | /*('<-')pushdown.ydb*/; 15 | 16 | 17 | 18 | /*ydb.pushdown('->')*/ 19 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 20 | order by tradetime desc,amtfloat limit 1000 21 | /*('<-')pushdown.ydb*/; 22 | 23 | 24 | /*ydb.pushdown('->')*/ 25 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 26 | ydbkv='blocksort.field:tradetime' and 27 | ydbkv='blocksort.desc:true' and 28 | ydbkv='blocksort.limit:1000' 29 | order by tradetime desc,amtfloat limit 1000 30 | /*('<-')pushdown.ydb*/; 31 | 32 | 33 | --tint 34 | 35 | /*ydb.pushdown('->')*/ 36 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 37 | order by amtint,amtfloat limit 1000 38 | /*('<-')pushdown.ydb*/; 39 | 40 | 41 | /*ydb.pushdown('->')*/ 42 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 43 | ydbkv='blocksort.field:amtint' and 44 | ydbkv='blocksort.desc:false' and 45 | ydbkv='blocksort.limit:1000' 46 | order by amtint,amtfloat limit 1000 47 | /*('<-')pushdown.ydb*/; 48 | 49 | 50 | 51 | /*ydb.pushdown('->')*/ 52 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 53 | order by amtint desc,amtfloat limit 1000 54 | /*('<-')pushdown.ydb*/; 55 | 56 | 57 | /*ydb.pushdown('->')*/ 58 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 59 | ydbkv='blocksort.field:amtint' and 60 | ydbkv='blocksort.desc:true' and 61 | ydbkv='blocksort.limit:1000' 62 | order by amtint desc,amtfloat limit 1000 63 | /*('<-')pushdown.ydb*/; 64 | 65 | 66 | --tdouble 67 | 68 | 69 | /*ydb.pushdown('->')*/ 70 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 71 | order by amtdouble,amtfloat limit 1000 72 | /*('<-')pushdown.ydb*/; 73 | 74 | 75 | /*ydb.pushdown('->')*/ 76 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 77 | ydbkv='blocksort.field:amtdouble' and 78 | ydbkv='blocksort.desc:false' and 79 | ydbkv='blocksort.limit:1000' 80 | order by amtdouble,amtfloat limit 1000 81 | /*('<-')pushdown.ydb*/; 82 | 83 | 84 | 85 | /*ydb.pushdown('->')*/ 86 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 87 | order by amtdouble desc,amtfloat limit 1000 88 | /*('<-')pushdown.ydb*/; 89 | 90 | 91 | /*ydb.pushdown('->')*/ 92 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 93 | ydbkv='blocksort.field:amtdouble' and 94 | ydbkv='blocksort.desc:true' and 95 | ydbkv='blocksort.limit:1000' 96 | order by amtdouble desc,amtfloat limit 1000 97 | /*('<-')pushdown.ydb*/; 98 | 99 | 100 | 101 | --tfloat 102 | 103 | 104 | /*ydb.pushdown('->')*/ 105 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 106 | order by amtfloat,tradetime limit 1000 107 | /*('<-')pushdown.ydb*/; 108 | 109 | 110 | /*ydb.pushdown('->')*/ 111 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 112 | ydbkv='blocksort.field:amtfloat' and 113 | ydbkv='blocksort.desc:false' and 114 | ydbkv='blocksort.limit:1000' 115 | order by amtfloat,tradetime limit 1000 116 | /*('<-')pushdown.ydb*/; 117 | 118 | 119 | 120 | /*ydb.pushdown('->')*/ 121 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 122 | order by amtfloat desc,tradetime limit 1000 123 | /*('<-')pushdown.ydb*/; 124 | 125 | 126 | /*ydb.pushdown('->')*/ 127 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 128 | ydbkv='blocksort.field:amtfloat' and 129 | ydbkv='blocksort.desc:true' and 130 | ydbkv='blocksort.limit:1000' 131 | order by amtfloat desc,tradetime limit 1000 132 | /*('<-')pushdown.ydb*/; 133 | 134 | 135 | /*ydb.pushdown('->')*/ 136 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 137 | order by tradetime,amtfloat limit 1000 138 | /*('<-')pushdown.ydb*/; 139 | 140 | 141 | /*ydb.pushdown('->')*/ 142 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 143 | ydbkv='blocksort.field:tradetime' and 144 | ydbkv='blocksort.desc:false' and 145 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 146 | order by tradetime,amtfloat limit 1000 147 | /*('<-')pushdown.ydb*/; 148 | 149 | 150 | 151 | /*ydb.pushdown('->')*/ 152 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 153 | order by tradetime desc,amtfloat limit 1000 154 | /*('<-')pushdown.ydb*/; 155 | 156 | 157 | /*ydb.pushdown('->')*/ 158 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 159 | ydbkv='blocksort.field:tradetime' and 160 | ydbkv='blocksort.desc:true' and 161 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 162 | order by tradetime desc,amtfloat limit 1000 163 | /*('<-')pushdown.ydb*/; 164 | 165 | 166 | --tint 167 | 168 | /*ydb.pushdown('->')*/ 169 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 170 | order by amtint,amtfloat limit 1000 171 | /*('<-')pushdown.ydb*/; 172 | 173 | 174 | /*ydb.pushdown('->')*/ 175 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 176 | ydbkv='blocksort.field:amtint' and 177 | ydbkv='blocksort.desc:false' and 178 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 179 | order by amtint,amtfloat limit 1000 180 | /*('<-')pushdown.ydb*/; 181 | 182 | 183 | 184 | /*ydb.pushdown('->')*/ 185 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 186 | order by amtint desc,amtfloat limit 1000 187 | /*('<-')pushdown.ydb*/; 188 | 189 | 190 | /*ydb.pushdown('->')*/ 191 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 192 | ydbkv='blocksort.field:amtint' and 193 | ydbkv='blocksort.desc:true' and 194 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 195 | order by amtint desc,amtfloat limit 1000 196 | /*('<-')pushdown.ydb*/; 197 | 198 | 199 | --tdouble 200 | 201 | 202 | /*ydb.pushdown('->')*/ 203 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 204 | order by amtdouble,amtfloat limit 1000 205 | /*('<-')pushdown.ydb*/; 206 | 207 | 208 | /*ydb.pushdown('->')*/ 209 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 210 | ydbkv='blocksort.field:amtdouble' and 211 | ydbkv='blocksort.desc:false' and 212 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 213 | order by amtdouble,amtfloat limit 1000 214 | /*('<-')pushdown.ydb*/; 215 | 216 | 217 | 218 | /*ydb.pushdown('->')*/ 219 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 220 | order by amtdouble desc,amtfloat limit 1000 221 | /*('<-')pushdown.ydb*/; 222 | 223 | 224 | /*ydb.pushdown('->')*/ 225 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 226 | ydbkv='blocksort.field:amtdouble' and 227 | ydbkv='blocksort.desc:true' and 228 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 229 | order by amtdouble desc,amtfloat limit 1000 230 | /*('<-')pushdown.ydb*/; 231 | 232 | 233 | 234 | --tfloat 235 | 236 | 237 | /*ydb.pushdown('->')*/ 238 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 239 | order by amtfloat,tradetime limit 1000 240 | /*('<-')pushdown.ydb*/; 241 | 242 | 243 | /*ydb.pushdown('->')*/ 244 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 245 | ydbkv='blocksort.field:amtfloat' and 246 | ydbkv='blocksort.desc:false' and 247 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 248 | order by amtfloat,tradetime limit 1000 249 | /*('<-')pushdown.ydb*/; 250 | 251 | 252 | 253 | /*ydb.pushdown('->')*/ 254 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 255 | order by amtfloat desc,tradetime limit 1000 256 | /*('<-')pushdown.ydb*/; 257 | 258 | 259 | /*ydb.pushdown('->')*/ 260 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 261 | ydbkv='blocksort.field:amtfloat' and 262 | ydbkv='blocksort.desc:true' and 263 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 264 | order by amtfloat desc,tradetime limit 1000 265 | /*('<-')pushdown.ydb*/; 266 | 267 | 268 | 269 | /*ydb.pushdown('->')*/ 270 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 271 | order by tradetime,amtfloat limit 1000 272 | /*('<-')pushdown.ydb*/; 273 | 274 | 275 | /*ydb.pushdown('->')*/ 276 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 277 | ydbkv='blocksort.field:tradetime' and 278 | ydbkv='blocksort.desc:false' and 279 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 280 | order by tradetime,amtfloat limit 1000 281 | /*('<-')pushdown.ydb*/; 282 | 283 | 284 | 285 | /*ydb.pushdown('->')*/ 286 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 287 | order by tradetime desc,amtfloat limit 1000 288 | /*('<-')pushdown.ydb*/; 289 | 290 | 291 | /*ydb.pushdown('->')*/ 292 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 293 | ydbkv='blocksort.field:tradetime' and 294 | ydbkv='blocksort.desc:true' and 295 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 296 | order by tradetime desc,amtfloat limit 1000 297 | /*('<-')pushdown.ydb*/; 298 | 299 | 300 | --tint 301 | 302 | /*ydb.pushdown('->')*/ 303 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 304 | order by amtint,amtfloat limit 1000 305 | /*('<-')pushdown.ydb*/; 306 | 307 | 308 | /*ydb.pushdown('->')*/ 309 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 310 | ydbkv='blocksort.field:amtint' and 311 | ydbkv='blocksort.desc:false' and 312 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 313 | order by amtint,amtfloat limit 1000 314 | /*('<-')pushdown.ydb*/; 315 | 316 | 317 | 318 | /*ydb.pushdown('->')*/ 319 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 320 | order by amtint desc,amtfloat limit 1000 321 | /*('<-')pushdown.ydb*/; 322 | 323 | 324 | /*ydb.pushdown('->')*/ 325 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 326 | ydbkv='blocksort.field:amtint' and 327 | ydbkv='blocksort.desc:true' and 328 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 329 | order by amtint desc,amtfloat limit 1000 330 | /*('<-')pushdown.ydb*/; 331 | 332 | 333 | --tdouble 334 | 335 | 336 | /*ydb.pushdown('->')*/ 337 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 338 | order by amtdouble,amtfloat limit 1000 339 | /*('<-')pushdown.ydb*/; 340 | 341 | 342 | /*ydb.pushdown('->')*/ 343 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 344 | ydbkv='blocksort.field:amtdouble' and 345 | ydbkv='blocksort.desc:false' and 346 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 347 | order by amtdouble,amtfloat limit 1000 348 | /*('<-')pushdown.ydb*/; 349 | 350 | 351 | 352 | /*ydb.pushdown('->')*/ 353 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 354 | order by amtdouble desc,amtfloat limit 1000 355 | /*('<-')pushdown.ydb*/; 356 | 357 | 358 | /*ydb.pushdown('->')*/ 359 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 360 | ydbkv='blocksort.field:amtdouble' and 361 | ydbkv='blocksort.desc:true' and 362 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 363 | order by amtdouble desc,amtfloat limit 1000 364 | /*('<-')pushdown.ydb*/; 365 | 366 | 367 | 368 | --tfloat 369 | 370 | 371 | /*ydb.pushdown('->')*/ 372 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 373 | order by amtfloat,tradetime limit 1000 374 | /*('<-')pushdown.ydb*/; 375 | 376 | 377 | /*ydb.pushdown('->')*/ 378 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 379 | ydbkv='blocksort.field:amtfloat' and 380 | ydbkv='blocksort.desc:false' and 381 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 382 | order by amtfloat,tradetime limit 1000 383 | /*('<-')pushdown.ydb*/; 384 | 385 | 386 | 387 | /*ydb.pushdown('->')*/ 388 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' 389 | order by amtfloat desc,tradetime limit 1000 390 | /*('<-')pushdown.ydb*/; 391 | 392 | 393 | /*ydb.pushdown('->')*/ 394 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.03' and amtfloat<='0.09' and 395 | ydbkv='blocksort.field:amtfloat' and 396 | ydbkv='blocksort.desc:true' and 397 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 398 | order by amtfloat desc,tradetime limit 1000 399 | /*('<-')pushdown.ydb*/; -------------------------------------------------------------------------------- /autotest/8.8.blocksort.sql: -------------------------------------------------------------------------------- 1 | 2 | /*ydb.pushdown('->')*/ 3 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 4 | order by tradetime,amtfloat limit 1000 5 | /*('<-')pushdown.ydb*/; 6 | 7 | 8 | /*ydb.pushdown('->')*/ 9 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 10 | ydbkv='blocksort.field:tradetime' and 11 | ydbkv='blocksort.desc:false' and 12 | ydbkv='blocksort.limit:1000' 13 | order by tradetime,amtfloat limit 1000 14 | /*('<-')pushdown.ydb*/; 15 | 16 | 17 | 18 | /*ydb.pushdown('->')*/ 19 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 20 | order by tradetime desc,amtfloat limit 1000 21 | /*('<-')pushdown.ydb*/; 22 | 23 | 24 | /*ydb.pushdown('->')*/ 25 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 26 | ydbkv='blocksort.field:tradetime' and 27 | ydbkv='blocksort.desc:true' and 28 | ydbkv='blocksort.limit:1000' 29 | order by tradetime desc,amtfloat limit 1000 30 | /*('<-')pushdown.ydb*/; 31 | 32 | 33 | --tint 34 | 35 | /*ydb.pushdown('->')*/ 36 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 37 | order by amtint,amtfloat limit 1000 38 | /*('<-')pushdown.ydb*/; 39 | 40 | 41 | /*ydb.pushdown('->')*/ 42 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 43 | ydbkv='blocksort.field:amtint' and 44 | ydbkv='blocksort.desc:false' and 45 | ydbkv='blocksort.limit:1000' 46 | order by amtint,amtfloat limit 1000 47 | /*('<-')pushdown.ydb*/; 48 | 49 | 50 | 51 | /*ydb.pushdown('->')*/ 52 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 53 | order by amtint desc,amtfloat limit 1000 54 | /*('<-')pushdown.ydb*/; 55 | 56 | 57 | /*ydb.pushdown('->')*/ 58 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 59 | ydbkv='blocksort.field:amtint' and 60 | ydbkv='blocksort.desc:true' and 61 | ydbkv='blocksort.limit:1000' 62 | order by amtint desc,amtfloat limit 1000 63 | /*('<-')pushdown.ydb*/; 64 | 65 | 66 | --tdouble 67 | 68 | 69 | /*ydb.pushdown('->')*/ 70 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 71 | order by amtdouble,amtfloat limit 1000 72 | /*('<-')pushdown.ydb*/; 73 | 74 | 75 | /*ydb.pushdown('->')*/ 76 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 77 | ydbkv='blocksort.field:amtdouble' and 78 | ydbkv='blocksort.desc:false' and 79 | ydbkv='blocksort.limit:1000' 80 | order by amtdouble,amtfloat limit 1000 81 | /*('<-')pushdown.ydb*/; 82 | 83 | 84 | 85 | /*ydb.pushdown('->')*/ 86 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 87 | order by amtdouble desc,amtfloat limit 1000 88 | /*('<-')pushdown.ydb*/; 89 | 90 | 91 | /*ydb.pushdown('->')*/ 92 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 93 | ydbkv='blocksort.field:amtdouble' and 94 | ydbkv='blocksort.desc:true' and 95 | ydbkv='blocksort.limit:1000' 96 | order by amtdouble desc,amtfloat limit 1000 97 | /*('<-')pushdown.ydb*/; 98 | 99 | 100 | 101 | --tfloat 102 | 103 | 104 | /*ydb.pushdown('->')*/ 105 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 106 | order by amtfloat,tradetime limit 1000 107 | /*('<-')pushdown.ydb*/; 108 | 109 | 110 | /*ydb.pushdown('->')*/ 111 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 112 | ydbkv='blocksort.field:amtfloat' and 113 | ydbkv='blocksort.desc:false' and 114 | ydbkv='blocksort.limit:1000' 115 | order by amtfloat,tradetime limit 1000 116 | /*('<-')pushdown.ydb*/; 117 | 118 | 119 | 120 | /*ydb.pushdown('->')*/ 121 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 122 | order by amtfloat desc,tradetime limit 1000 123 | /*('<-')pushdown.ydb*/; 124 | 125 | 126 | /*ydb.pushdown('->')*/ 127 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 128 | ydbkv='blocksort.field:amtfloat' and 129 | ydbkv='blocksort.desc:true' and 130 | ydbkv='blocksort.limit:1000' 131 | order by amtfloat desc,tradetime limit 1000 132 | /*('<-')pushdown.ydb*/; 133 | 134 | 135 | 136 | /*ydb.pushdown('->')*/ 137 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 138 | order by tradetime,amtfloat limit 1000 139 | /*('<-')pushdown.ydb*/; 140 | 141 | 142 | /*ydb.pushdown('->')*/ 143 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 144 | ydbkv='blocksort.field:tradetime' and 145 | ydbkv='blocksort.desc:false' and 146 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 147 | order by tradetime,amtfloat limit 1000 148 | /*('<-')pushdown.ydb*/; 149 | 150 | 151 | 152 | /*ydb.pushdown('->')*/ 153 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 154 | order by tradetime desc,amtfloat limit 1000 155 | /*('<-')pushdown.ydb*/; 156 | 157 | 158 | /*ydb.pushdown('->')*/ 159 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 160 | ydbkv='blocksort.field:tradetime' and 161 | ydbkv='blocksort.desc:true' and 162 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 163 | order by tradetime desc,amtfloat limit 1000 164 | /*('<-')pushdown.ydb*/; 165 | 166 | 167 | --tint 168 | 169 | /*ydb.pushdown('->')*/ 170 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 171 | order by amtint,amtfloat limit 1000 172 | /*('<-')pushdown.ydb*/; 173 | 174 | 175 | /*ydb.pushdown('->')*/ 176 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 177 | ydbkv='blocksort.field:amtint' and 178 | ydbkv='blocksort.desc:false' and 179 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 180 | order by amtint,amtfloat limit 1000 181 | /*('<-')pushdown.ydb*/; 182 | 183 | 184 | 185 | /*ydb.pushdown('->')*/ 186 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 187 | order by amtint desc,amtfloat limit 1000 188 | /*('<-')pushdown.ydb*/; 189 | 190 | 191 | /*ydb.pushdown('->')*/ 192 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 193 | ydbkv='blocksort.field:amtint' and 194 | ydbkv='blocksort.desc:true' and 195 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 196 | order by amtint desc,amtfloat limit 1000 197 | /*('<-')pushdown.ydb*/; 198 | 199 | 200 | --tdouble 201 | 202 | 203 | /*ydb.pushdown('->')*/ 204 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 205 | order by amtdouble,amtfloat limit 1000 206 | /*('<-')pushdown.ydb*/; 207 | 208 | 209 | /*ydb.pushdown('->')*/ 210 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 211 | ydbkv='blocksort.field:amtdouble' and 212 | ydbkv='blocksort.desc:false' and 213 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 214 | order by amtdouble,amtfloat limit 1000 215 | /*('<-')pushdown.ydb*/; 216 | 217 | 218 | 219 | /*ydb.pushdown('->')*/ 220 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 221 | order by amtdouble desc,amtfloat limit 1000 222 | /*('<-')pushdown.ydb*/; 223 | 224 | 225 | /*ydb.pushdown('->')*/ 226 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 227 | ydbkv='blocksort.field:amtdouble' and 228 | ydbkv='blocksort.desc:true' and 229 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 230 | order by amtdouble desc,amtfloat limit 1000 231 | /*('<-')pushdown.ydb*/; 232 | 233 | 234 | 235 | --tfloat 236 | 237 | 238 | /*ydb.pushdown('->')*/ 239 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 240 | order by amtfloat,tradetime limit 1000 241 | /*('<-')pushdown.ydb*/; 242 | 243 | 244 | /*ydb.pushdown('->')*/ 245 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 246 | ydbkv='blocksort.field:amtfloat' and 247 | ydbkv='blocksort.desc:false' and 248 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 249 | order by amtfloat,tradetime limit 1000 250 | /*('<-')pushdown.ydb*/; 251 | 252 | 253 | 254 | /*ydb.pushdown('->')*/ 255 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 256 | order by amtfloat desc,tradetime limit 1000 257 | /*('<-')pushdown.ydb*/; 258 | 259 | 260 | /*ydb.pushdown('->')*/ 261 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 262 | ydbkv='blocksort.field:amtfloat' and 263 | ydbkv='blocksort.desc:true' and 264 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_mdrill_mark' 265 | order by amtfloat desc,tradetime limit 1000 266 | /*('<-')pushdown.ydb*/; 267 | 268 | 269 | 270 | /*ydb.pushdown('->')*/ 271 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 272 | order by tradetime,amtfloat limit 1000 273 | /*('<-')pushdown.ydb*/; 274 | 275 | 276 | /*ydb.pushdown('->')*/ 277 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 278 | ydbkv='blocksort.field:tradetime' and 279 | ydbkv='blocksort.desc:false' and 280 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 281 | order by tradetime,amtfloat limit 1000 282 | /*('<-')pushdown.ydb*/; 283 | 284 | 285 | 286 | /*ydb.pushdown('->')*/ 287 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 288 | order by tradetime desc,amtfloat limit 1000 289 | /*('<-')pushdown.ydb*/; 290 | 291 | 292 | /*ydb.pushdown('->')*/ 293 | select tradetime, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 294 | ydbkv='blocksort.field:tradetime' and 295 | ydbkv='blocksort.desc:true' and 296 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 297 | order by tradetime desc,amtfloat limit 1000 298 | /*('<-')pushdown.ydb*/; 299 | 300 | 301 | --tint 302 | 303 | /*ydb.pushdown('->')*/ 304 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 305 | order by amtint,amtfloat limit 1000 306 | /*('<-')pushdown.ydb*/; 307 | 308 | 309 | /*ydb.pushdown('->')*/ 310 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 311 | ydbkv='blocksort.field:amtint' and 312 | ydbkv='blocksort.desc:false' and 313 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 314 | order by amtint,amtfloat limit 1000 315 | /*('<-')pushdown.ydb*/; 316 | 317 | 318 | 319 | /*ydb.pushdown('->')*/ 320 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 321 | order by amtint desc,amtfloat limit 1000 322 | /*('<-')pushdown.ydb*/; 323 | 324 | 325 | /*ydb.pushdown('->')*/ 326 | select amtint, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 327 | ydbkv='blocksort.field:amtint' and 328 | ydbkv='blocksort.desc:true' and 329 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 330 | order by amtint desc,amtfloat limit 1000 331 | /*('<-')pushdown.ydb*/; 332 | 333 | 334 | --tdouble 335 | 336 | 337 | /*ydb.pushdown('->')*/ 338 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 339 | order by amtdouble,amtfloat limit 1000 340 | /*('<-')pushdown.ydb*/; 341 | 342 | 343 | /*ydb.pushdown('->')*/ 344 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 345 | ydbkv='blocksort.field:amtdouble' and 346 | ydbkv='blocksort.desc:false' and 347 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 348 | order by amtdouble,amtfloat limit 1000 349 | /*('<-')pushdown.ydb*/; 350 | 351 | 352 | 353 | /*ydb.pushdown('->')*/ 354 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 355 | order by amtdouble desc,amtfloat limit 1000 356 | /*('<-')pushdown.ydb*/; 357 | 358 | 359 | /*ydb.pushdown('->')*/ 360 | select amtdouble, amtfloat from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 361 | ydbkv='blocksort.field:amtdouble' and 362 | ydbkv='blocksort.desc:true' and 363 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 364 | order by amtdouble desc,amtfloat limit 1000 365 | /*('<-')pushdown.ydb*/; 366 | 367 | 368 | 369 | --tfloat 370 | 371 | 372 | /*ydb.pushdown('->')*/ 373 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 374 | order by amtfloat,tradetime limit 1000 375 | /*('<-')pushdown.ydb*/; 376 | 377 | 378 | /*ydb.pushdown('->')*/ 379 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 380 | ydbkv='blocksort.field:amtfloat' and 381 | ydbkv='blocksort.desc:false' and 382 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 383 | order by amtfloat,tradetime limit 1000 384 | /*('<-')pushdown.ydb*/; 385 | 386 | 387 | 388 | /*ydb.pushdown('->')*/ 389 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' 390 | order by amtfloat desc,tradetime limit 1000 391 | /*('<-')pushdown.ydb*/; 392 | 393 | 394 | /*ydb.pushdown('->')*/ 395 | select amtfloat, tradetime from blocksort_ydb where amtfloat>='0.003' and amtfloat<='0.009' and 396 | ydbkv='blocksort.field:amtfloat' and 397 | ydbkv='blocksort.desc:true' and 398 | ydbkv='blocksort.limit:1000' and ydbkv='mdrill.force:ydb_force_to_spark_mark' 399 | order by amtfloat desc,tradetime limit 1000 400 | /*('<-')pushdown.ydb*/; -------------------------------------------------------------------------------- /autotest/cmpall.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . ~/.bashrc 3 | export PARENT_DIR_YA100="$(cd "`dirname "$0"`"/..; pwd)" 4 | source ${PARENT_DIR_YA100}/conf/ya100_env.sh 5 | 6 | echo "=============aototest 1.common.sql================" 7 | sh ./test.sh 1.common.sql 8 | echo "=============aototest 2.export.sql================" 9 | sh ./test.sh 2.export.sql 10 | echo "=============aototest 3.join.sql================" 11 | sh ./test.sh 3.join.sql 12 | echo "=============aototest 4.distinct_collect_set.sql================" 13 | sh ./test.sh 4.distinct_collect_set.sql 14 | echo "=============aototest 6.alltype.sql================" 15 | sh ./test.sh 6.alltype.sql 16 | echo "=============aototest 7.other.sql================" 17 | sh ./test.sh 7.other.sql 18 | 19 | echo "=============aototest 8.1.blocksort.sql================" 20 | sh ./test.sh 8.1.blocksort.sql 21 | echo "=============aototest 8.2.blocksort.sql================" 22 | 23 | sh ./test.sh 8.2.blocksort.sql 24 | echo "=============aototest 8.3.blocksort.sql================" 25 | 26 | sh ./test.sh 8.3.blocksort.sql 27 | echo "=============aototest 8.4.blocksort.sql================" 28 | 29 | sh ./test.sh 8.4.blocksort.sql 30 | echo "=============aototest 8.5.blocksort.sql================" 31 | 32 | sh ./test.sh 8.5.blocksort.sql 33 | echo "=============aototest 8.6.blocksort.sql================" 34 | 35 | sh ./test.sh 8.6.blocksort.sql 36 | echo "=============aototest 8.7.blocksort.sql================" 37 | 38 | sh ./test.sh 8.7.blocksort.sql 39 | echo "=============aototest 8.8.blocksort.sql================" 40 | 41 | sh ./test.sh 8.8.blocksort.sql 42 | echo "=============aototest 9.big_result.sql=====[${i}]===========" 43 | 44 | sh ./test.sh 9.big_result.sql |grep -C 50 -E "(select|cmpresult)" 45 | 46 | echo "###########################################" 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /autotest/runall.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . ~/.bashrc 3 | export PARENT_DIR_YA100="$(cd "`dirname "$0"`"/..; pwd)" 4 | source ${PARENT_DIR_YA100}/conf/ya100_env.sh 5 | 6 | j=0; 7 | 8 | while true 9 | do 10 | 11 | vardate=`date +%Y%m%d%H%M%S` 12 | 13 | ${PARENT_DIR_YA100}/bin/sql.sh -f ./runall.sql 14 | 15 | j=`expr $j + 1` 16 | for i in $( seq 1 1000 ) 17 | do 18 | 19 | curl "http://localhost:1210/ydbpage?reqid=00${vardate}_${j}_page&pagesize=100&sql=select+r%5B0%5D+as+pagekey%2Cconcat_ws%28%27%2C%27%2Cr%29+as+pagevalue+from++ydb+where+YSQL%28%27from%27%2C%27select+y_uuid_s%2Cphonenum%2Cusernick%2Ccontent+from+ydb_example_shu+where+ydbpartion%3D%223000w%22+and+content%3D%22%E7%8E%8B%E8%80%81%E5%90%89%22+and+ydbkv%3D%22export.max.return.docset.size%3A1000%22+and+ydbkv%3D%22max.return.docset.size%3A1000%22++%27%2C%27segment%27%29"|cut -b -200|tail -n 3 20 | curl "http://localhost:1210/ydbpage?reqid=00d3${vardate}_${j}_page&pagesize=100&sql=select+r%5B0%5D+as+pagekey%2Cconcat_ws%28%27%2C%27%2Cr%29+as+pagevalue+from++ydb+where+YSQL%28%27from%27%2C%27select+y_uuid_s%2Cphonenum%2Cusernick+from+ydb_example_shu+where+ydbpartion%3D%223000w%22++and+ydbkv%3D%22export.max.return.docset.size%3A1000%22+and+ydbkv%3D%22max.return.docset.size%3A1000%22++%27%2C%27segment%27%29"|cut -b -200|tail -n 3 21 | curl "http://localhost:1210/ydbpage?reqid=0234${vardate}_${j}_page&pagesize=100&sql=select+concat_ws%28%27%2C%27%2Cr%5B0%5D%2Cr%5B1%5D%2Cr%5B2%5D%29+as+pagekey%2Cconcat_ws%28%27%2C%27%2Cr%29+as+pagevalue+from++ydb+where+YSQL%28%27from%27%2C%27select+amtdouble%2Camtlong%2Cy_uuid_s%2Ccontent%2Cusernick%2Cydb_sex+from+ydb_example_shu+where+ydbpartion%3D%223000w%22+and+ydbkv%3D%22export.max.return.docset.size%3A1000%22+and+ydbkv%3D%22max.return.docset.size%3A1000%22++%27%2C%27segment%27%29+"|cut -b -200|tail -n 3 22 | 23 | done 24 | 25 | 26 | 27 | 28 | curl "http://localhost:1210/sql?sql=select+phonenum%2Cusernick%2Cydb_sex%2Cydb_province%2Cydb_grade%2Cydb_age%2Cydb_blood%2Cydb_zhiye%2Cydb_earn%2Cydb_prefer%2Cydb_consume%2Cydb_day%2Camtdouble%2Camtlong%2Ccontent+from+ydb_example_shu+where+ydbpartion%3D%273000w%27+limit+0%2C30+" 29 | curl "http://localhost:1210/sql?sql=select+count%28*%29+from+ydb_example_shu+where+ydbpartion%3D%273000w%27+limit+0%2C30+" 30 | curl "http://localhost:1210/sql?sql=select+count%28*%29+from+ydb_example_shu+where+ydbpartion%3D%273000w%27and+phonenum%3D%2718620859995%27+limit+0%2C30+" 31 | curl "http://localhost:1210/sql?sql=select+count%28*%29+from+ydb_example_shu+where+ydbpartion%3D%273000w%27and+amtlong+like+%27%28[1095+TO+1100]+%29%27+limit+0%2C30+" 32 | curl "http://localhost:1210/sql?sql=select+count%28*%29+from+ydb_example_shu+where+ydbpartion%3D%273000w%27and+content%3D%27%E9%BB%91%E7%89%9B%E6%A0%B8%E6%A1%83%E8%8A%9D%E9%BA%BB%E7%B3%8A%27+limit+0%2C30+" 33 | curl "http://localhost:1210/sql?sql=select+count%28*%29+from+ydb_example_shu+where+ydbpartion%3D%273000w%27and++ydb_sex%3D%27%E5%A5%B3%27+and+ydb_grade%3D%27%E6%9C%AC%E7%A7%91%27+and+%28ydb_age%3D%2720%E5%88%B030%E5%B2%81%27+or+ydb_blood%3D%27O%27%29+and+ydb_day%3D%2720160209%27+limit+0%2C30+" 34 | curl "http://localhost:1210/sql?sql=select+phonenum%2Cusernick%2Cydb_sex%2Cydb_province%2Cydb_grade%2Cydb_age%2Cydb_blood%2Cydb_zhiye%2Cydb_earn%2Cydb_prefer%2Cydb_consume%2Cydb_day%2Camtdouble%2Camtlong++from+ydb_example_shu+where+ydbpartion%3D%273000w%27+and+phonenum%3D%2713853208042%27+limit+10%0D%0A" 35 | curl "http://localhost:1210/sql?sql=select+phonenum%2Cusernick%2Cydb_sex%2Cydb_province%2Cydb_grade%2Cydb_age%2Cydb_blood%2Cydb_zhiye%2Cydb_earn%2Cydb_prefer%2Cydb_consume%2Cydb_day%2Camtdouble%2Camtlong++from+ydb_example_shu+where+ydbpartion%3D%273000w%27+and+amtlong+like+%27%28[1095+TO+1100]+%29%27+limit+10%0D%0A" 36 | curl "http://localhost:1210/sql?sql=select+phonenum%2Cusernick%2Cydb_sex%2Cydb_province%2Cydb_grade%2Cydb_age%2Cydb_blood%2Cydb_zhiye%2Cydb_earn%2Cydb_prefer%2Cydb_consume%2Cydb_day%2Camtdouble%2Camtlong%2Ccontent++from+ydb_example_shu+where+ydbpartion%3D%273000w%27+and+content%3D%27%E9%BB%91%E7%89%9B%E6%A0%B8%E6%A1%83%E8%8A%9D%E9%BA%BB%E7%B3%8A%27+limit+10%0D%0A" 37 | curl "http://localhost:1210/sql?sql=select+phonenum%2Cusernick%2Cydb_sex%2Cydb_province%2Cydb_grade%2Cydb_age%2Cydb_blood%2Cydb_zhiye%2Cydb_earn%2Cydb_prefer%2Cydb_consume%2Cydb_day%2Camtdouble%2Camtlong%2Ccontent++from+ydb_example_shu+where+ydbpartion%3D%273000w%27+and+ydb_sex%3D%27%E5%A5%B3%27+and+ydb_grade%3D%27%E6%9C%AC%E7%A7%91%27+and+%28ydb_age%3D%2720%E5%88%B030%E5%B2%81%27+or+ydb_blood%3D%27O%27%29+and+ydb_day%3D%2720160209%27+limit+10" 38 | curl "http://localhost:1210/sql?sql=select+count%28amtdouble%29%2Csum%28amtdouble%29+%2Cavg%28amtdouble%29%2Cmax%28amtdouble%29%2Cmin%28amtdouble%29%2Ccount%28amtlong%29%2Csum%28amtlong%29+%2Cavg%28amtlong%29%2Cmax%28amtlong%29%2Cmin%28amtlong%29+%0D%0A+from+ydb_example_shu+where+ydbpartion%3D%273000w%27+limit+10" 39 | curl "http://localhost:1210/sql?sql=select+count%28*%29%2Ccount%28ydb_sex%29%2Cmax%28ydb_sex%29%2Cmin%28ydb_sex%29+%0D%0A+from+ydb_example_shu+where+ydbpartion%3D%273000w%27+limit+10" 40 | curl "http://localhost:1210/sql?sql=select+count%28ydb_sex%29%2Ccount%28ydb_province%29%2Ccount%28ydb_grade%29%2Ccount%28ydb_age%29%2Ccount%28ydb_blood%29%2Ccount%28ydb_zhiye%29%2Ccount%28ydb_earn%29%2Ccount%28ydb_prefer%29%2Ccount%28ydb_consume%29%2Ccount%28ydb_day%29%2Ccount%28amtlong%29%2C+max%28ydb_sex%29%2Cmax%28ydb_province%29%2Cmax%28ydb_grade%29%2Cmax%28ydb_age%29%2Cmax%28ydb_blood%29%2Cmax%28ydb_zhiye%29%2Cmax%28ydb_earn%29%2Cmax%28ydb_prefer%29%2Cmax%28ydb_consume%29%2Cmax%28ydb_day%29%2Cmax%28amtlong%29%0D%0A+from+ydb_example_shu+where+ydbpartion%3D%273000w%27+limit+10" 41 | curl "http://localhost:1210/sql?sql=select+ydb_sex%2Ccount%28*%29+from++ydb_example_shu+where+ydbpartion%3D%273000w%27++group+by+ydb_sex+limit+10" 42 | curl "http://localhost:1210/sql?sql=select+ydb_sex%2Cydb_province%2Ccount%28*%29+as+cnt+from++ydb_example_shu+where+ydbpartion%3D%273000w%27+++group+by+ydb_sex%2Cydb_province+order+by+cnt+desc+limit+10%0D%0A" 43 | curl "http://localhost:1210/sql?sql=select+ydb_sex%2C+ydb_province%2Ccount%28*%29%2Ccount%28amtlong%29%2Csum%28amtlong%29+as+cnt+from++ydb_example_shu+where+ydbpartion%3D%273000w%27+group+by+ydb_sex%2Cydb_province+order+by+cnt+desc+limit+10" 44 | curl "http://localhost:1210/sql?sql=select+ydb_sex%2Cydb_province%2Cydb_grade%2C+max%28ydb_age%29%2Cmax%28ydb_blood%29%2Cmax%28ydb_zhiye%29%2Cmax%28ydb_earn%29%2Cmax%28ydb_prefer%29%2Cmax%28ydb_consume%29%2Cmax%28ydb_day%29%2Csum%28amtlong%29+as+cnt+from++ydb_example_shu+where+ydbpartion%3D%273000w%27+group+by+ydb_sex%2Cydb_province%2Cydb_grade+order+by+cnt+desc+limit+10" 45 | curl "http://localhost:1210/sql?sql=select+phonenum%2Cusernick%2Cydb_sex%2Cydb_province%2Cydb_grade%2Cydb_age%2Cydb_blood%2Cydb_zhiye%2Cydb_earn%2Cydb_prefer%2Cydb_consume%2Cydb_day%2Camtdouble%2Camtlong+from+++ydb_example_shu+where+ydbpartion%3D%273000w%27+order+by+usernick+desc%2Camtdouble+desc+limit+10%0D%0A" 46 | curl "http://localhost:1210/sql?sql=select+phonenum%2Cusernick%2Cydb_sex%2Cydb_province%2Cydb_grade%2Cydb_age%2Cydb_blood%2Cydb_zhiye%2Cydb_earn%2Cydb_prefer%2Cydb_consume%2Cydb_day%2Camtdouble%2Camtlong+from+ydb_example_shu+where+ydbpartion%3D%273000w%27+order+by+amtdouble+asc%2Camtlong+desc+limit+10%0D%0A" 47 | curl "http://localhost:1210/sql?sql=select+phonenum%2Cusernick%2Cydb_sex%2Cydb_province%2Cydb_grade%2Cydb_age%2Cydb_blood%2Cydb_zhiye%2Cydb_earn%2Cydb_prefer%2Cydb_consume%2Cydb_day%2Camtdouble%2Camtlong+from++ydb_example_shu+where+ydbpartion%3D%273000w%27+order+by+phonenum+asc%2Camtlong+desc+limit+10%0D%0A" 48 | 49 | curl "http://localhost:1210/sql?sql=select+count%28ydb_sex%29%2Ccount%28ydb_province%29%2Ccount%28ydb_grade%29%2Ccount%28ydb_age%29%2Ccount%28ydb_blood%29%2Ccount%28ydb_zhiye%29%2Ccount%28ydb_earn%29%2Ccount%28ydb_prefer%29%2Ccount%28ydb_consume%29%2Ccount%28ydb_day%29%2Ccount%28amtlong%29%2C+max%28ydb_sex%29%2Cmax%28ydb_province%29%2Cmax%28ydb_grade%29%2Cmax%28ydb_age%29%2Cmax%28ydb_blood%29%2Cmax%28ydb_zhiye%29%2Cmax%28ydb_earn%29%2Cmax%28ydb_prefer%29%2Cmax%28ydb_consume%29%2Cmax%28ydb_day%29%2Cmax%28amtlong%29+from+ydb_example_shu+where+ydbpartion%3D%273000w%27+and+content+like+%27%25%E9%BB%91%E7%89%9B%E6%A0%B8%E6%A1%83%E8%8A%9D%E9%BA%BB%E7%B3%8A%25%27++limit+10%0D%0A" 50 | 51 | curl "http://localhost:1210/sql?sql=select+ydb_sex%2Cydb_province%2Cydb_grade%2Cmax%28ydb_age%29%2Cmax%28ydb_blood%29%2Cmax%28ydb_zhiye%29%2Cmax%28ydb_earn%29%2Cmax%28ydb_prefer%29%2Cmax%28ydb_consume%29%2Cmax%28ydb_day%29%2Csum%28amtlong%29+as+cnt+from+ydb_example_shu+where+ydbpartion%3D%273000w%27+and+content+%3D%27%E9%BB%91%E7%89%9B%E6%A0%B8%E6%A1%83%E8%8A%9D%E9%BA%BB%E7%B3%8A%27+group+by+ydb_sex%2Cydb_province%2Cydb_grade+order+by+cnt+desc+limit+10%0D%0A" 52 | curl "http://localhost:1210/sql?sql=select+phonenum%2Cusernick%2Cydb_sex%2Cydb_province%2Cydb_grade%2Cydb_age%2Cydb_blood%2Cydb_zhiye%2Cydb_earn%2Cydb_prefer%2Cydb_consume%2Cydb_day%2Camtdouble%2Camtlong+from++ydb_example_shu+where+ydbpartion%3D%273000w%27+and+content+%3D%27%E9%BB%91%E7%89%9B%E6%A0%B8%E6%A1%83%E8%8A%9D%E9%BA%BB%E7%B3%8A%27++order+by+amtdouble+asc%2Camtlong+desc+limit+10%0D%0A" 53 | curl "http://localhost:1210/sql?sql=select+phonenum%2Ccount%28*%29%2Cmax%28ydb_age%29%2Cmax%28ydb_blood%29%2Cmax%28ydb_zhiye%29%2Cmax%28ydb_earn%29%2Cmax%28ydb_prefer%29%2Cmax%28ydb_consume%29%2Cmax%28ydb_day%29%2Csum%28amtlong%29+as+cnt+from++ydb_example_shu+where+ydbpartion%3D%273000w%27+and+content+%3D%27%E9%BB%91%E7%89%9B%E6%A0%B8%E6%A1%83%E8%8A%9D%E9%BA%BB%E7%B3%8A%27+group+by+phonenum+order+by+cnt+desc+limit+10%0D%0A" 54 | curl "http://localhost:1210/sql?sql=select+usernick%2Ccount%28*%29%2C+max%28ydb_age%29%2Cmax%28ydb_blood%29%2Cmax%28ydb_zhiye%29%2Cmax%28ydb_earn%29%2Cmax%28ydb_prefer%29%2Cmax%28ydb_consume%29%2Cmax%28ydb_day%29%2Csum%28amtlong%29+as+cnt+from++ydb_example_shu+where+ydbpartion%3D%273000w%27+and+content+%3D%27%E9%BB%91%E7%89%9B%E6%A0%B8%E6%A1%83%E8%8A%9D%E9%BA%BB%E7%B3%8A%27+group+by+usernick+order+by+cnt+desc+limit+10%0D%0A" 55 | curl "http://localhost:1210/sql?sql=select+count%28*%29%2Ccount%28phonenum%29%2Cmax%28phonenum%29%2Cmin%28phonenum%29%2Ccount%28usernick%29%2Cmax%28usernick%29%2Cmin%28usernick%29+from+ydb_example_shu+where+ydbpartion%3D%273000w%27+and+content+%3D%27%E9%BB%91%E7%89%9B%E6%A0%B8%E6%A1%83%E8%8A%9D%E9%BA%BB%E7%B3%8A%27+limit+10" 56 | 57 | 58 | 59 | done 60 | 61 | 62 | -------------------------------------------------------------------------------- /autotest/runfast.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . ~/.bashrc 3 | export PARENT_DIR_YA100="$(cd "`dirname "$0"`"/..; pwd)" 4 | source ${PARENT_DIR_YA100}/conf/ya100_env.sh 5 | 6 | j=0; 7 | 8 | while true 9 | do 10 | 11 | 12 | ${PARENT_DIR_YA100}/bin/sql.sh -ff ./runfast.sql 13 | 14 | 15 | 16 | done 17 | 18 | 19 | -------------------------------------------------------------------------------- /autotest/tcph/maketcph.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . ~/.bashrc 3 | export PARENT_DIR_YA100="$(cd "`dirname "$0"`"/..; pwd)" 4 | export CURRENT_DIR_YA100="$(cd "`dirname "$0"`"/; pwd)" 5 | export YA100_PATH="/opt/ydbsoftware/ya100" 6 | 7 | cd ${CURRENT_DIR_YA100} 8 | echo "sleep 30" 9 | pwd 10 | ll 11 | sleep 30 12 | 13 | rm dbgen -rf 14 | rm ref_data -rf 15 | pwd 16 | ll 17 | echo "sleep 30" 18 | sleep 30 19 | 20 | 21 | tar -xzvf tpch_2_14_3.tgz 22 | 23 | echo "sleep 30" 24 | pwd 25 | ll 26 | sleep 30 27 | 28 | 29 | cd dbgen 30 | 31 | echo "sleep 30" 32 | pwd 33 | ll 34 | sleep 30 35 | 36 | make -f makefile.suite clean; make -f makefile.suite CC=gcc DATABASE=ORACLE MACHINE=LINUX WORKLOAD=TPCH 37 | echo "./dbgen -s 1" 38 | ./dbgen -s 1 39 | 40 | echo "put lineitem" 41 | hadoop fs -rmr /tpch 42 | hadoop fs -mkdir -p /tpch/lineitem 43 | hadoop fs -put ./lineitem* /tpch/lineitem 44 | 45 | echo "put customer" 46 | 47 | hadoop fs -mkdir -p /tpch/customer 48 | hadoop fs -put ./customer* /tpch/customer 49 | 50 | echo "put nation" 51 | 52 | hadoop fs -mkdir -p /tpch/nation 53 | hadoop fs -put ./nation* /tpch/nation 54 | 55 | echo "put orders" 56 | 57 | hadoop fs -mkdir -p /tpch/orders 58 | hadoop fs -put ./orders* /tpch/orders 59 | 60 | echo "put partsupp" 61 | 62 | hadoop fs -mkdir -p /tpch/partsupp 63 | hadoop fs -put ./partsupp* /tpch/partsupp 64 | 65 | echo "put part" 66 | 67 | hadoop fs -mkdir -p /tpch/part 68 | hadoop fs -put ./part* /tpch/part 69 | 70 | echo "put region" 71 | 72 | hadoop fs -mkdir -p /tpch/region 73 | hadoop fs -put ./region* /tpch/region 74 | 75 | echo "put supplier" 76 | 77 | hadoop fs -mkdir -p /tpch/supplier 78 | hadoop fs -put ./supplier* /tpch/supplier 79 | pwd 80 | ll 81 | cd ${CURRENT_DIR_YA100} 82 | pwd 83 | ll 84 | rm dbgen -rf 85 | rm ref_data -rf 86 | 87 | ${YA100_PATH}/bin/sql.sh -f ydb_createtable_tcph.sql 88 | -------------------------------------------------------------------------------- /autotest/tcph/ydb_createtable_tcph.sql: -------------------------------------------------------------------------------- 1 | drop table lineitem; 2 | drop table part; 3 | drop table supplier; 4 | drop table partsupp; 5 | drop table nation; 6 | drop table region; 7 | drop table orders; 8 | drop table customer; 9 | 10 | 11 | 12 | create external table lineitem ( 13 | l_orderkey int, 14 | l_partkey int, 15 | l_suppkey int, 16 | l_linenumber int, 17 | l_quantity double, 18 | l_extendedprice double, 19 | l_discount double, 20 | l_tax double, 21 | l_returnflag string, 22 | l_linestatus string, 23 | l_shipdate string, 24 | l_commitdate string, 25 | l_receiptdate string, 26 | l_shipinstruct string, 27 | l_shipmode string, 28 | l_comment string) 29 | 30 | row format delimited fields terminated by '|' 31 | 32 | stored as 33 | INPUTFORMAT 'cn.net.ycloud.ydb.handle.YdbCombineInputFormat' 34 | OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' 35 | location '/tpch/lineitem' 36 | TBLPROPERTIES ( 37 | 'ydb.combine.input.format.raw.format'='org.apache.hadoop.mapred.TextInputFormat' 38 | ) 39 | ; 40 | 41 | 42 | create external table part ( 43 | p_partkey int, 44 | p_name string, 45 | p_mfgr string, 46 | p_brand string, 47 | p_type string, 48 | p_size int, 49 | p_container string, 50 | p_retailprice double, 51 | p_comment string) row format delimited fields terminated by '|' stored as 52 | INPUTFORMAT 'cn.net.ycloud.ydb.handle.YdbCombineInputFormat' 53 | OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' 54 | location '/tpch/part' 55 | TBLPROPERTIES ( 56 | 'ydb.combine.input.format.raw.format'='org.apache.hadoop.mapred.TextInputFormat' 57 | ) 58 | ; 59 | 60 | create external table supplier ( 61 | s_suppkey int, 62 | s_name string, 63 | s_address string, 64 | s_nationkey int, 65 | s_phone string, 66 | s_acctbal double, 67 | s_comment string) row format delimited fields terminated by '|' stored as 68 | INPUTFORMAT 'cn.net.ycloud.ydb.handle.YdbCombineInputFormat' 69 | OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' 70 | location '/tpch/supplier' 71 | TBLPROPERTIES ( 72 | 'ydb.combine.input.format.raw.format'='org.apache.hadoop.mapred.TextInputFormat' 73 | ) 74 | ; 75 | 76 | create external table partsupp ( 77 | ps_partkey int, 78 | ps_suppkey int, 79 | ps_availqty int, 80 | ps_supplycost double, 81 | ps_comment string) row format delimited fields terminated by '|' stored as 82 | INPUTFORMAT 'cn.net.ycloud.ydb.handle.YdbCombineInputFormat' 83 | OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' 84 | location'/tpch/partsupp' 85 | TBLPROPERTIES ( 86 | 'ydb.combine.input.format.raw.format'='org.apache.hadoop.mapred.TextInputFormat' 87 | ) 88 | ; 89 | 90 | create external table nation ( 91 | n_nationkey int, 92 | n_name string, 93 | n_regionkey int, 94 | n_comment string) row format delimited fields terminated by '|' stored as 95 | INPUTFORMAT 'cn.net.ycloud.ydb.handle.YdbCombineInputFormat' 96 | OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' 97 | location '/tpch/nation' 98 | TBLPROPERTIES ( 99 | 'ydb.combine.input.format.raw.format'='org.apache.hadoop.mapred.TextInputFormat' 100 | ) 101 | ; 102 | 103 | create external table region ( 104 | r_regionkey int, 105 | r_name string, 106 | r_comment string) row format delimited fields terminated by '|' stored as 107 | INPUTFORMAT 'cn.net.ycloud.ydb.handle.YdbCombineInputFormat' 108 | OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' 109 | location '/tpch/region' 110 | TBLPROPERTIES ( 111 | 'ydb.combine.input.format.raw.format'='org.apache.hadoop.mapred.TextInputFormat' 112 | ) 113 | ; 114 | 115 | 116 | create external table orders ( 117 | o_orderkey int, 118 | o_custkey int, 119 | o_orderstatus string, 120 | o_totalprice double, 121 | o_orderdate string, 122 | o_orderpriority string, 123 | o_clerk string, 124 | o_shippriority int, 125 | o_comment string) row format delimited fields terminated by '|' stored as 126 | INPUTFORMAT 'cn.net.ycloud.ydb.handle.YdbCombineInputFormat' 127 | OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' location '/tpch/orders' 128 | TBLPROPERTIES ( 129 | 'ydb.combine.input.format.raw.format'='org.apache.hadoop.mapred.TextInputFormat' 130 | ) 131 | ; 132 | create external table customer ( 133 | c_custkey int, 134 | c_name string, 135 | c_address string, 136 | c_nationkey int, 137 | c_phone string, 138 | c_acctbal double, 139 | c_mktsegment string, 140 | c_comment string) row format delimited fields terminated by '|' stored as 141 | INPUTFORMAT 'cn.net.ycloud.ydb.handle.YdbCombineInputFormat' 142 | OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' location '/tpch/customer' 143 | TBLPROPERTIES ( 144 | 'ydb.combine.input.format.raw.format'='org.apache.hadoop.mapred.TextInputFormat' 145 | ); 146 | 147 | 148 | 149 | /*ydb.pushdown('->')*/ 150 | create table lineitem_ydb( 151 | l_orderkey tint, 152 | l_partkey tint, 153 | l_suppkey tint, 154 | l_linenumber tint, 155 | l_quantity tdouble, 156 | l_extendedprice tdouble, 157 | l_discount tdouble, 158 | l_tax tdouble, 159 | l_returnflag string, 160 | l_linestatus string, 161 | l_shipdate string, 162 | l_commitdate string, 163 | l_receiptdate string, 164 | l_shipinstruct string, 165 | l_shipmode string, 166 | l_comment string 167 | ) 168 | /*('<-')pushdown.ydb*/; 169 | 170 | 171 | 172 | 173 | 174 | 175 | /*ydb.pushdown('->')*/ 176 | 177 | create table part_ydb ( 178 | p_partkey tint, 179 | p_name string, 180 | p_mfgr string, 181 | p_brand string, 182 | p_type string, 183 | p_size tint, 184 | p_container string, 185 | p_retailprice tdouble, 186 | p_comment string) 187 | /*('<-')pushdown.ydb*/; 188 | 189 | 190 | 191 | 192 | 193 | 194 | /*ydb.pushdown('->')*/ 195 | 196 | create table supplier_ydb ( 197 | s_suppkey tint, 198 | s_name string, 199 | s_address string, 200 | s_nationkey tint, 201 | s_phone string, 202 | s_acctbal tdouble, 203 | s_comment string) 204 | /*('<-')pushdown.ydb*/; 205 | 206 | 207 | 208 | /*ydb.pushdown('->')*/ 209 | 210 | create table partsupp_ydb ( 211 | ps_partkey tint, 212 | ps_suppkey tint, 213 | ps_availqty tint, 214 | ps_supplycost tdouble, 215 | ps_comment string) /*('<-')pushdown.ydb*/ 216 | ; 217 | 218 | 219 | /*ydb.pushdown('->')*/ 220 | 221 | create table nation_ydb ( 222 | n_nationkey tint, 223 | n_name string, 224 | n_regionkey tint, 225 | n_comment string) 226 | 227 | /*('<-')pushdown.ydb*/; 228 | 229 | 230 | 231 | 232 | /*ydb.pushdown('->')*/ 233 | 234 | create table region_ydb ( 235 | r_regionkey tint, 236 | r_name string, 237 | r_comment string) 238 | /*('<-')pushdown.ydb*/; 239 | ; 240 | 241 | 242 | 243 | 244 | 245 | 246 | /*ydb.pushdown('->')*/ 247 | 248 | create table orders_ydb ( 249 | o_orderkey tint, 250 | o_custkey tint, 251 | o_orderstatus string, 252 | o_totalprice tdouble, 253 | o_orderdate string, 254 | o_orderpriority string, 255 | o_clerk string, 256 | o_shippriority tint, 257 | o_comment string) 258 | /*('<-')pushdown.ydb*/; 259 | 260 | 261 | 262 | /*ydb.pushdown('->')*/ 263 | 264 | create table customer_ydb ( 265 | c_custkey tint, 266 | c_name string, 267 | c_address string, 268 | c_nationkey tint, 269 | c_phone string, 270 | c_acctbal tdouble, 271 | c_mktsegment string, 272 | c_comment string) 273 | /*('<-')pushdown.ydb*/; 274 | 275 | 276 | insert overwrite table ydbpartion 277 | select 'lineitem_ydb', 'ydb_default_partion', '', 278 | YROW( 279 | 'l_orderkey',l_orderkey, 280 | 'l_partkey',l_partkey, 281 | 'l_suppkey',l_suppkey, 282 | 'l_linenumber',l_linenumber, 283 | 'l_quantity',l_quantity, 284 | 'l_extendedprice',l_extendedprice, 285 | 'l_discount',l_discount, 286 | 'l_tax',l_tax, 287 | 'l_returnflag',l_returnflag , 288 | 'l_linestatus',l_linestatus, 289 | 'l_linestatus',l_linestatus, 290 | 'l_shipdate',l_shipdate, 291 | 'l_commitdate',l_commitdate, 292 | 'l_receiptdate',l_receiptdate, 293 | 'l_shipinstruct',l_shipinstruct, 294 | 'l_shipmode',l_shipmode, 295 | 296 | 'l_comment',l_comment 297 | 298 | ) 299 | from lineitem; 300 | 301 | 302 | insert overwrite table ydbpartion 303 | select 'part_ydb', 'ydb_default_partion', '', 304 | YROW( 305 | 'p_partkey',p_partkey, 306 | 'p_name',p_name, 307 | 'p_mfgr',p_mfgr, 308 | 'p_brand',p_brand, 309 | 'p_type',p_type, 310 | 'p_size',p_size, 311 | 'p_container',p_container, 312 | 'p_retailprice',p_retailprice, 313 | 'p_comment',p_comment 314 | ) 315 | from part; 316 | 317 | insert overwrite table ydbpartion 318 | select 'supplier_ydb', 'ydb_default_partion', '', 319 | YROW( 320 | 's_suppkey',s_suppkey, 321 | 's_name',s_name, 322 | 's_address',s_address, 323 | 's_nationkey',s_nationkey, 324 | 's_phone',s_phone, 325 | 's_acctbal',s_acctbal, 326 | 's_comment',s_comment 327 | ) 328 | from supplier; 329 | 330 | 331 | 332 | 333 | 334 | insert overwrite table ydbpartion 335 | select 'partsupp_ydb', 'ydb_default_partion', '', 336 | YROW( 337 | 'ps_partkey',ps_partkey, 338 | 'ps_suppkey',ps_suppkey, 339 | 'ps_availqty',ps_availqty, 340 | 'ps_supplycost',ps_supplycost, 341 | 'ps_comment',ps_comment 342 | ) 343 | from partsupp; 344 | 345 | 346 | insert overwrite table ydbpartion 347 | select 'nation_ydb', 'ydb_default_partion', '', 348 | YROW( 349 | 'n_nationkey',n_nationkey, 350 | 'n_name',n_name, 351 | 'n_regionkey',n_regionkey, 352 | 'n_comment',n_comment 353 | ) 354 | from nation; 355 | 356 | 357 | insert overwrite table ydbpartion 358 | select 'region_ydb', 'ydb_default_partion', '', 359 | YROW( 360 | 'r_regionkey',r_regionkey, 361 | 'r_name',r_name, 362 | 'r_comment',r_comment 363 | ) 364 | from region; 365 | 366 | 367 | 368 | insert overwrite table ydbpartion 369 | select 'orders_ydb', 'ydb_default_partion', '', 370 | YROW( 371 | 'o_orderkey',o_orderkey, 372 | 'o_custkey',o_custkey, 373 | 'o_orderstatus',o_orderstatus, 374 | 'o_totalprice',o_totalprice, 375 | 'o_orderdate',o_orderdate, 376 | 'o_orderpriority',o_orderpriority, 377 | 'o_clerk',o_clerk, 378 | 'o_shippriority',o_shippriority , 379 | 'o_comment',o_comment 380 | ) 381 | from orders; 382 | 383 | 384 | insert overwrite table ydbpartion 385 | select 'customer_ydb', 'ydb_default_partion', '', 386 | YROW( 387 | 'c_custkey',c_custkey, 388 | 'c_name',c_name, 389 | 'c_address',c_address, 390 | 'c_nationkey',c_nationkey, 391 | 'c_phone',c_phone, 392 | 'c_acctbal',c_acctbal, 393 | 'c_mktsegment',c_mktsegment, 394 | 'c_comment',c_comment 395 | 396 | ) 397 | from customer; 398 | -------------------------------------------------------------------------------- /autotest/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | export PARENT_DIR_YA100="$(cd "`dirname "$0"`"/..; pwd)" 3 | source ${PARENT_DIR_YA100}/conf/ya100_env.sh 4 | 5 | export LIB_CLASS_PATH=`find ${YA100_HOME}/lib/*| grep -v source | tr '\n' ':'|sed 's/:$//'` 6 | export LIB_CLASS_EXEC_PATH=`find ${YA100_HOME}/libexec/*| grep -v source | tr '\n' ':'|sed 's/:$//'` 7 | 8 | ${JAVA_HOME}/bin/java -cp "${LIB_CLASS_PATH}:${LIB_CLASS_EXEC_PATH}" cn.net.ycloud.ydb.exec.YdbTest jdbc:hive2://localhost:${YDB_DRIVER_PORT} ${HDFS_USER} "-f" "$1" "$2" 9 | 10 | -------------------------------------------------------------------------------- /autotest/test_blocksort.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . ~/.bashrc 3 | ./test.sh 8.1.blocksort.sql 4 | ./test.sh 8.2.blocksort.sql 5 | ./test.sh 8.3.blocksort.sql 6 | ./test.sh 8.4.blocksort.sql 7 | ./test.sh 8.5.blocksort.sql 8 | ./test.sh 8.6.blocksort.sql 9 | ./test.sh 8.7.blocksort.sql 10 | ./test.sh 8.8.blocksort.sql 11 | 12 | -------------------------------------------------------------------------------- /autotest/test_cmp_quick.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . ~/.bashrc 3 | export PARENT_DIR_YA100="$(cd "`dirname "$0"`"/..; pwd)" 4 | source ${PARENT_DIR_YA100}/conf/ya100_env.sh 5 | 6 | 7 | while true 8 | do 9 | sh ./initdata_quick.sh 10 | 11 | 12 | 13 | for i in $( seq 1 10 ) 14 | do 15 | 16 | echo "=============aototest 9.big_result.sql=====[${i}]===========" 17 | 18 | sh ./test.sh 9.big_result.sql |grep -C 50 -E "(select|cmpresult)" 19 | 20 | echo "=============aototest 1.common.sql======[${i}]==========" 21 | sh ./test.sh 1.common.sql 22 | echo "=============aototest 2.export.sql=======[${i}]=========" 23 | sh ./test.sh 2.export.sql 24 | echo "=============aototest 3.join.sql=========[${i}]=======" 25 | sh ./test.sh 3.join.sql 26 | echo "=============aototest 4.distinct_collect_set.sql=====[${i}]===========" 27 | sh ./test.sh 4.distinct_collect_set.sql 28 | echo "=============aototest 6.alltype.sql=========[${i}]=======" 29 | sh ./test.sh 6.alltype.sql 30 | echo "=============aototest 7.other.sql=======[${i}]=========" 31 | sh ./test.sh 7.other.sql 32 | 33 | echo "=============aototest 8.1.blocksort.sql====[${i}]============" 34 | sh ./test.sh 8.1.blocksort.sql 35 | echo "=============aototest 8.2.blocksort.sql======[${i}]==========" 36 | 37 | sh ./test.sh 8.2.blocksort.sql 38 | echo "=============aototest 8.3.blocksort.sql=======[${i}]=========" 39 | 40 | sh ./test.sh 8.3.blocksort.sql 41 | echo "=============aototest 8.4.blocksort.sql======[${i}]==========" 42 | 43 | sh ./test.sh 8.4.blocksort.sql 44 | echo "=============aototest 8.5.blocksort.sql======[${i}]==========" 45 | 46 | sh ./test.sh 8.5.blocksort.sql 47 | echo "=============aototest 8.6.blocksort.sql=====[${i}]===========" 48 | 49 | sh ./test.sh 8.6.blocksort.sql 50 | echo "=============aototest 8.7.blocksort.sql=====[${i}]===========" 51 | 52 | sh ./test.sh 8.7.blocksort.sql 53 | echo "=============aototest 8.8.blocksort.sql=====[${i}]===========" 54 | 55 | sh ./test.sh 8.8.blocksort.sql 56 | 57 | 58 | 59 | 60 | done 61 | 62 | curl "http://127.0.0.1:1210/truncatetable?tablename=ydb_example_shu&partions=20150811" 63 | curl "http://127.0.0.1:1210/truncatetable?tablename=ydb_example_ads&partions=20151111" 64 | curl "http://127.0.0.1:1210/truncatetable?tablename=ydb_example_trade&partions=20151111" 65 | curl "http://127.0.0.1:1210/truncatetable?tablename=ydb_oribit&partions=20160619" 66 | 67 | 68 | sleep 300 69 | 70 | 71 | done 72 | 73 | 74 | -------------------------------------------------------------------------------- /autotest/test_cmp_slow.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . ~/.bashrc 3 | export PARENT_DIR_YA100="$(cd "`dirname "$0"`"/..; pwd)" 4 | source ${PARENT_DIR_YA100}/conf/ya100_env.sh 5 | 6 | 7 | while true 8 | do 9 | sh ./initdata.sh 10 | for i in $( seq 1 100 ) 11 | do 12 | 13 | echo "=============aototest 9.big_result.sql=====[${i}]===========" 14 | 15 | sh ./test.sh 9.big_result.sql |grep -C 50 -E "(select|cmpresult)" 16 | 17 | 18 | echo "=============aototest 1.common.sql======[${i}]==========" 19 | sh ./test.sh 1.common.sql 20 | echo "=============aototest 2.export.sql=======[${i}]=========" 21 | sh ./test.sh 2.export.sql 22 | echo "=============aototest 3.join.sql=========[${i}]=======" 23 | sh ./test.sh 3.join.sql 24 | echo "=============aototest 4.distinct_collect_set.sql=====[${i}]===========" 25 | sh ./test.sh 4.distinct_collect_set.sql 26 | echo "=============aototest 6.alltype.sql=========[${i}]=======" 27 | sh ./test.sh 6.alltype.sql 28 | echo "=============aototest 7.other.sql=======[${i}]=========" 29 | sh ./test.sh 7.other.sql 30 | 31 | echo "=============aototest 8.1.blocksort.sql====[${i}]============" 32 | sh ./test.sh 8.1.blocksort.sql 33 | echo "=============aototest 8.2.blocksort.sql======[${i}]==========" 34 | 35 | sh ./test.sh 8.2.blocksort.sql 36 | echo "=============aototest 8.3.blocksort.sql=======[${i}]=========" 37 | 38 | sh ./test.sh 8.3.blocksort.sql 39 | echo "=============aototest 8.4.blocksort.sql======[${i}]==========" 40 | 41 | sh ./test.sh 8.4.blocksort.sql 42 | echo "=============aototest 8.5.blocksort.sql======[${i}]==========" 43 | 44 | sh ./test.sh 8.5.blocksort.sql 45 | echo "=============aototest 8.6.blocksort.sql=====[${i}]===========" 46 | 47 | sh ./test.sh 8.6.blocksort.sql 48 | echo "=============aototest 8.7.blocksort.sql=====[${i}]===========" 49 | 50 | sh ./test.sh 8.7.blocksort.sql 51 | echo "=============aototest 8.8.blocksort.sql=====[${i}]===========" 52 | 53 | sh ./test.sh 8.8.blocksort.sql 54 | 55 | 56 | done 57 | 58 | curl "http://127.0.0.1:1210/truncatetable?tablename=ydb_example_shu&partions=20150811" 59 | curl "http://127.0.0.1:1210/truncatetable?tablename=ydb_example_ads&partions=20151111" 60 | curl "http://127.0.0.1:1210/truncatetable?tablename=ydb_example_trade&partions=20151011" 61 | curl "http://127.0.0.1:1210/truncatetable?tablename=ydb_oribit&partions=20160619" 62 | 63 | 64 | sleep 300 65 | 66 | done 67 | 68 | 69 | -------------------------------------------------------------------------------- /autotest/test_cmp_tcph.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . ~/.bashrc 3 | export PARENT_DIR_YA100="$(cd "`dirname "$0"`"/..; pwd)" 4 | source ${PARENT_DIR_YA100}/conf/ya100_env.sh 5 | 6 | export CURRENT_DIR_YA100_SH="$(cd "`dirname "$0"`"/; pwd)" 7 | 8 | while true 9 | do 10 | cd ${CURRENT_DIR_YA100_SH} 11 | sh ./tcph/maketcph.sh 12 | 13 | cd ${CURRENT_DIR_YA100_SH} 14 | 15 | for i in $( seq 1 30 ) 16 | do 17 | 18 | 19 | echo "=============testtcph.sql======[${i}]==========" 20 | sh ./test.sh ./tcph/testtcph.sql 21 | 22 | 23 | 24 | done 25 | 26 | 27 | 28 | sleep 300 29 | 30 | 31 | done 32 | 33 | 34 | -------------------------------------------------------------------------------- /autotest/testkafka.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | export PARENT_DIR_YA100="$(cd "`dirname "$0"`"/..; pwd)" 3 | source ${PARENT_DIR_YA100}/conf/ya100_env.sh 4 | 5 | export LIB_CLASS_PATH=`find ${YA100_HOME}/lib/*| grep -v source | tr '\n' ':'|sed 's/:$//'` 6 | export LIB_CLASS_EXEC_PATH=`find ${YA100_HOME}/libexec/*| grep -v source | tr '\n' ':'|sed 's/:$//'` 7 | export LIB_CONF_EXEC_PATH=`find ${YA100_HOME}/conf/*| grep -v source | tr '\n' ':'|sed 's/:$//'` 8 | 9 | ${JAVA_HOME}/bin/java -cp "${LIB_CLASS_PATH}:${LIB_CLASS_EXEC_PATH}:${LIB_CONF_EXEC_PATH}" cn.net.ycloud.ydb.server.reader.kafka.importexample.KafkaAutoTest 2000000 10 10 | 11 | -------------------------------------------------------------------------------- /autotest/tpc_ds/0no-test/u-notest----query_ydb_65.sql: -------------------------------------------------------------------------------- 1 | --q65 test---- 2 | select 3 | s_store_name, 4 | i_item_desc, 5 | sc.revenue, 6 | i_current_price, 7 | i_wholesale_cost, 8 | i_brand 9 | from 10 | store_tcpds store, 11 | item_tcpds item, 12 | (select 13 | ss_store_sk, avg(revenue) as ave 14 | from 15 | (select 16 | ss_store_sk, ss_item_sk, sum(ss_sales_price) as revenue 17 | from 18 | store_sales_tcpds store_sales, date_dim_tcpds date_dim 19 | where 20 | ss_sold_date_sk = d_date_sk 21 | and d_month_seq between 1212 and 1212 + 11 22 | group by ss_store_sk , ss_item_sk) sa 23 | group by ss_store_sk) sb, 24 | (select 25 | ss_store_sk, ss_item_sk, sum(ss_sales_price) as revenue 26 | from 27 | store_sales_tcpds store_sales, date_dim_tcpds date_dim 28 | where 29 | ss_sold_date_sk = d_date_sk 30 | and d_month_seq between 1212 and 1212 + 11 31 | group by ss_store_sk , ss_item_sk) sc 32 | where 33 | sb.ss_store_sk = sc.ss_store_sk 34 | and sc.revenue <= 0.1 * sb.ave 35 | and s_store_sk = sc.ss_store_sk 36 | and i_item_sk = sc.ss_item_sk 37 | order by s_store_name , i_item_desc 38 | limit 100; 39 | 40 | 41 | 42 | with 43 | store_tmp as ( 44 | /*ydb.pushdown('->')*/ 45 | select s_store_name,s_store_sk 46 | from store_tcpydb 47 | /*('<-')pushdown.ydb*/ 48 | ), 49 | item_tmp as ( 50 | /*ydb.pushdown('->')*/ 51 | select i_item_desc,i_current_price,i_wholesale_cost,i_brand,i_item_sk 52 | from item_tcpydb 53 | /*('<-')pushdown.ydb*/ 54 | ), 55 | store_sales_tmp as ( 56 | /*ydb.pushdown('->')*/ 57 | select ss_store_sk,ss_item_sk,ss_sales_price,ss_sold_date_sk 58 | from store_sales_tcpydb 59 | /*('<-')pushdown.ydb*/ 60 | ), 61 | date_dim_tmp as ( 62 | /*ydb.pushdown('->')*/ 63 | select d_date_sk 64 | from date_dim_tcpydb 65 | where d_month_seq like '([1212 TO 1223])' 66 | /*('<-')pushdown.ydb*/ 67 | ) 68 | select 69 | s_store_name, 70 | i_item_desc, 71 | sc.revenue, 72 | i_current_price, 73 | i_wholesale_cost, 74 | i_brand 75 | from 76 | store_tmp store, 77 | item_tmp item, 78 | (select 79 | ss_store_sk, avg(revenue) as ave 80 | from 81 | (select 82 | ss_store_sk, ss_item_sk, sum(ss_sales_price) as revenue 83 | from 84 | store_sales_tmp store_sales, date_dim_tmp date_dim 85 | where 86 | ss_sold_date_sk = d_date_sk 87 | group by ss_store_sk , ss_item_sk) sa 88 | group by ss_store_sk) sb, 89 | (select 90 | ss_store_sk, ss_item_sk, sum(ss_sales_price) as revenue 91 | from 92 | store_sales_tmp store_sales, date_dim_tmp date_dim 93 | where 94 | ss_sold_date_sk = d_date_sk 95 | group by ss_store_sk , ss_item_sk) sc 96 | where 97 | sb.ss_store_sk = sc.ss_store_sk 98 | and sc.revenue <= 0.1 * sb.ave 99 | and s_store_sk = sc.ss_store_sk 100 | and i_item_sk = sc.ss_item_sk 101 | order by s_store_name , i_item_desc 102 | limit 100; 103 | -------------------------------------------------------------------------------- /autotest/tpc_ds/0no-test/unsupported----query_ydb_24.sql: -------------------------------------------------------------------------------- 1 | --q24-1 test---- 2 | with ssales as 3 | (select c_last_name 4 | ,c_first_name 5 | ,s_store_name 6 | ,ca_state 7 | ,s_state 8 | ,i_color 9 | ,i_current_price 10 | ,i_manager_id 11 | ,i_units 12 | ,i_size 13 | ,sum(ss_sales_price) netpaid 14 | from store_sales_tcpds store_sales 15 | ,store_returns_tcpds store_returns 16 | ,store_tcpds store 17 | ,item_tcpds item 18 | ,customer_tcpds customer 19 | ,customer_address_tcpds customer_address 20 | where ss_ticket_number = sr_ticket_number 21 | and ss_item_sk = sr_item_sk 22 | and ss_customer_sk = c_customer_sk 23 | and ss_item_sk = i_item_sk 24 | and ss_store_sk = s_store_sk 25 | and c_birth_country = upper(ca_country) 26 | and s_zip = ca_zip 27 | and s_market_id=7 28 | group by c_last_name 29 | ,c_first_name 30 | ,s_store_name 31 | ,ca_state 32 | ,s_state 33 | ,i_color 34 | ,i_current_price 35 | ,i_manager_id 36 | ,i_units 37 | ,i_size) 38 | select c_last_name 39 | ,c_first_name 40 | ,s_store_name 41 | ,sum(netpaid) paid 42 | from ssales 43 | where i_color = 'orchid' 44 | group by c_last_name 45 | ,c_first_name 46 | ,s_store_name 47 | having sum(netpaid) > (select 0.05*avg(netpaid) 48 | from ssales) 49 | ; -------------------------------------------------------------------------------- /autotest/tpc_ds/0no-test/unsupported----query_ydb_45.sql: -------------------------------------------------------------------------------- 1 | --q45 test---- 2 | select ca_zip, ca_county, sum(ws_sales_price) 3 | from 4 | web_sales_tcpds web_sales 5 | JOIN customer_tcpds customer ON web_sales.ws_bill_customer_sk = customer.c_customer_sk 6 | JOIN customer_address_tcpds customer_address ON customer.c_current_addr_sk = customer_address.ca_address_sk 7 | JOIN date_dim_tcpds date_dim ON web_sales.ws_sold_date_sk = date_dim.d_date_sk 8 | JOIN item_tcpds item ON web_sales.ws_item_sk = item.i_item_sk 9 | where 10 | ( item.i_item_id in (select i_item_id 11 | from item_tcpds i2 12 | where i2.i_item_sk in (2, 3, 5, 7, 11, 13, 17, 19, 23, 29) 13 | ) 14 | ) 15 | and d_qoy = 2 and d_year = 2000 16 | group by ca_zip, ca_county 17 | order by ca_zip, ca_county 18 | limit 100; 19 | -------------------------------------------------------------------------------- /autotest/tpc_ds/0no-test/unsupported----query_ydb_56.sql: -------------------------------------------------------------------------------- 1 | --q56 test---- 2 | with ss as ( 3 | select i_item_id,sum(ss_ext_sales_price) total_sales 4 | from 5 | store_sales_tcpds store_sales, 6 | date_dim_tcpds date_dim, 7 | customer_address_tcpds customer_address, 8 | item_tcpds item 9 | where item.i_item_id in (select 10 | i.i_item_id 11 | from item_tcpds i 12 | where i_color in ('purple','burlywood','indian')) 13 | and ss_item_sk = i_item_sk 14 | and ss_sold_date_sk = d_date_sk 15 | and d_year = 2001 16 | and d_moy = 1 17 | and ss_addr_sk = ca_address_sk 18 | and ca_gmt_offset = -6 19 | group by i_item_id), 20 | cs as ( 21 | select i_item_id,sum(cs_ext_sales_price) total_sales 22 | from 23 | catalog_sales_tcpds catalog_sales, 24 | date_dim_tcpds date_dim, 25 | customer_address_tcpds customer_address, 26 | item_tcpds item 27 | where 28 | item.i_item_id in (select 29 | i.i_item_id 30 | from item_tcpds i 31 | where i_color in ('purple','burlywood','indian')) 32 | and cs_item_sk = i_item_sk 33 | and cs_sold_date_sk = d_date_sk 34 | and d_year = 2001 35 | and d_moy = 1 36 | and cs_bill_addr_sk = ca_address_sk 37 | and ca_gmt_offset = -6 38 | group by i_item_id), 39 | ws as ( 40 | select i_item_id,sum(ws_ext_sales_price) total_sales 41 | from 42 | web_sales_tcpds web_sales, 43 | date_dim_tcpds date_dim, 44 | customer_address_tcpds customer_address, 45 | item_tcpds item 46 | where 47 | item.i_item_id in (select 48 | i.i_item_id 49 | from item_tcpds i 50 | where i_color in ('purple','burlywood','indian')) 51 | and ws_item_sk = i_item_sk 52 | and ws_sold_date_sk = d_date_sk 53 | and d_year = 2001 54 | and d_moy = 1 55 | and ws_bill_addr_sk = ca_address_sk 56 | and ca_gmt_offset = -6 57 | group by i_item_id) 58 | select i_item_id ,sum(total_sales) total_sales 59 | from (select * from ss 60 | union all 61 | select * from cs 62 | union all 63 | select * from ws) tmp1 64 | group by i_item_id 65 | order by total_sales 66 | limit 100; 67 | -------------------------------------------------------------------------------- /autotest/tpc_ds/0no-test/unsupported----query_ydb_60.sql: -------------------------------------------------------------------------------- 1 | --q60 test---- 2 | with ss as ( 3 | select 4 | i_item_id,sum(ss_ext_sales_price) total_sales 5 | from 6 | store_sales_tcpds store_sales, 7 | date_dim_tcpds date_dim, 8 | customer_address_tcpds customer_address, 9 | item_tcpds item 10 | where 11 | item.i_item_id in (select 12 | i.i_item_id 13 | from 14 | item_tcpds i 15 | where i_category in ('Children')) 16 | and ss_item_sk = i_item_sk 17 | and ss_sold_date_sk = d_date_sk 18 | and d_year = 1999 19 | and d_moy = 9 20 | and ss_addr_sk = ca_address_sk 21 | and ca_gmt_offset = -6 22 | group by i_item_id), 23 | cs as ( 24 | select 25 | i_item_id,sum(cs_ext_sales_price) total_sales 26 | from 27 | catalog_sales_tcpds catalog_sales, 28 | date_dim_tcpds date_dim, 29 | customer_address_tcpds customer_address, 30 | item_tcpds item 31 | where 32 | item.i_item_id in (select 33 | i.i_item_id 34 | from 35 | item_tcpds i 36 | where i_category in ('Children')) 37 | and cs_item_sk = i_item_sk 38 | and cs_sold_date_sk = d_date_sk 39 | and d_year = 1999 40 | and d_moy = 9 41 | and cs_bill_addr_sk = ca_address_sk 42 | and ca_gmt_offset = -6 43 | group by i_item_id), 44 | ws as ( 45 | select 46 | i_item_id,sum(ws_ext_sales_price) total_sales 47 | from 48 | web_sales_tcpds web_sales, 49 | date_dim_tcpds date_dim, 50 | customer_address_tcpds customer_address, 51 | item_tcpds item 52 | where 53 | item.i_item_id in (select 54 | i.i_item_id 55 | from 56 | item_tcpds i 57 | where i_category in ('Children')) 58 | and ws_item_sk = i_item_sk 59 | and ws_sold_date_sk = d_date_sk 60 | and d_year = 1999 61 | and d_moy = 9 62 | and ws_bill_addr_sk = ca_address_sk 63 | and ca_gmt_offset = -6 64 | group by i_item_id) 65 | select 66 | i_item_id 67 | ,sum(total_sales) total_sales 68 | from (select * from ss 69 | union all 70 | select * from cs 71 | union all 72 | select * from ws) tmp1 73 | group by i_item_id 74 | order by i_item_id 75 | ,total_sales 76 | limit 100; 77 | -------------------------------------------------------------------------------- /autotest/tpc_ds/0no-test/unsupported----query_ydb_70.sql: -------------------------------------------------------------------------------- 1 | --q70 test---- 2 | select 3 | sum(ss_net_profit) as total_sum 4 | ,s_state 5 | ,s_county 6 | ,grouping__id as lochierarchy 7 | , rank() over(partition by grouping__id, case when grouping__id == 2 then s_state end order by sum(ss_net_profit)) as rank_within_parent 8 | from 9 | store_sales_tcpds ss join date_dim_tcpds d1 on d1.d_date_sk = ss.ss_sold_date_sk 10 | join store_tcpds s on s.s_store_sk = ss.ss_store_sk 11 | where 12 | d1.d_month_seq between 1193 and 1193+11 13 | and s.s_state in 14 | ( select s_state 15 | from (select s_state as s_state, sum(ss_net_profit), 16 | rank() over ( partition by s_state order by sum(ss_net_profit) desc) as ranking 17 | from store_sales_tcpds store_sales, store_tcpds store, date_dim_tcpds date_dim 18 | where d_month_seq between 1193 and 1193+11 19 | and date_dim.d_date_sk = store_sales.ss_sold_date_sk 20 | and store.s_store_sk = store_sales.ss_store_sk 21 | group by s_state 22 | ) tmp1 23 | where ranking <= 5 24 | ) 25 | group by s_state,s_county with rollup 26 | order by 27 | lochierarchy desc 28 | ,case when lochierarchy = 0 then s_state end 29 | ,rank_within_parent 30 | limit 100; 31 | -------------------------------------------------------------------------------- /autotest/tpc_ds/0no-test/unsupported----query_ydb_83.sql: -------------------------------------------------------------------------------- 1 | --q83 test---- 2 | with sr_items as 3 | (select i_item_id item_id, 4 | sum(sr_return_quantity) sr_item_qty 5 | from store_returns_tcpds store_returns, 6 | item_tcpds item, 7 | date_dim_tcpds date_dim 8 | where sr_item_sk = i_item_sk 9 | and d_date in 10 | (select d_date 11 | from date_dim_tcpds date_dim 12 | where d_week_seq in 13 | (select d_week_seq 14 | from date_dim_tcpds date_dim 15 | where d_date in ('1998-01-02','1998-10-15','1998-11-10'))) 16 | and sr_returned_date_sk = d_date_sk 17 | group by i_item_id), 18 | cr_items as 19 | (select i_item_id item_id, 20 | sum(cr_return_quantity) cr_item_qty 21 | from catalog_returns_tcpds catalog_returns, 22 | item_tcpds item, 23 | date_dim_tcpds date_dim 24 | where cr_item_sk = i_item_sk 25 | and d_date in 26 | (select d_date 27 | from date_dim_tcpds date_dim 28 | where d_week_seq in 29 | (select d_week_seq 30 | from date_dim_tcpds date_dim 31 | where d_date in ('1998-01-02','1998-10-15','1998-11-10'))) 32 | and cr_returned_date_sk = d_date_sk 33 | group by i_item_id), 34 | wr_items as 35 | (select i_item_id item_id, 36 | sum(wr_return_quantity) wr_item_qty 37 | from web_returns_tcpds web_returns, 38 | item_tcpds item, 39 | date_dim_tcpds date_dim 40 | where wr_item_sk = i_item_sk 41 | and d_date in 42 | (select d_date 43 | from date_dim_tcpds date_dim 44 | where d_week_seq in 45 | (select d_week_seq 46 | from date_dim_tcpds date_dim 47 | where d_date in ('1998-01-02','1998-10-15','1998-11-10'))) 48 | and wr_returned_date_sk = d_date_sk 49 | group by i_item_id) 50 | select sr_items.item_id 51 | ,sr_item_qty 52 | ,sr_item_qty/(sr_item_qty+cr_item_qty+wr_item_qty)/3.0 * 100 sr_dev 53 | ,cr_item_qty 54 | ,cr_item_qty/(sr_item_qty+cr_item_qty+wr_item_qty)/3.0 * 100 cr_dev 55 | ,wr_item_qty 56 | ,wr_item_qty/(sr_item_qty+cr_item_qty+wr_item_qty)/3.0 * 100 wr_dev 57 | ,(sr_item_qty+cr_item_qty+wr_item_qty)/3.0 average 58 | from sr_items 59 | ,cr_items 60 | ,wr_items 61 | where sr_items.item_id=cr_items.item_id 62 | and sr_items.item_id=wr_items.item_id 63 | order by sr_items.item_id 64 | ,sr_item_qty 65 | limit 100; 66 | 67 | -------------------------------------------------------------------------------- /autotest/tpc_ds/count_table.sql: -------------------------------------------------------------------------------- 1 | select count(*) from call_center_tcpds; 2 | /*ydb.pushdown('->')*/select count(*) from call_center_tcpydb /*('<-')pushdown.ydb*/; 3 | select count(*) from catalog_page_tcpds; 4 | /*ydb.pushdown('->')*/select count(*) from catalog_page_tcpydb /*('<-')pushdown.ydb*/; 5 | select count(*) from catalog_returns_tcpds; 6 | /*ydb.pushdown('->')*/select count(*) from catalog_returns_tcpydb /*('<-')pushdown.ydb*/; 7 | select count(*) from catalog_sales_tcpds; 8 | /*ydb.pushdown('->')*/select count(*) from catalog_sales_tcpydb /*('<-')pushdown.ydb*/; 9 | select count(*) from customer_address_tcpds; 10 | /*ydb.pushdown('->')*/select count(*) from customer_address_tcpydb /*('<-')pushdown.ydb*/; 11 | select count(*) from customer_demographics_tcpds; 12 | /*ydb.pushdown('->')*/select count(*) from customer_demographics_tcpydb /*('<-')pushdown.ydb*/; 13 | select count(*) from customer_tcpds; 14 | /*ydb.pushdown('->')*/select count(*) from customer_tcpydb /*('<-')pushdown.ydb*/; 15 | select count(*) from date_dim_tcpds; 16 | /*ydb.pushdown('->')*/select count(*) from date_dim_tcpydb /*('<-')pushdown.ydb*/; 17 | select count(*) from household_demographics_tcpds; 18 | /*ydb.pushdown('->')*/select count(*) from household_demographics_tcpydb /*('<-')pushdown.ydb*/; 19 | select count(*) from income_band_tcpds; 20 | /*ydb.pushdown('->')*/select count(*) from income_band_tcpydb /*('<-')pushdown.ydb*/; 21 | select count(*) from inventory_tcpds; 22 | /*ydb.pushdown('->')*/select count(*) from inventory_tcpydb /*('<-')pushdown.ydb*/; 23 | select count(*) from item_tcpds; 24 | /*ydb.pushdown('->')*/select count(*) from item_tcpydb /*('<-')pushdown.ydb*/; 25 | select count(*) from promotion_tcpds; 26 | /*ydb.pushdown('->')*/select count(*) from promotion_tcpydb /*('<-')pushdown.ydb*/; 27 | select count(*) from reason_tcpds; 28 | /*ydb.pushdown('->')*/select count(*) from reason_tcpydb /*('<-')pushdown.ydb*/; 29 | select count(*) from ship_mode_tcpds; 30 | /*ydb.pushdown('->')*/select count(*) from ship_mode_tcpydb /*('<-')pushdown.ydb*/; 31 | select count(*) from store_returns_tcpds; 32 | /*ydb.pushdown('->')*/select count(*) from store_returns_tcpydb /*('<-')pushdown.ydb*/; 33 | select count(*) from store_sales_tcpds; 34 | /*ydb.pushdown('->')*/select count(*) from store_sales_tcpydb /*('<-')pushdown.ydb*/; 35 | select count(*) from store_tcpds; 36 | /*ydb.pushdown('->')*/select count(*) from store_tcpydb /*('<-')pushdown.ydb*/; 37 | select count(*) from time_dim_tcpds; 38 | /*ydb.pushdown('->')*/select count(*) from time_dim_tcpydb /*('<-')pushdown.ydb*/; 39 | select count(*) from warehouse_tcpds; 40 | /*ydb.pushdown('->')*/select count(*) from warehouse_tcpydb /*('<-')pushdown.ydb*/; 41 | select count(*) from web_page_tcpds; 42 | /*ydb.pushdown('->')*/select count(*) from web_page_tcpydb /*('<-')pushdown.ydb*/; 43 | select count(*) from web_returns_tcpds; 44 | /*ydb.pushdown('->')*/select count(*) from web_returns_tcpydb /*('<-')pushdown.ydb*/; 45 | select count(*) from web_sales_tcpds; 46 | /*ydb.pushdown('->')*/select count(*) from web_sales_tcpydb /*('<-')pushdown.ydb*/; 47 | select count(*) from web_site_tcpds; 48 | /*ydb.pushdown('->')*/select count(*) from web_site_tcpydb /*('<-')pushdown.ydb*/; 49 | -------------------------------------------------------------------------------- /autotest/ydb_createtable.sql: -------------------------------------------------------------------------------- 1 | 2 | /*ydb.pushdown('->')*/ 3 | create table ydb_example_shu( 4 | phonenum haoma, 5 | usernick string, 6 | ydb_sex string, 7 | ydb_province string, 8 | ydb_grade string, 9 | ydb_age string, 10 | ydb_blood string, 11 | ydb_zhiye string, 12 | ydb_earn string, 13 | ydb_prefer string, 14 | ydb_consume string, 15 | ydb_day string, 16 | amtdouble tdouble, 17 | amtlong tlong, 18 | content simpletext 19 | ) 20 | /*('<-')pushdown.ydb*/; 21 | 22 | /*ydb.pushdown('->')*/ 23 | create table blocksort_ydb( 24 | amtdouble tdouble, 25 | amtfloat tfloat, 26 | tradetime tlong, 27 | amtint tint 28 | ) 29 | /*('<-')pushdown.ydb*/; 30 | 31 | 32 | /*ydb.pushdown('->')*/ 33 | create table ydb_example_ads( 34 | phonenum long, 35 | usernick string, 36 | ydb_sex string, 37 | ydb_province string, 38 | ydb_grade string, 39 | ydb_age string, 40 | ydb_blood string, 41 | ydb_zhiye string, 42 | ydb_earn string, 43 | ydb_prefer string, 44 | ydb_consume string, 45 | content simpletext 46 | 47 | ) 48 | /*('<-')pushdown.ydb*/; 49 | 50 | /*ydb.pushdown('->')*/ 51 | create table ydb_all_type( 52 | c1_byte tint,c2_byte tint,c1_short tint,c2_short tint,c1_int tint,c2_int tint,c3_int tint,c4_int tint,c1_long tlong,c2_long tlong,c3_long tlong,c4_long tlong,c1_float tfloat,c2_float tfloat,c3_float tfloat,c4_float tfloat,c1_double tdouble,c2_double tdouble,c3_double tdouble,c4_double tdouble,c1_string string,c2_string simpletext,c3_string string,c4_string string 53 | ,d1_byte tint,d2_byte tint,d1_short tint,d2_short tint,d1_int tint,d2_int tint,d3_int tint,d4_int tint,d1_long tlong,d2_long tlong,d3_long tlong,d4_long tlong,d1_float tfloat,d2_float tfloat,d3_float tfloat,d4_float tfloat,d1_double tdouble,d2_double tdouble,d3_double tdouble,d4_double tdouble,d1_string string,d2_string simpletext,d3_string string,d4_string string 54 | ) 55 | /*('<-')pushdown.ydb*/; 56 | 57 | 58 | /*ydb.pushdown('->')*/ 59 | create table ydb_example_trade( 60 | tradeid haoma, 61 | nickname string, 62 | province string, 63 | tradetype string, 64 | tradenum string, 65 | tradetime string, 66 | cardnum string, 67 | amt bigint, 68 | bank string, 69 | content simpletext 70 | ) 71 | /*('<-')pushdown.ydb*/; 72 | 73 | 74 | /*ydb.pushdown('->')*/ 75 | create table vehiclepass( 76 | tollCode long, 77 | vehiclePlate string 78 | ) 79 | /*('<-')pushdown.ydb*/; 80 | 81 | /*ydb.pushdown('->')*/ 82 | create table lonlattable_test( 83 | lon tdouble, 84 | lat tdouble, 85 | mortonhash geopoint 86 | ) 87 | /*('<-')pushdown.ydb*/; 88 | 89 | /*ydb.pushdown('->')*/ 90 | create table ydb_example_shu_positon( 91 | phonenum charlike, 92 | phonenum_chepai pchepai, 93 | content wordlike, 94 | content_pyy pyy 95 | ) 96 | /*('<-')pushdown.ydb*/; 97 | 98 | 99 | /*ydb.pushdown('->')*/ 100 | create table ydb_example_shu_multyvalue( 101 | phonenum haoma, 102 | usernick string, 103 | ydb_sex string, 104 | ydb_province string, 105 | ydb_grade string, 106 | ydb_age string, 107 | ydb_blood string, 108 | ydb_zhiye string, 109 | ydb_earn string, 110 | ydb_prefer string, 111 | ydb_consume string, 112 | ydb_day string, 113 | amtdouble tdouble, 114 | amtlong tlong, 115 | content simpletext, 116 | multyvalue_string mt_syn, 117 | multyvalue_tlong mt_tlyn, 118 | multyvalue_long mt_lyn, 119 | multyvalue_tdouble mt_tdyn, 120 | multyvalue_double mt_dyn 121 | ) 122 | /*('<-')pushdown.ydb*/; 123 | 124 | /*ydb.pushdown('->')*/ 125 | create table ydb_oribit( 126 | CLXXBH String, 127 | KKBH bigint, 128 | JKSBBH string, 129 | JGSJ bigint, 130 | JGSK bigint, 131 | XSFX string, 132 | CDBH string, 133 | HPHM string, 134 | HPYS string, 135 | ZPSL bigint, 136 | CLSD bigint, 137 | XSZT string, 138 | CLPP1 string, 139 | CLPP2 string, 140 | CWKC bigint, 141 | CSYS string, 142 | YSSQ string, 143 | CLLX string, 144 | HPZL string, 145 | CLBJ string, 146 | CRSJ bigint, 147 | SJCZSJ bigint, 148 | LON tdouble, 149 | LAT tdouble 150 | ) 151 | /*('<-')pushdown.ydb*/; 152 | 153 | 154 | /*ydb.pushdown('->')*/ 155 | create table ydb_example_shu_ik( 156 | phonenum haoma, 157 | usernick string, 158 | ydb_sex string, 159 | ydb_province string, 160 | ydb_grade string, 161 | ydb_age string, 162 | ydb_blood string, 163 | ydb_zhiye string, 164 | ydb_earn string, 165 | ydb_prefer string, 166 | ydb_consume string, 167 | ydb_day string, 168 | amtdouble tdouble, 169 | amtlong tlong, 170 | content textik 171 | ) 172 | /*('<-')pushdown.ydb*/; 173 | -------------------------------------------------------------------------------- /autotest/ydb_droptable.sql: -------------------------------------------------------------------------------- 1 | /*ydb.pushdown('->')*/ 2 | drop table ydb_example_shu 3 | /*('<-')pushdown.ydb*/ 4 | ; 5 | 6 | /*ydb.pushdown('->')*/ 7 | drop table ydb_example_ads 8 | /*('<-')pushdown.ydb*/ 9 | ; 10 | 11 | /*ydb.pushdown('->')*/ 12 | drop table blocksort_ydb 13 | /*('<-')pushdown.ydb*/ 14 | ; 15 | 16 | /*ydb.pushdown('->')*/ 17 | drop table ydb_all_type 18 | /*('<-')pushdown.ydb*/ 19 | ; 20 | 21 | /*ydb.pushdown('->')*/ 22 | drop table ydb_example_trade 23 | /*('<-')pushdown.ydb*/ 24 | ; 25 | 26 | /*ydb.pushdown('->')*/ 27 | drop table vehiclepass 28 | /*('<-')pushdown.ydb*/ 29 | ; 30 | 31 | /*ydb.pushdown('->')*/ 32 | drop table lonlattable_test 33 | /*('<-')pushdown.ydb*/ 34 | ; 35 | 36 | /*ydb.pushdown('->')*/ 37 | drop table ydb_example_shu_positon 38 | /*('<-')pushdown.ydb*/ 39 | ; 40 | 41 | /*ydb.pushdown('->')*/ 42 | drop table ydb_example_shu_multyvalue 43 | /*('<-')pushdown.ydb*/ 44 | ; 45 | 46 | /*ydb.pushdown('->')*/ 47 | drop table ydb_oribit 48 | /*('<-')pushdown.ydb*/ 49 | ; 50 | 51 | /*ydb.pushdown('->')*/ 52 | drop table ydb_example_shu_ik 53 | /*('<-')pushdown.ydb*/ 54 | ; 55 | 56 | -------------------------------------------------------------------------------- /autotest/ydb_truncatetable.sql: -------------------------------------------------------------------------------- 1 | /*ydb.pushdown('->')*/ 2 | truncate table ydb_example_shu 3 | /*('<-')pushdown.ydb*/ 4 | ; 5 | 6 | /*ydb.pushdown('->')*/ 7 | truncate table ydb_example_ads 8 | /*('<-')pushdown.ydb*/ 9 | ; 10 | 11 | /*ydb.pushdown('->')*/ 12 | truncate table blocksort_ydb 13 | /*('<-')pushdown.ydb*/ 14 | ; 15 | 16 | /*ydb.pushdown('->')*/ 17 | truncate table ydb_all_type 18 | /*('<-')pushdown.ydb*/ 19 | ; 20 | 21 | /*ydb.pushdown('->')*/ 22 | truncate table ydb_example_trade 23 | /*('<-')pushdown.ydb*/ 24 | ; 25 | 26 | /*ydb.pushdown('->')*/ 27 | truncate table vehiclepass 28 | /*('<-')pushdown.ydb*/ 29 | ; 30 | 31 | /*ydb.pushdown('->')*/ 32 | truncate table lonlattable_test 33 | /*('<-')pushdown.ydb*/ 34 | ; 35 | 36 | /*ydb.pushdown('->')*/ 37 | truncate table ydb_example_shu_positon 38 | /*('<-')pushdown.ydb*/ 39 | ; 40 | 41 | /*ydb.pushdown('->')*/ 42 | truncate table ydb_example_shu_multyvalue 43 | /*('<-')pushdown.ydb*/ 44 | ; 45 | 46 | /*ydb.pushdown('->')*/ 47 | truncate table ydb_oribit 48 | /*('<-')pushdown.ydb*/ 49 | ; 50 | 51 | /*ydb.pushdown('->')*/ 52 | truncate table ydb_example_shu_ik 53 | /*('<-')pushdown.ydb*/ 54 | ; 55 | 56 | --------------------------------------------------------------------------------