diff --git a/data/files/decimal64table.csv b/data/files/decimal64table.csv new file mode 100644 index 0000000000..1038ddfca6 --- /dev/null +++ b/data/files/decimal64table.csv @@ -0,0 +1,1000 @@ +1001,1,101,11 +1002,2,102,12 +1003,3,103,13 +1004,4,104,14 +1005,5,105,15 +1006,6,106,16 +1007,7,107,17 +1008,8,108,18 +1009,9,109,19 +1010,10,110,20 +1011,11,111,21 +1012,12,112,22 +1013,13,113,23 +1014,14,114,24 +1015,15,115,25 +1016,16,116,26 +1017,17,117,27 +1018,18,118,28 +1019,19,119,29 +1020,20,120,30 +1021,21,121,31 +1022,22,122,32 +1023,23,123,33 +1024,24,124,34 +1025,25,125,35 +1026,26,126,36 +1027,27,127,37 +1028,28,128,38 +1029,29,129,39 +1030,30,130,40 +1031,31,131,41 +1032,32,132,42 +1033,33,133,43 +1034,34,134,44 +1035,35,135,45 +1036,36,136,46 +1037,37,137,47 +1038,38,138,48 +1039,39,139,49 +1040,40,140,50 +1041,41,141,51 +1042,42,142,52 +1043,43,143,53 +1044,44,144,54 +1045,45,145,55 +1046,46,146,56 +1047,47,147,57 +1048,48,148,58 +1049,49,149,59 +1050,50,150,60 +1051,51,151,61 +1052,52,152,62 +1053,53,153,63 +1054,54,154,64 +1055,55,155,65 +1056,56,156,66 +1057,57,157,67 +1058,58,158,68 +1059,59,159,69 +1060,60,160,70 +1061,61,161,71 +1062,62,162,72 +1063,63,163,73 +1064,64,164,74 +1065,65,165,75 +1066,66,166,76 +1067,67,167,77 +1068,68,168,78 +1069,69,169,79 +1070,70,170,80 +1071,71,171,81 +1072,72,172,82 +1073,73,173,83 +1074,74,174,84 +1075,75,175,85 +1076,76,176,86 +1077,77,177,87 +1078,78,178,88 +1079,79,179,89 +1080,80,180,90 +1081,81,181,91 +1082,82,182,92 +1083,83,183,93 +1084,84,184,94 +1085,85,185,95 +1086,86,186,96 +1087,87,187,97 +1088,88,188,98 +1089,89,189,99 +1090,90,190,100 +1091,91,191,101 +1092,92,192,102 +1093,93,193,103 +1094,94,194,104 +1095,95,195,105 +1096,96,196,106 +1097,97,197,107 +1098,98,198,108 +1099,99,199,109 +1100,100,200,110 +1101,101,201,111 +1102,102,202,112 +1103,103,203,113 +1104,104,204,114 +1105,105,205,115 +1106,106,206,116 +1107,107,207,117 +1108,108,208,118 +1109,109,209,119 +1110,110,210,120 +1111,111,211,121 +1112,112,212,122 +1113,113,213,123 +1114,114,214,124 +1115,115,215,125 +1116,116,216,126 +1117,117,217,127 +1118,118,218,128 +1119,119,219,129 +1120,120,220,130 +1121,121,221,131 +1122,122,222,132 +1123,123,223,133 +1124,124,224,134 +1125,125,225,135 +1126,126,226,136 +1127,127,227,137 +1128,128,228,138 +1129,129,229,139 +1130,130,230,140 +1131,131,231,141 +1132,132,232,142 +1133,133,233,143 +1134,134,234,144 +1135,135,235,145 +1136,136,236,146 +1137,137,237,147 +1138,138,238,148 +1139,139,239,149 +1140,140,240,150 +1141,141,241,151 +1142,142,242,152 +1143,143,243,153 +1144,144,244,154 +1145,145,245,155 +1146,146,246,156 +1147,147,247,157 +1148,148,248,158 +1149,149,249,159 +1150,150,250,160 +1151,151,251,161 +1152,152,252,162 +1153,153,253,163 +1154,154,254,164 +1155,155,255,165 +1156,156,256,166 +1157,157,257,167 +1158,158,258,168 +1159,159,259,169 +1160,160,260,170 +1161,161,261,171 +1162,162,262,172 +1163,163,263,173 +1164,164,264,174 +1165,165,265,175 +1166,166,266,176 +1167,167,267,177 +1168,168,268,178 +1169,169,269,179 +1170,170,270,180 +1171,171,271,181 +1172,172,272,182 +1173,173,273,183 +1174,174,274,184 +1175,175,275,185 +1176,176,276,186 +1177,177,277,187 +1178,178,278,188 +1179,179,279,189 +1180,180,280,190 +1181,181,281,191 +1182,182,282,192 +1183,183,283,193 +1184,184,284,194 +1185,185,285,195 +1186,186,286,196 +1187,187,287,197 +1188,188,288,198 +1189,189,289,199 +1190,190,290,200 +1191,191,291,201 +1192,192,292,202 +1193,193,293,203 +1194,194,294,204 +1195,195,295,205 +1196,196,296,206 +1197,197,297,207 +1198,198,298,208 +1199,199,299,209 +1200,200,300,210 +1201,201,301,211 +1202,202,302,212 +1203,203,303,213 +1204,204,304,214 +1205,205,305,215 +1206,206,306,216 +1207,207,307,217 +1208,208,308,218 +1209,209,309,219 +1210,210,310,220 +1211,211,311,221 +1212,212,312,222 +1213,213,313,223 +1214,214,314,224 +1215,215,315,225 +1216,216,316,226 +1217,217,317,227 +1218,218,318,228 +1219,219,319,229 +1220,220,320,230 +1221,221,321,231 +1222,222,322,232 +1223,223,323,233 +1224,224,324,234 +1225,225,325,235 +1226,226,326,236 +1227,227,327,237 +1228,228,328,238 +1229,229,329,239 +1230,230,330,240 +1231,231,331,241 +1232,232,332,242 +1233,233,333,243 +1234,234,334,244 +1235,235,335,245 +1236,236,336,246 +1237,237,337,247 +1238,238,338,248 +1239,239,339,249 +1240,240,340,250 +1241,241,341,251 +1242,242,342,252 +1243,243,343,253 +1244,244,344,254 +1245,245,345,255 +1246,246,346,256 +1247,247,347,257 +1248,248,348,258 +1249,249,349,259 +1250,250,350,260 +1251,251,351,261 +1252,252,352,262 +1253,253,353,263 +1254,254,354,264 +1255,255,355,265 +1256,256,356,266 +1257,257,357,267 +1258,258,358,268 +1259,259,359,269 +1260,260,360,270 +1261,261,361,271 +1262,262,362,272 +1263,263,363,273 +1264,264,364,274 +1265,265,365,275 +1266,266,366,276 +1267,267,367,277 +1268,268,368,278 +1269,269,369,279 +1270,270,370,280 +1271,271,371,281 +1272,272,372,282 +1273,273,373,283 +1274,274,374,284 +1275,275,375,285 +1276,276,376,286 +1277,277,377,287 +1278,278,378,288 +1279,279,379,289 +1280,280,380,290 +1281,281,381,291 +1282,282,382,292 +1283,283,383,293 +1284,284,384,294 +1285,285,385,295 +1286,286,386,296 +1287,287,387,297 +1288,288,388,298 +1289,289,389,299 +1290,290,390,300 +1291,291,391,301 +1292,292,392,302 +1293,293,393,303 +1294,294,394,304 +1295,295,395,305 +1296,296,396,306 +1297,297,397,307 +1298,298,398,308 +1299,299,399,309 +1300,300,400,310 +1301,301,401,311 +1302,302,402,312 +1303,303,403,313 +1304,304,404,314 +1305,305,405,315 +1306,306,406,316 +1307,307,407,317 +1308,308,408,318 +1309,309,409,319 +1310,310,410,320 +1311,311,411,321 +1312,312,412,322 +1313,313,413,323 +1314,314,414,324 +1315,315,415,325 +1316,316,416,326 +1317,317,417,327 +1318,318,418,328 +1319,319,419,329 +1320,320,420,330 +1321,321,421,331 +1322,322,422,332 +1323,323,423,333 +1324,324,424,334 +1325,325,425,335 +1326,326,426,336 +1327,327,427,337 +1328,328,428,338 +1329,329,429,339 +1330,330,430,340 +1331,331,431,341 +1332,332,432,342 +1333,333,433,343 +1334,334,434,344 +1335,335,435,345 +1336,336,436,346 +1337,337,437,347 +1338,338,438,348 +1339,339,439,349 +1340,340,440,350 +1341,341,441,351 +1342,342,442,352 +1343,343,443,353 +1344,344,444,354 +1345,345,445,355 +1346,346,446,356 +1347,347,447,357 +1348,348,448,358 +1349,349,449,359 +1350,350,450,360 +1351,351,451,361 +1352,352,452,362 +1353,353,453,363 +1354,354,454,364 +1355,355,455,365 +1356,356,456,366 +1357,357,457,367 +1358,358,458,368 +1359,359,459,369 +1360,360,460,370 +1361,361,461,371 +1362,362,462,372 +1363,363,463,373 +1364,364,464,374 +1365,365,465,375 +1366,366,466,376 +1367,367,467,377 +1368,368,468,378 +1369,369,469,379 +1370,370,470,380 +1371,371,471,381 +1372,372,472,382 +1373,373,473,383 +1374,374,474,384 +1375,375,475,385 +1376,376,476,386 +1377,377,477,387 +1378,378,478,388 +1379,379,479,389 +1380,380,480,390 +1381,381,481,391 +1382,382,482,392 +1383,383,483,393 +1384,384,484,394 +1385,385,485,395 +1386,386,486,396 +1387,387,487,397 +1388,388,488,398 +1389,389,489,399 +1390,390,490,400 +1391,391,491,401 +1392,392,492,402 +1393,393,493,403 +1394,394,494,404 +1395,395,495,405 +1396,396,496,406 +1397,397,497,407 +1398,398,498,408 +1399,399,499,409 +1400,400,500,410 +1401,401,501,411 +1402,402,502,412 +1403,403,503,413 +1404,404,504,414 +1405,405,505,415 +1406,406,506,416 +1407,407,507,417 +1408,408,508,418 +1409,409,509,419 +1410,410,510,420 +1411,411,511,421 +1412,412,512,422 +1413,413,513,423 +1414,414,514,424 +1415,415,515,425 +1416,416,516,426 +1417,417,517,427 +1418,418,518,428 +1419,419,519,429 +1420,420,520,430 +1421,421,521,431 +1422,422,522,432 +1423,423,523,433 +1424,424,524,434 +1425,425,525,435 +1426,426,526,436 +1427,427,527,437 +1428,428,528,438 +1429,429,529,439 +1430,430,530,440 +1431,431,531,441 +1432,432,532,442 +1433,433,533,443 +1434,434,534,444 +1435,435,535,445 +1436,436,536,446 +1437,437,537,447 +1438,438,538,448 +1439,439,539,449 +1440,440,540,450 +1441,441,541,451 +1442,442,542,452 +1443,443,543,453 +1444,444,544,454 +1445,445,545,455 +1446,446,546,456 +1447,447,547,457 +1448,448,548,458 +1449,449,549,459 +1450,450,550,460 +1451,451,551,461 +1452,452,552,462 +1453,453,553,463 +1454,454,554,464 +1455,455,555,465 +1456,456,556,466 +1457,457,557,467 +1458,458,558,468 +1459,459,559,469 +1460,460,560,470 +1461,461,561,471 +1462,462,562,472 +1463,463,563,473 +1464,464,564,474 +1465,465,565,475 +1466,466,566,476 +1467,467,567,477 +1468,468,568,478 +1469,469,569,479 +1470,470,570,480 +1471,471,571,481 +1472,472,572,482 +1473,473,573,483 +1474,474,574,484 +1475,475,575,485 +1476,476,576,486 +1477,477,577,487 +1478,478,578,488 +1479,479,579,489 +1480,480,580,490 +1481,481,581,491 +1482,482,582,492 +1483,483,583,493 +1484,484,584,494 +1485,485,585,495 +1486,486,586,496 +1487,487,587,497 +1488,488,588,498 +1489,489,589,499 +1490,490,590,500 +1491,491,591,501 +1492,492,592,502 +1493,493,593,503 +1494,494,594,504 +1495,495,595,505 +1496,496,596,506 +1497,497,597,507 +1498,498,598,508 +1499,499,599,509 +1500,500,600,510 +1501,501,601,511 +1502,502,602,512 +1503,503,603,513 +1504,504,604,514 +1505,505,605,515 +1506,506,606,516 +1507,507,607,517 +1508,508,608,518 +1509,509,609,519 +1510,510,610,520 +1511,511,611,521 +1512,512,612,522 +1513,513,613,523 +1514,514,614,524 +1515,515,615,525 +1516,516,616,526 +1517,517,617,527 +1518,518,618,528 +1519,519,619,529 +1520,520,620,530 +1521,521,621,531 +1522,522,622,532 +1523,523,623,533 +1524,524,624,534 +1525,525,625,535 +1526,526,626,536 +1527,527,627,537 +1528,528,628,538 +1529,529,629,539 +1530,530,630,540 +1531,531,631,541 +1532,532,632,542 +1533,533,633,543 +1534,534,634,544 +1535,535,635,545 +1536,536,636,546 +1537,537,637,547 +1538,538,638,548 +1539,539,639,549 +1540,540,640,550 +1541,541,641,551 +1542,542,642,552 +1543,543,643,553 +1544,544,644,554 +1545,545,645,555 +1546,546,646,556 +1547,547,647,557 +1548,548,648,558 +1549,549,649,559 +1550,550,650,560 +1551,551,651,561 +1552,552,652,562 +1553,553,653,563 +1554,554,654,564 +1555,555,655,565 +1556,556,656,566 +1557,557,657,567 +1558,558,658,568 +1559,559,659,569 +1560,560,660,570 +1561,561,661,571 +1562,562,662,572 +1563,563,663,573 +1564,564,664,574 +1565,565,665,575 +1566,566,666,576 +1567,567,667,577 +1568,568,668,578 +1569,569,669,579 +1570,570,670,580 +1571,571,671,581 +1572,572,672,582 +1573,573,673,583 +1574,574,674,584 +1575,575,675,585 +1576,576,676,586 +1577,577,677,587 +1578,578,678,588 +1579,579,679,589 +1580,580,680,590 +1581,581,681,591 +1582,582,682,592 +1583,583,683,593 +1584,584,684,594 +1585,585,685,595 +1586,586,686,596 +1587,587,687,597 +1588,588,688,598 +1589,589,689,599 +1590,590,690,600 +1591,591,691,601 +1592,592,692,602 +1593,593,693,603 +1594,594,694,604 +1595,595,695,605 +1596,596,696,606 +1597,597,697,607 +1598,598,698,608 +1599,599,699,609 +1600,600,700,610 +1601,601,701,611 +1602,602,702,612 +1603,603,703,613 +1604,604,704,614 +1605,605,705,615 +1606,606,706,616 +1607,607,707,617 +1608,608,708,618 +1609,609,709,619 +1610,610,710,620 +1611,611,711,621 +1612,612,712,622 +1613,613,713,623 +1614,614,714,624 +1615,615,715,625 +1616,616,716,626 +1617,617,717,627 +1618,618,718,628 +1619,619,719,629 +1620,620,720,630 +1621,621,721,631 +1622,622,722,632 +1623,623,723,633 +1624,624,724,634 +1625,625,725,635 +1626,626,726,636 +1627,627,727,637 +1628,628,728,638 +1629,629,729,639 +1630,630,730,640 +1631,631,731,641 +1632,632,732,642 +1633,633,733,643 +1634,634,734,644 +1635,635,735,645 +1636,636,736,646 +1637,637,737,647 +1638,638,738,648 +1639,639,739,649 +1640,640,740,650 +1641,641,741,651 +1642,642,742,652 +1643,643,743,653 +1644,644,744,654 +1645,645,745,655 +1646,646,746,656 +1647,647,747,657 +1648,648,748,658 +1649,649,749,659 +1650,650,750,660 +1651,651,751,661 +1652,652,752,662 +1653,653,753,663 +1654,654,754,664 +1655,655,755,665 +1656,656,756,666 +1657,657,757,667 +1658,658,758,668 +1659,659,759,669 +1660,660,760,670 +1661,661,761,671 +1662,662,762,672 +1663,663,763,673 +1664,664,764,674 +1665,665,765,675 +1666,666,766,676 +1667,667,767,677 +1668,668,768,678 +1669,669,769,679 +1670,670,770,680 +1671,671,771,681 +1672,672,772,682 +1673,673,773,683 +1674,674,774,684 +1675,675,775,685 +1676,676,776,686 +1677,677,777,687 +1678,678,778,688 +1679,679,779,689 +1680,680,780,690 +1681,681,781,691 +1682,682,782,692 +1683,683,783,693 +1684,684,784,694 +1685,685,785,695 +1686,686,786,696 +1687,687,787,697 +1688,688,788,698 +1689,689,789,699 +1690,690,790,700 +1691,691,791,701 +1692,692,792,702 +1693,693,793,703 +1694,694,794,704 +1695,695,795,705 +1696,696,796,706 +1697,697,797,707 +1698,698,798,708 +1699,699,799,709 +1700,700,800,710 +1701,701,801,711 +1702,702,802,712 +1703,703,803,713 +1704,704,804,714 +1705,705,805,715 +1706,706,806,716 +1707,707,807,717 +1708,708,808,718 +1709,709,809,719 +1710,710,810,720 +1711,711,811,721 +1712,712,812,722 +1713,713,813,723 +1714,714,814,724 +1715,715,815,725 +1716,716,816,726 +1717,717,817,727 +1718,718,818,728 +1719,719,819,729 +1720,720,820,730 +1721,721,821,731 +1722,722,822,732 +1723,723,823,733 +1724,724,824,734 +1725,725,825,735 +1726,726,826,736 +1727,727,827,737 +1728,728,828,738 +1729,729,829,739 +1730,730,830,740 +1731,731,831,741 +1732,732,832,742 +1733,733,833,743 +1734,734,834,744 +1735,735,835,745 +1736,736,836,746 +1737,737,837,747 +1738,738,838,748 +1739,739,839,749 +1740,740,840,750 +1741,741,841,751 +1742,742,842,752 +1743,743,843,753 +1744,744,844,754 +1745,745,845,755 +1746,746,846,756 +1747,747,847,757 +1748,748,848,758 +1749,749,849,759 +1750,750,850,760 +1751,751,851,761 +1752,752,852,762 +1753,753,853,763 +1754,754,854,764 +1755,755,855,765 +1756,756,856,766 +1757,757,857,767 +1758,758,858,768 +1759,759,859,769 +1760,760,860,770 +1761,761,861,771 +1762,762,862,772 +1763,763,863,773 +1764,764,864,774 +1765,765,865,775 +1766,766,866,776 +1767,767,867,777 +1768,768,868,778 +1769,769,869,779 +1770,770,870,780 +1771,771,871,781 +1772,772,872,782 +1773,773,873,783 +1774,774,874,784 +1775,775,875,785 +1776,776,876,786 +1777,777,877,787 +1778,778,878,788 +1779,779,879,789 +1780,780,880,790 +1781,781,881,791 +1782,782,882,792 +1783,783,883,793 +1784,784,884,794 +1785,785,885,795 +1786,786,886,796 +1787,787,887,797 +1788,788,888,798 +1789,789,889,799 +1790,790,890,800 +1791,791,891,801 +1792,792,892,802 +1793,793,893,803 +1794,794,894,804 +1795,795,895,805 +1796,796,896,806 +1797,797,897,807 +1798,798,898,808 +1799,799,899,809 +1800,800,900,810 +1801,801,901,811 +1802,802,902,812 +1803,803,903,813 +1804,804,904,814 +1805,805,905,815 +1806,806,906,816 +1807,807,907,817 +1808,808,908,818 +1809,809,909,819 +1810,810,910,820 +1811,811,911,821 +1812,812,912,822 +1813,813,913,823 +1814,814,914,824 +1815,815,915,825 +1816,816,916,826 +1817,817,917,827 +1818,818,918,828 +1819,819,919,829 +1820,820,920,830 +1821,821,921,831 +1822,822,922,832 +1823,823,923,833 +1824,824,924,834 +1825,825,925,835 +1826,826,926,836 +1827,827,927,837 +1828,828,928,838 +1829,829,929,839 +1830,830,930,840 +1831,831,931,841 +1832,832,932,842 +1833,833,933,843 +1834,834,934,844 +1835,835,935,845 +1836,836,936,846 +1837,837,937,847 +1838,838,938,848 +1839,839,939,849 +1840,840,940,850 +1841,841,941,851 +1842,842,942,852 +1843,843,943,853 +1844,844,944,854 +1845,845,945,855 +1846,846,946,856 +1847,847,947,857 +1848,848,948,858 +1849,849,949,859 +1850,850,950,860 +1851,851,951,861 +1852,852,952,862 +1853,853,953,863 +1854,854,954,864 +1855,855,955,865 +1856,856,956,866 +1857,857,957,867 +1858,858,958,868 +1859,859,959,869 +1860,860,960,870 +1861,861,961,871 +1862,862,962,872 +1863,863,963,873 +1864,864,964,874 +1865,865,965,875 +1866,866,966,876 +1867,867,967,877 +1868,868,968,878 +1869,869,969,879 +1870,870,970,880 +1871,871,971,881 +1872,872,972,882 +1873,873,973,883 +1874,874,974,884 +1875,875,975,885 +1876,876,976,886 +1877,877,977,887 +1878,878,978,888 +1879,879,979,889 +1880,880,980,890 +1881,881,981,891 +1882,882,982,892 +1883,883,983,893 +1884,884,984,894 +1885,885,985,895 +1886,886,986,896 +1887,887,987,897 +1888,888,988,898 +1889,889,989,899 +1890,890,990,900 +1891,891,991,901 +1892,892,992,902 +1893,893,993,903 +1894,894,994,904 +1895,895,995,905 +1896,896,996,906 +1897,897,997,907 +1898,898,998,908 +1899,899,999,909 +1900,900,1000,910 +1901,901,1001,911 +1902,902,1002,912 +1903,903,1003,913 +1904,904,1004,914 +1905,905,1005,915 +1906,906,1006,916 +1907,907,1007,917 +1908,908,1008,918 +1909,909,1009,919 +1910,910,1010,920 +1911,911,1011,921 +1912,912,1012,922 +1913,913,1013,923 +1914,914,1014,924 +1915,915,1015,925 +1916,916,1016,926 +1917,917,1017,927 +1918,918,1018,928 +1919,919,1019,929 +1920,920,1020,930 +1921,921,1021,931 +1922,922,1022,932 +1923,923,1023,933 +1924,924,1024,934 +1925,925,1025,935 +1926,926,1026,936 +1927,927,1027,937 +1928,928,1028,938 +1929,929,1029,939 +1930,930,1030,940 +1931,931,1031,941 +1932,932,1032,942 +1933,933,1033,943 +1934,934,1034,944 +1935,935,1035,945 +1936,936,1036,946 +1937,937,1037,947 +1938,938,1038,948 +1939,939,1039,949 +1940,940,1040,950 +1941,941,1041,951 +1942,942,1042,952 +1943,943,1043,953 +1944,944,1044,954 +1945,945,1045,955 +1946,946,1046,956 +1947,947,1047,957 +1948,948,1048,958 +1949,949,1049,959 +1950,950,1050,960 +1951,951,1051,961 +1952,952,1052,962 +1953,953,1053,963 +1954,954,1054,964 +1955,955,1055,965 +1956,956,1056,966 +1957,957,1057,967 +1958,958,1058,968 +1959,959,1059,969 +1960,960,1060,970 +1961,961,1061,971 +1962,962,1062,972 +1963,963,1063,973 +1964,964,1064,974 +1965,965,1065,975 +1966,966,1066,976 +1967,967,1067,977 +1968,968,1068,978 +1969,969,1069,979 +1970,970,1070,980 +1971,971,1071,981 +1972,972,1072,982 +1973,973,1073,983 +1974,974,1074,984 +1975,975,1075,985 +1976,976,1076,986 +1977,977,1077,987 +1978,978,1078,988 +1979,979,1079,989 +1980,980,1080,990 +1981,981,1081,991 +1982,982,1082,992 +1983,983,1083,993 +1984,984,1084,994 +1985,985,1085,995 +1986,986,1086,996 +1987,987,1087,997 +1988,988,1088,998 +1989,989,1089,999 +1990,990,1090,1000 +1991,991,1091,1001 +1992,992,1092,1002 +1993,993,1093,1003 +1994,994,1094,1004 +1995,995,1095,1005 +1996,996,1096,1006 +1997,997,1097,1007 +1998,998,1098,1008 +1999,999,1099,1009 +2000,1000,1100,1010 diff --git a/itests/hive-jmh/src/main/java/org/apache/hive/benchmark/vectorization/AbstractExpression.java b/itests/hive-jmh/src/main/java/org/apache/hive/benchmark/vectorization/AbstractExpression.java index b23d0718a4..3bf3cd65e7 100644 --- a/itests/hive-jmh/src/main/java/org/apache/hive/benchmark/vectorization/AbstractExpression.java +++ b/itests/hive-jmh/src/main/java/org/apache/hive/benchmark/vectorization/AbstractExpression.java @@ -20,6 +20,7 @@ import org.apache.hadoop.hive.ql.exec.vector.ColumnVector; import org.apache.hadoop.hive.ql.exec.vector.DoubleColumnVector; import org.apache.hadoop.hive.ql.exec.vector.LongColumnVector; +import org.apache.hadoop.hive.ql.exec.vector.Decimal64ColumnVector; import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch; import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression; import org.apache.hadoop.hive.ql.metadata.HiveException; @@ -166,4 +167,13 @@ protected BytesColumnVector getBytesColumnVector() { } return columnVector; } + + protected Decimal64ColumnVector getDecimal64ColumnVector() { + Decimal64ColumnVector columnVector = new Decimal64ColumnVector(VectorizedRowBatch.DEFAULT_SIZE,10,2); + Random random = new Random(); + for (int i = 0; i != VectorizedRowBatch.DEFAULT_SIZE; i++) { + columnVector.vector[i] = random.nextLong()%(1_000_000_000_0L - 1); + } + return columnVector; + } } diff --git a/itests/hive-jmh/src/main/java/org/apache/hive/benchmark/vectorization/VectorizedArithmeticBench.java b/itests/hive-jmh/src/main/java/org/apache/hive/benchmark/vectorization/VectorizedArithmeticBench.java index 70ee9b7ddb..be4f1ff198 100644 --- a/itests/hive-jmh/src/main/java/org/apache/hive/benchmark/vectorization/VectorizedArithmeticBench.java +++ b/itests/hive-jmh/src/main/java/org/apache/hive/benchmark/vectorization/VectorizedArithmeticBench.java @@ -15,12 +15,15 @@ import org.apache.hadoop.hive.ql.exec.vector.DoubleColumnVector; import org.apache.hadoop.hive.ql.exec.vector.LongColumnVector; +import org.apache.hadoop.hive.ql.exec.vector.Decimal64ColumnVector; import org.apache.hadoop.hive.ql.exec.vector.expressions.LongColDivideLongColumn; import org.apache.hadoop.hive.ql.exec.vector.expressions.gen.DoubleColAddDoubleColumn; import org.apache.hadoop.hive.ql.exec.vector.expressions.gen.DoubleColDivideDoubleColumn; import org.apache.hadoop.hive.ql.exec.vector.expressions.gen.LongColAddLongColumn; import org.apache.hadoop.hive.ql.exec.vector.expressions.gen.LongColAddLongColumnChecked; +import org.apache.hadoop.hive.ql.exec.vector.expressions.gen.Decimal64ColDivideDecimal64Scalar; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory; +import org.apache.hadoop.hive.serde2.typeinfo.DecimalTypeInfo; import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.State; import org.openjdk.jmh.runner.Runner; @@ -126,6 +129,20 @@ public void setup() { } } + public static class Decimal64ColDivideDecimal64ScalarBench extends AbstractExpression { + @Override + public void setup() { + int prec1 = 10, prec2 = 2, scale1 = 2, scale2 = 1; + rowBatch = buildRowBatch(new Decimal64ColumnVector(prec1,scale1), 1, getDecimal64ColumnVector()); + expression = new Decimal64ColDivideDecimal64Scalar(0, 200, 1); + expression.setInputTypeInfos(new DecimalTypeInfo(prec1,scale1),new DecimalTypeInfo(prec2,scale2)); + int intDig = prec1 - scale1 + scale2; + int scale = Math.max(6, scale1 + prec2 + 1); + int prec = intDig + scale; + expression.setOutputTypeInfo(new DecimalTypeInfo(prec,scale)); + } + } + public static void main(String[] args) throws RunnerException { Options opt = new OptionsBuilder().include(".*" + VectorizedArithmeticBench.class.getSimpleName() + ".*").build(); diff --git a/itests/src/test/resources/testconfiguration.properties b/itests/src/test/resources/testconfiguration.properties index eb7bcabe60..a3aad4233e 100644 --- a/itests/src/test/resources/testconfiguration.properties +++ b/itests/src/test/resources/testconfiguration.properties @@ -257,6 +257,7 @@ minillaplocal.shared.query.files=alter_merge_2_orc.q,\ vector_count_distinct.q,\ vector_data_types.q,\ vector_date_1.q,\ + vector_decimal64_div_decimal64scalar.q,\ vector_decimal_1.q,\ vector_decimal_10_0.q,\ vector_decimal_2.q,\ diff --git a/ql/src/gen/vectorization/ExpressionTemplates/Decimal64ColumnDivideDecimal64Scalar.txt b/ql/src/gen/vectorization/ExpressionTemplates/Decimal64ColumnDivideDecimal64Scalar.txt new file mode 100644 index 0000000000..0ced4da50e --- /dev/null +++ b/ql/src/gen/vectorization/ExpressionTemplates/Decimal64ColumnDivideDecimal64Scalar.txt @@ -0,0 +1,238 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.exec.vector.expressions.gen; + +import java.util.Arrays; + +import org.apache.hadoop.hive.ql.exec.vector.Decimal64ColumnVector; +import org.apache.hadoop.hive.ql.exec.vector.VectorExpressionDescriptor; +import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch; +import org.apache.hadoop.hive.ql.exec.vector.expressions.Decimal64Util; +import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression; +import org.apache.hadoop.hive.serde2.io.HiveDecimalWritable; +import org.apache.hadoop.hive.serde2.typeinfo.DecimalTypeInfo; +import org.apache.hadoop.hive.ql.metadata.HiveException; + +/** + * Generated from template Decimal64ColumnDivideDecimal64Scalar.txt, which covers decimal64 arithmetic + * expressions between a column and a scalar. + */ +public class extends VectorExpression { + + private static final long serialVersionUID = 1L; + + private static final long[] powerOfTenTable = { + 1L, // 0 + 10L, + 100L, + 1000L, + 10000L, + 100000L, + 1000000L, + 10000000L, + 100000000L, // 8 + 1000000000L, + 10000000000L, + 100000000000L, + 1000000000000L, + 10000000000000L, + 100000000000000L, + 1000000000000000L, + 10000000000000000L, // 16 + 100000000000000000L, + 1000000000000000000L, // 18 + }; + + private final int colNum; + private final long value; + + public (int colNum, long value, int outputColumnNum) { + super(outputColumnNum); + this.colNum = colNum; + this.value = value; + } + + public () { + super(); + + // Dummy final assignments. + colNum = -1; + value = 0; + } + + @Override + public void evaluate(VectorizedRowBatch batch) throws HiveException { + + // return immediately if batch is empty + final int n = batch.size; + if (n == 0) { + return; + } + + if (childExpressions != null) { + super.evaluateChildren(batch); + } + + Decimal64ColumnVector inputColVector = (Decimal64ColumnVector) batch.cols[colNum]; + Decimal64ColumnVector outputColVector = (Decimal64ColumnVector) batch.cols[outputColumnNum]; + int[] sel = batch.selected; + boolean[] inputIsNull = inputColVector.isNull; + boolean[] outputIsNull = outputColVector.isNull; + + // We do not need to do a column reset since we are carefully changing the output. + outputColVector.isRepeating = false; + + long[] vector = inputColVector.vector; + long[] outputVector = outputColVector.vector; + + final long outputDecimal64AbsMax = + HiveDecimalWritable.getDecimal64AbsMax(outputColVector.precision); + int outputScale = ((DecimalTypeInfo) outputTypeInfo).scale(); + + + if (inputColVector.isRepeating) { + if (inputColVector.noNulls || !inputIsNull[0]) { + outputIsNull[0] = false; + // The following may override a "false" null setting if an error or overflow occurs. + final long result = (vector[0] * powerOfTenTable[outputScale]) / value; + if (Math.abs(result) > outputDecimal64AbsMax) { + outputIsNull[0] = true; + outputColVector.noNulls = false; + } else { + outputVector[0] = result; + } + } else { + outputIsNull[0] = true; + outputColVector.noNulls = false; + } + outputColVector.isRepeating = true; + return; + } + + if (inputColVector.noNulls) { + if (batch.selectedInUse) { + + // CONSIDER: For large n, fill n or all of isNull array and use the tighter ELSE loop. + + if (!outputColVector.noNulls) { + for(int j = 0; j != n; j++) { + final int i = sel[j]; + outputIsNull[i] = false; + final long result = (vector[i] * powerOfTenTable[outputScale]) / value; + outputVector[i] = result; + if (Math.abs(result) > outputDecimal64AbsMax) { + outputColVector.noNulls = false; + outputIsNull[i] = true; + } + } + } else { + for(int j = 0; j != n; j++) { + final int i = sel[j]; + final long result = (vector[i] * powerOfTenTable[outputScale]) / value; + outputVector[i] = result; + if (Math.abs(result) > outputDecimal64AbsMax) { + outputColVector.noNulls = false; + outputIsNull[i] = true; + } + } + } + } else { + if (!outputColVector.noNulls) { + + // Assume it is almost always a performance win to fill all of isNull so we can + // safely reset noNulls. + Arrays.fill(outputIsNull, false); + outputColVector.noNulls = true; + } + for(int i = 0; i != n; i++) { + final long result = (vector[i] * powerOfTenTable[outputScale]) / value; + outputVector[i] = result; + if (Math.abs(result) > outputDecimal64AbsMax) { + outputColVector.noNulls = false; + outputIsNull[i] = true; + } + } + } + } else /* there are NULLs in the inputColVector */ { + + /* + * Do careful maintenance of the outputColVector.noNulls flag. + */ + + if (batch.selectedInUse) { + for(int j = 0; j != n; j++) { + int i = sel[j]; + if (!inputIsNull[i]) { + outputIsNull[i] = false; + // The following may override a "false" null setting if an error or overflow occurs. + final long result = (vector[i] * powerOfTenTable[outputScale]) / value; + outputVector[i] = result; + if (Math.abs(result) > outputDecimal64AbsMax) { + outputIsNull[i] = true; + outputColVector.noNulls = false; + } + } else { + outputIsNull[i] = true; + outputColVector.noNulls = false; + } + } + } else { + System.arraycopy(inputIsNull, 0, outputIsNull, 0, n); + for(int i = 0; i != n; i++) { + if (!inputIsNull[i]) { + outputIsNull[i] = false; + // The following may override a "false" null setting if an error or overflow occurs. + final long result = (vector[i] * powerOfTenTable[outputScale]) / value; + outputVector[i] = result; + if (Math.abs(result) > outputDecimal64AbsMax) { + outputIsNull[i] = true; + outputColVector.noNulls = false; + } + } else { + outputIsNull[i] = true; + outputColVector.noNulls = false; + } + } + } + } + } + + @Override + public String vectorExpressionParameters() { + DecimalTypeInfo decimalTypeInfo = (DecimalTypeInfo) inputTypeInfos[0]; + HiveDecimalWritable writable = new HiveDecimalWritable(); + writable.deserialize64(value, decimalTypeInfo.scale()); + return getColumnParamString(0, colNum) + ", decimal64Val " + value + + ", decimalVal " + writable.toString(); + } + + @Override + public VectorExpressionDescriptor.Descriptor getDescriptor() { + return (new VectorExpressionDescriptor.Builder()) + .setMode( + VectorExpressionDescriptor.Mode.PROJECTION) + .setNumArguments(2) + .setArgumentTypes( + VectorExpressionDescriptor.ArgumentType.DECIMAL_64, + VectorExpressionDescriptor.ArgumentType.DECIMAL_64) + .setInputExpressionTypes( + VectorExpressionDescriptor.InputExpressionType.COLUMN, + VectorExpressionDescriptor.InputExpressionType.SCALAR).build(); + } +} diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java index 8f3291a012..9052dae5db 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java @@ -1781,7 +1781,8 @@ private VectorExpression getDecimal64VectorExpressionForUdf(GenericUDF genericUd if (!isDecimal64ScaleEstablished) { decimal64ColumnScale = returnDecimalTypeInfo.getScale(); isDecimal64ScaleEstablished = true; - } else if (returnDecimalTypeInfo.getScale() != decimal64ColumnScale) { + } else if (returnDecimalTypeInfo.getScale() != decimal64ColumnScale + && !(genericUdf instanceof GenericUDFOPDivide)) { return null; } returnDataTypePhysicalVariation = DataTypePhysicalVariation.DECIMAL_64; diff --git a/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFOPDivide.java b/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFOPDivide.java index cf9e1021a2..a4c2475120 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFOPDivide.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFOPDivide.java @@ -48,7 +48,7 @@ LongScalarDivideLongColumn.class, LongScalarDivideDoubleColumn.class, DoubleScalarDivideLongColumn.class, DoubleScalarDivideDoubleColumn.class, DecimalColDivideDecimalColumn.class, DecimalColDivideDecimalScalar.class, - DecimalScalarDivideDecimalColumn.class}) + DecimalScalarDivideDecimalColumn.class, Decimal64ColDivideDecimal64Scalar.class}) public class GenericUDFOPDivide extends GenericUDFBaseNumeric { public GenericUDFOPDivide() { diff --git a/ql/src/test/queries/clientpositive/vector_decimal64_div_decimal64scalar.q b/ql/src/test/queries/clientpositive/vector_decimal64_div_decimal64scalar.q new file mode 100644 index 0000000000..02c08abb62 --- /dev/null +++ b/ql/src/test/queries/clientpositive/vector_decimal64_div_decimal64scalar.q @@ -0,0 +1,8 @@ +create external table cdpd4378(ss_ext_list_price decimal(7,2), ss_ext_wholesale_cost decimal(7,2), ss_ext_discount_amt decimal(7,2), ss_ext_sales_price decimal(7,2)) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH '../../data/files/decimal64table.csv' OVERWRITE INTO TABLE cdpd4378; +create table cdpd4378_tmp(ss_ext_list_price decimal(7,2), ss_ext_wholesale_cost decimal(7,2), ss_ext_discount_amt decimal(7,2), ss_ext_sales_price decimal(7,2)) stored as ORC; +insert into table cdpd4378_tmp select * from cdpd4378; +explain vectorization detail select sum(((ss_ext_list_price-ss_ext_wholesale_cost-ss_ext_discount_amt)+ss_ext_sales_price)/2.268767) from cdpd4378_tmp; +select sum(((ss_ext_list_price-ss_ext_wholesale_cost-ss_ext_discount_amt)+ss_ext_sales_price)/2.268767) from cdpd4378_tmp; +explain vectorization detail select sum(((ss_ext_list_price-ss_ext_wholesale_cost-ss_ext_discount_amt)+ss_ext_sales_price)/2.2) from cdpd4378_tmp; +select sum(((ss_ext_list_price-ss_ext_wholesale_cost-ss_ext_discount_amt)+ss_ext_sales_price)/2.2) from cdpd4378_tmp; diff --git a/ql/src/test/results/clientpositive/llap/vector_decimal64_div_decimal64scalar.q.out b/ql/src/test/results/clientpositive/llap/vector_decimal64_div_decimal64scalar.q.out new file mode 100644 index 0000000000..1a21f81d27 --- /dev/null +++ b/ql/src/test/results/clientpositive/llap/vector_decimal64_div_decimal64scalar.q.out @@ -0,0 +1,304 @@ +PREHOOK: query: create external table cdpd4378(ss_ext_list_price decimal(7,2), ss_ext_wholesale_cost decimal(7,2), ss_ext_discount_amt decimal(7,2), ss_ext_sales_price decimal(7,2)) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' STORED AS TEXTFILE +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@cdpd4378 +POSTHOOK: query: create external table cdpd4378(ss_ext_list_price decimal(7,2), ss_ext_wholesale_cost decimal(7,2), ss_ext_discount_amt decimal(7,2), ss_ext_sales_price decimal(7,2)) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' STORED AS TEXTFILE +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@cdpd4378 +PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/decimal64table.csv' OVERWRITE INTO TABLE cdpd4378 +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@cdpd4378 +POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/decimal64table.csv' OVERWRITE INTO TABLE cdpd4378 +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@cdpd4378 +PREHOOK: query: create table cdpd4378_tmp(ss_ext_list_price decimal(7,2), ss_ext_wholesale_cost decimal(7,2), ss_ext_discount_amt decimal(7,2), ss_ext_sales_price decimal(7,2)) stored as ORC +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@cdpd4378_tmp +POSTHOOK: query: create table cdpd4378_tmp(ss_ext_list_price decimal(7,2), ss_ext_wholesale_cost decimal(7,2), ss_ext_discount_amt decimal(7,2), ss_ext_sales_price decimal(7,2)) stored as ORC +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@cdpd4378_tmp +PREHOOK: query: insert into table cdpd4378_tmp select * from cdpd4378 +PREHOOK: type: QUERY +PREHOOK: Input: default@cdpd4378 +PREHOOK: Output: default@cdpd4378_tmp +POSTHOOK: query: insert into table cdpd4378_tmp select * from cdpd4378 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cdpd4378 +POSTHOOK: Output: default@cdpd4378_tmp +POSTHOOK: Lineage: cdpd4378_tmp.ss_ext_discount_amt SIMPLE [(cdpd4378)cdpd4378.FieldSchema(name:ss_ext_discount_amt, type:decimal(7,2), comment:null), ] +POSTHOOK: Lineage: cdpd4378_tmp.ss_ext_list_price SIMPLE [(cdpd4378)cdpd4378.FieldSchema(name:ss_ext_list_price, type:decimal(7,2), comment:null), ] +POSTHOOK: Lineage: cdpd4378_tmp.ss_ext_sales_price SIMPLE [(cdpd4378)cdpd4378.FieldSchema(name:ss_ext_sales_price, type:decimal(7,2), comment:null), ] +POSTHOOK: Lineage: cdpd4378_tmp.ss_ext_wholesale_cost SIMPLE [(cdpd4378)cdpd4378.FieldSchema(name:ss_ext_wholesale_cost, type:decimal(7,2), comment:null), ] +PREHOOK: query: explain vectorization detail select sum(((ss_ext_list_price-ss_ext_wholesale_cost-ss_ext_discount_amt)+ss_ext_sales_price)/2.268767) from cdpd4378_tmp +PREHOOK: type: QUERY +PREHOOK: Input: default@cdpd4378_tmp +#### A masked pattern was here #### +POSTHOOK: query: explain vectorization detail select sum(((ss_ext_list_price-ss_ext_wholesale_cost-ss_ext_discount_amt)+ss_ext_sales_price)/2.268767) from cdpd4378_tmp +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cdpd4378_tmp +#### A masked pattern was here #### +PLAN VECTORIZATION: + enabled: true + enabledConditionsMet: [hive.vectorized.execution.enabled IS true] + +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 depends on stages: Stage-1 + +STAGE PLANS: + Stage: Stage-1 + Tez +#### A masked pattern was here #### + Edges: + Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE) +#### A masked pattern was here #### + Vertices: + Map 1 + Map Operator Tree: + TableScan + alias: cdpd4378_tmp + Statistics: Num rows: 1000 Data size: 448000 Basic stats: COMPLETE Column stats: COMPLETE + TableScan Vectorization: + native: true + vectorizationSchemaColumns: [0:ss_ext_list_price:decimal(7,2)/DECIMAL_64, 1:ss_ext_wholesale_cost:decimal(7,2)/DECIMAL_64, 2:ss_ext_discount_amt:decimal(7,2)/DECIMAL_64, 3:ss_ext_sales_price:decimal(7,2)/DECIMAL_64, 4:ROW__ID:struct] + Select Operator + expressions: ((((ss_ext_list_price - ss_ext_wholesale_cost) - ss_ext_discount_amt) + ss_ext_sales_price) / 2.268767) (type: decimal(24,10)) + outputColumnNames: _col0 + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [8] + selectExpressions: DecimalColDivideDecimalScalar(col 9:decimal(10,2), val 2.268767)(children: ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64)(children: Decimal64ColAddDecimal64Column(col 6:decimal(9,2)/DECIMAL_64, col 3:decimal(7,2)/DECIMAL_64)(children: Decimal64ColSubtractDecimal64Column(col 5:decimal(8,2)/DECIMAL_64, col 2:decimal(7,2)/DECIMAL_64)(children: Decimal64ColSubtractDecimal64Column(col 0:decimal(7,2)/DECIMAL_64, col 1:decimal(7,2)/DECIMAL_64) -> 5:decimal(8,2)/DECIMAL_64) -> 6:decimal(9,2)/DECIMAL_64) -> 7:decimal(10,2)/DECIMAL_64) -> 9:decimal(10,2)) -> 8:decimal(24,10) + Statistics: Num rows: 1000 Data size: 448000 Basic stats: COMPLETE Column stats: COMPLETE + Group By Operator + aggregations: sum(_col0) + Group By Vectorization: + aggregators: VectorUDAFSumDecimal(col 8:decimal(24,10)) -> decimal(34,10) + className: VectorGroupByOperator + groupByMode: HASH + native: false + vectorProcessingMode: HASH + projectedOutputColumnNums: [0] + minReductionHashAggr: 0.99 + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + sort order: + Reduce Sink Vectorization: + className: VectorReduceSinkEmptyKeyOperator + native: true + nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true + valueColumns: 0:decimal(34,10) + Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE + value expressions: _col0 (type: decimal(34,10)) + Execution mode: vectorized, llap + LLAP IO: all inputs + Map Vectorization: + enabled: true + enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true + inputFormatFeatureSupport: [DECIMAL_64] + featureSupportInUse: [DECIMAL_64] + inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat + allNative: false + usesVectorUDFAdaptor: false + vectorized: true + rowBatchContext: + dataColumnCount: 4 + includeColumns: [0, 1, 2, 3] + dataColumns: ss_ext_list_price:decimal(7,2)/DECIMAL_64, ss_ext_wholesale_cost:decimal(7,2)/DECIMAL_64, ss_ext_discount_amt:decimal(7,2)/DECIMAL_64, ss_ext_sales_price:decimal(7,2)/DECIMAL_64 + partitionColumnCount: 0 + scratchColumnTypeNames: [decimal(8,2)/DECIMAL_64, decimal(9,2)/DECIMAL_64, decimal(10,2)/DECIMAL_64, decimal(24,10), decimal(10,2)] + Reducer 2 + Execution mode: vectorized, llap + Reduce Vectorization: + enabled: true + enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true + reduceColumnNullOrder: + reduceColumnSortOrder: + allNative: false + usesVectorUDFAdaptor: false + vectorized: true + rowBatchContext: + dataColumnCount: 1 + dataColumns: VALUE._col0:decimal(34,10) + partitionColumnCount: 0 + scratchColumnTypeNames: [] + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + Group By Vectorization: + aggregators: VectorUDAFSumDecimal(col 0:decimal(34,10)) -> decimal(34,10) + className: VectorGroupByOperator + groupByMode: MERGEPARTIAL + native: false + vectorProcessingMode: GLOBAL + projectedOutputColumnNums: [0] + mode: mergepartial + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE + File Output Operator + compressed: false + File Sink Vectorization: + className: VectorFileSinkOperator + native: false + Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + +PREHOOK: query: select sum(((ss_ext_list_price-ss_ext_wholesale_cost-ss_ext_discount_amt)+ss_ext_sales_price)/2.268767) from cdpd4378_tmp +PREHOOK: type: QUERY +PREHOOK: Input: default@cdpd4378_tmp +#### A masked pattern was here #### +POSTHOOK: query: select sum(((ss_ext_list_price-ss_ext_wholesale_cost-ss_ext_discount_amt)+ss_ext_sales_price)/2.268767) from cdpd4378_tmp +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cdpd4378_tmp +#### A masked pattern was here #### +401098.9228951000 +PREHOOK: query: explain vectorization detail select sum(((ss_ext_list_price-ss_ext_wholesale_cost-ss_ext_discount_amt)+ss_ext_sales_price)/2.2) from cdpd4378_tmp +PREHOOK: type: QUERY +PREHOOK: Input: default@cdpd4378_tmp +#### A masked pattern was here #### +POSTHOOK: query: explain vectorization detail select sum(((ss_ext_list_price-ss_ext_wholesale_cost-ss_ext_discount_amt)+ss_ext_sales_price)/2.2) from cdpd4378_tmp +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cdpd4378_tmp +#### A masked pattern was here #### +PLAN VECTORIZATION: + enabled: true + enabledConditionsMet: [hive.vectorized.execution.enabled IS true] + +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 depends on stages: Stage-1 + +STAGE PLANS: + Stage: Stage-1 + Tez +#### A masked pattern was here #### + Edges: + Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE) +#### A masked pattern was here #### + Vertices: + Map 1 + Map Operator Tree: + TableScan + alias: cdpd4378_tmp + Statistics: Num rows: 1000 Data size: 448000 Basic stats: COMPLETE Column stats: COMPLETE + TableScan Vectorization: + native: true + vectorizationSchemaColumns: [0:ss_ext_list_price:decimal(7,2)/DECIMAL_64, 1:ss_ext_wholesale_cost:decimal(7,2)/DECIMAL_64, 2:ss_ext_discount_amt:decimal(7,2)/DECIMAL_64, 3:ss_ext_sales_price:decimal(7,2)/DECIMAL_64, 4:ROW__ID:struct] + Select Operator + expressions: ((((ss_ext_list_price - ss_ext_wholesale_cost) - ss_ext_discount_amt) + ss_ext_sales_price) / 2.2) (type: decimal(15,6)) + outputColumnNames: _col0 + Select Vectorization: + className: VectorSelectOperator + native: true + projectedOutputColumnNums: [8] + selectExpressions: Decimal64ColDivideDecimal64Scalar(col 7:decimal(10,2)/DECIMAL_64, decimal64Val 220, decimalVal 2.2)(children: Decimal64ColAddDecimal64Column(col 6:decimal(9,2)/DECIMAL_64, col 3:decimal(7,2)/DECIMAL_64)(children: Decimal64ColSubtractDecimal64Column(col 5:decimal(8,2)/DECIMAL_64, col 2:decimal(7,2)/DECIMAL_64)(children: Decimal64ColSubtractDecimal64Column(col 0:decimal(7,2)/DECIMAL_64, col 1:decimal(7,2)/DECIMAL_64) -> 5:decimal(8,2)/DECIMAL_64) -> 6:decimal(9,2)/DECIMAL_64) -> 7:decimal(10,2)/DECIMAL_64) -> 8:decimal(15,6)/DECIMAL_64 + Statistics: Num rows: 1000 Data size: 448000 Basic stats: COMPLETE Column stats: COMPLETE + Group By Operator + aggregations: sum(_col0) + Group By Vectorization: + aggregators: VectorUDAFSumDecimal64ToDecimal(col 8:decimal(15,6)/DECIMAL_64) -> decimal(25,6) + className: VectorGroupByOperator + groupByMode: HASH + native: false + vectorProcessingMode: HASH + projectedOutputColumnNums: [0] + minReductionHashAggr: 0.99 + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + sort order: + Reduce Sink Vectorization: + className: VectorReduceSinkEmptyKeyOperator + native: true + nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true + valueColumns: 0:decimal(25,6) + Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE + value expressions: _col0 (type: decimal(25,6)) + Execution mode: vectorized, llap + LLAP IO: all inputs + Map Vectorization: + enabled: true + enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true + inputFormatFeatureSupport: [DECIMAL_64] + featureSupportInUse: [DECIMAL_64] + inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat + allNative: false + usesVectorUDFAdaptor: false + vectorized: true + rowBatchContext: + dataColumnCount: 4 + includeColumns: [0, 1, 2, 3] + dataColumns: ss_ext_list_price:decimal(7,2)/DECIMAL_64, ss_ext_wholesale_cost:decimal(7,2)/DECIMAL_64, ss_ext_discount_amt:decimal(7,2)/DECIMAL_64, ss_ext_sales_price:decimal(7,2)/DECIMAL_64 + partitionColumnCount: 0 + scratchColumnTypeNames: [decimal(8,2)/DECIMAL_64, decimal(9,2)/DECIMAL_64, decimal(10,2)/DECIMAL_64, decimal(15,6)/DECIMAL_64] + Reducer 2 + Execution mode: vectorized, llap + Reduce Vectorization: + enabled: true + enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true + reduceColumnNullOrder: + reduceColumnSortOrder: + allNative: false + usesVectorUDFAdaptor: false + vectorized: true + rowBatchContext: + dataColumnCount: 1 + dataColumns: VALUE._col0:decimal(25,6) + partitionColumnCount: 0 + scratchColumnTypeNames: [] + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + Group By Vectorization: + aggregators: VectorUDAFSumDecimal(col 0:decimal(25,6)) -> decimal(25,6) + className: VectorGroupByOperator + groupByMode: MERGEPARTIAL + native: false + vectorProcessingMode: GLOBAL + projectedOutputColumnNums: [0] + mode: mergepartial + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE + File Output Operator + compressed: false + File Sink Vectorization: + className: VectorFileSinkOperator + native: false + Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + +PREHOOK: query: select sum(((ss_ext_list_price-ss_ext_wholesale_cost-ss_ext_discount_amt)+ss_ext_sales_price)/2.2) from cdpd4378_tmp +PREHOOK: type: QUERY +PREHOOK: Input: default@cdpd4378_tmp +#### A masked pattern was here #### +POSTHOOK: query: select sum(((ss_ext_list_price-ss_ext_wholesale_cost-ss_ext_discount_amt)+ss_ext_sales_price)/2.2) from cdpd4378_tmp +POSTHOOK: type: QUERY +POSTHOOK: Input: default@cdpd4378_tmp +#### A masked pattern was here #### +413636.363000 diff --git a/vector-code-gen/src/org/apache/hadoop/hive/tools/GenVectorCode.java b/vector-code-gen/src/org/apache/hadoop/hive/tools/GenVectorCode.java index 0e147beab1..83cd48c578 100644 --- a/vector-code-gen/src/org/apache/hadoop/hive/tools/GenVectorCode.java +++ b/vector-code-gen/src/org/apache/hadoop/hive/tools/GenVectorCode.java @@ -316,6 +316,8 @@ {"Decimal64ColumnArithmeticDecimal64Column", "Add", "+"}, {"Decimal64ColumnArithmeticDecimal64Column", "Subtract", "-"}, + {"Decimal64ColumnDivideDecimal64Scalar", "Divide", "/"}, + {"ColumnCompareScalar", "Equal", "long", "long", "=="}, {"ColumnCompareScalar", "Equal", "long", "double", "=="}, {"ColumnCompareScalar", "Equal", "double", "double", "=="}, @@ -1414,6 +1416,8 @@ private void generate() throws Exception { generateDecimal64ScalarArithmeticDecimal64Column(tdesc); } else if (tdesc[0].equals("Decimal64ColumnArithmeticDecimal64Column")) { generateDecimal64ColumnArithmeticDecimal64Column(tdesc); + } else if (tdesc[0].equals("Decimal64ColumnDivideDecimal64Scalar")) { + generateDecimal64ColumnArithmeticDecimal64Scalar(tdesc); } else if (tdesc[0].equals("ColumnUnaryMinus")) { generateColumnUnaryMinus(tdesc); } else if (tdesc[0].equals("ColumnUnaryFunc")) {