1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 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 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634
|
echo "Test for SQL vs JSON";
echo "Comparator >=";
echo "";
echo "Testcase for Tinyint";
#====================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._tin as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._tin as side1,
b.col as side2,
JSON_TYPE(CAST(a._tin as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._tin as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._tin >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._tin as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_tin a , jj b
where a._tin is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._tin as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._tin >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._tin as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for Boolean";
#=====================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._boo as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._boo as side1,
b.col as side2,
JSON_TYPE(CAST(a._boo as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._boo as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._boo >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._boo as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_boo a , jj b
where a._boo is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._boo as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._boo >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._boo as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for small Int Signed";
#==============================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._sms as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._sms as side1,
b.col as side2,
JSON_TYPE(CAST(a._sms as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._sms as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._sms >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._sms as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_sms a , jj b
where a._sms is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._sms as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._sms >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._sms as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for Signed Medium Int";
#===============================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._mes as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._mes as side1,
b.col as side2,
JSON_TYPE(CAST(a._mes as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._mes as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._mes >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._mes as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_mes a , jj b
where a._mes is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._mes as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._mes >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._mes as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for unsigned Medium Int";
#==================================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._meu as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._meu as side1,
b.col as side2,
JSON_TYPE(CAST(a._meu as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._meu as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._meu >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._meu as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_meu a , jj b
where a._meu is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._meu as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._meu >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._meu as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for signed Int";
#========================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._ins as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._ins as side1,
b.col as side2,
JSON_TYPE(CAST(a._ins as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._ins as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._ins >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._ins as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_ins a , jj b
where a._ins is not NULL
and b.col is not NULL
and ((a._ins >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._ins as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for Unsigned Int";
#========================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._inu as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._inu as side1,
b.col as side2,
JSON_TYPE(CAST(a._inu as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._inu as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._inu >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._inu as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_inu a , jj b
where a._inu is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._inu as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._inu >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._inu as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for Big Int";
#========================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._bis as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._bis as side1,
b.col as side2,
JSON_TYPE(CAST(a._bis as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._bis as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._bis >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._bis as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_bis a , jj b
where a._bis is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._bis as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._bis >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._bis as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for Big Int Unsigned";
#==============================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._biu as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._biu as side1,
b.col as side2,
JSON_TYPE(CAST(a._biu as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._biu as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._biu >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._biu as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_biu a , jj b
where a._biu is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._biu as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._biu >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._biu as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for Decimal";
#=====================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._dec as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._dec as side1,
b.col as side2,
JSON_TYPE(CAST(a._dec as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._dec as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._dec >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._dec as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_dec a , jj b
where a._dec is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._dec as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._dec >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._dec as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for Double";
#=====================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._dou as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._dou as side1,
b.col as side2,
JSON_TYPE(CAST(a._dou as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._dou as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._dou >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._dou as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_dou a , jj b
where a._dou is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._dou as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._dou >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._dou as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for CHAR";
#===================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._chr as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._chr as side1,
b.col as side2,
JSON_TYPE(CAST(a._chr as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._chr as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._chr >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._chr as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_chr a , jj b
where a._chr is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._chr as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._chr >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._chr as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for VARCHAR";
#=====================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._vch as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._vch as side1,
b.col as side2,
JSON_TYPE(CAST(a._vch as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._vch as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._vch >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._vch as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_vch a , jj b
where a._vch is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._vch as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._vch >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._vch as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for Binary(255)";
#==========================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._bin as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._bin as side1,
b.col as side2,
JSON_TYPE(CAST(a._bin as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._bin as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._bin >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._bin as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_bin a , jj b
where a._bin is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._bin as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._bin >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._bin as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for Variable Binary";
#=============================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._vbn as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._vbn as side1,
b.col as side2,
JSON_TYPE(CAST(a._vbn as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._vbn as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._vbn >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._vbn as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_vbn a , jj b
where a._vbn is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._vbn as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._vbn >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._vbn as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for TinyBlob";
#======================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._tbl as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._tbl as side1,
b.col as side2,
JSON_TYPE(CAST(a._tbl as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._tbl as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._tbl >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._tbl as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_tbl a , jj b
where a._tbl is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._tbl as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._tbl >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._tbl as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for TinyText";
#======================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._ttx as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._ttx as side1,
b.col as side2,
JSON_TYPE(CAST(a._ttx as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._ttx as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._ttx >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._ttx as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_ttx a , jj b
where a._ttx is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._ttx as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._ttx >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._ttx as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for Blob";
#======================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._blb as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._blb as side1,
b.col as side2,
JSON_TYPE(CAST(a._blb as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._blb as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._blb >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._blb as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_blb a , jj b
where a._blb is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._blb as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._blb >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._blb as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for Text";
#======================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._txt as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._txt as side1,
b.col as side2,
JSON_TYPE(CAST(a._txt as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._txt as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._txt >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._txt as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_txt a , jj b
where a._txt is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._txt as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._txt >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._txt as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for Medium Blob";
#=========================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._mbb as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._mbb as side1,
b.col as side2,
JSON_TYPE(CAST(a._mbb as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._mbb as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._mbb >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._mbb as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_mbb a , jj b
where a._mbb is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._mbb as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._mbb >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._mbb as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for Medium Text";
#=========================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._mtx as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._mtx as side1,
b.col as side2,
JSON_TYPE(CAST(a._mtx as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._mtx as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._mtx >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._mtx as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_mtx a , jj b
where a._mtx is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._mtx as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._mtx >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._mtx as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for Long Blob";
#=========================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._lbb as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._lbb as side1,
b.col as side2,
JSON_TYPE(CAST(a._lbb as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._lbb as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._lbb >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._lbb as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_lbb a , jj b
where a._lbb is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._lbb as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._lbb >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._lbb as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for Long Text";
#=========================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._ltx as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._ltx as side1,
b.col as side2,
JSON_TYPE(CAST(a._ltx as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._ltx as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._ltx >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._ltx as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_ltx a , jj b
where a._ltx is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._ltx as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._ltx >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._ltx as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for Enum";
#==================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._enu as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._enu as side1,
b.col as side2,
JSON_TYPE(CAST(a._enu as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._enu as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._enu >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._enu as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_enu a , jj b
where a._enu is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._enu as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._enu >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._enu as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
echo "Testcase for Set";
#==================
--sorted_result
select
IF(GET_JSON_WEIGHT(JSON_TYPE(CAST(a._set as JSON)))=GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))),'2nd Level','1st Level') validation_stage,
a._set as side1,
b.col as side2,
JSON_TYPE(CAST(a._set as JSON)) as side1_json_type,
JSON_TYPE(CAST(b.col as JSON)) as side2_json_type,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._set as JSON))) as side1_json_weightage,
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as side2_json_weightage,
a._set >= b.col as json_compare,
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._set as JSON))) >=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON))) as first_level_validation
from t_set a , jj b
where a._set is not NULL
and b.col is not NULL
and JSON_TYPE(CAST(a._set as JSON))!='BLOB'
and JSON_TYPE(CAST(b.col as JSON))!='BLOB'
and ((a._set >= b.col) != (
GET_JSON_WEIGHT(JSON_TYPE(CAST(a._set as JSON)))
>=
GET_JSON_WEIGHT(JSON_TYPE(CAST(b.col as JSON)))
));
|