From a578842117fa9f632c434d4038174cb6f7081779 Mon Sep 17 00:00:00 2001 From: Lawrence Date: Wed, 17 Jan 2018 16:47:57 +0100 Subject: [PATCH] Fix order of table_ref --- src/parser/bison_parser.cpp | 883 ++++++++++++++++++------------------ src/parser/bison_parser.y | 8 +- test/select_tests.cpp | 22 + 3 files changed, 461 insertions(+), 452 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 6735bf9..c723e00 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -620,7 +620,7 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 52 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 541 +#define YYLAST 494 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 151 @@ -629,7 +629,7 @@ union yyalloc /* YYNRULES -- Number of rules. */ #define YYNRULES 205 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 382 +#define YYNSTATES 380 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ @@ -786,10 +786,10 @@ static const yytype_uint16 yytoknum[] = }; # endif -#define YYPACT_NINF -295 +#define YYPACT_NINF -285 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-295))) + (!!((Yystate) == (-285))) #define YYTABLE_NINF -201 @@ -800,45 +800,44 @@ static const yytype_uint16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 226, 9, 41, 66, 91, -37, 23, 28, 46, 3, - 41, -17, 13, -32, 68, 27, -295, 87, 87, -295, - -295, -295, -295, -295, -295, -295, -295, -295, -295, 22, - -295, 31, 164, 45, -295, 52, 123, 102, 102, 41, - 115, 41, 224, 219, 139, -295, 116, 116, 41, -295, - 110, 111, -295, 226, -295, 178, -295, -295, -295, -295, - -295, -32, 170, 162, -32, 221, -295, 282, 10, 288, - 177, 41, 41, 220, -295, 218, 154, -295, -295, -295, - 165, 297, 265, 41, 41, -295, -295, -295, -295, 168, - -295, 247, -295, -295, -295, 165, 247, 224, -295, -295, - -295, -295, -295, -295, -67, -295, -295, -295, -295, -295, - -295, -295, -295, 283, -61, 154, 165, -295, 318, 322, - -10, 19, 182, 84, 241, 186, 197, -295, 145, 249, - 184, -295, 6, 272, -295, -295, -295, -295, -295, -295, - -295, -295, -295, -295, -295, -295, -295, -295, 210, -48, - -295, -295, -295, -295, 334, 221, 191, -295, -40, 221, - 295, -295, 10, -295, 231, 341, 232, 55, 260, -295, - -295, -28, 203, -295, 1, 8, 300, 165, 93, 82, - 206, 197, 342, 165, 72, 207, -74, 7, 220, 165, - -295, 165, 349, 165, -295, -295, 197, -295, 197, -62, - 209, 119, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 224, 165, 297, -295, - 213, 90, -295, -295, 165, -295, -295, -295, -295, 224, - -295, 275, -2, 103, -295, -32, 41, -295, 359, 10, - -295, 165, -295, -295, 217, 63, 83, 165, 165, -295, - 300, 277, -98, -295, -295, -32, -295, -20, -295, -295, - 5, -295, 306, -295, -295, -295, 266, 316, 374, 197, - 222, 145, -295, 279, 227, 374, 374, 374, 398, 398, - 398, 398, 72, 72, 65, 65, 65, -21, 228, 55, - -295, 10, -295, 334, -295, -295, 318, -295, -295, -295, - -295, -295, -295, 341, -295, -295, -295, 117, 118, -295, - 165, 165, -295, 121, 77, 229, -295, 234, 287, -295, - -295, -295, 308, 309, 7, 296, -295, 259, -295, 197, - 374, 145, 237, 127, -295, -295, 163, -295, -295, -295, - -295, -295, 55, 122, -295, 165, -295, 5, 7, -295, - -295, 270, 235, 7, 165, 342, 242, 175, -295, -295, - -295, -295, 55, -295, -295, 7, 239, -24, -295, -295, - 270, 240, 165, 165, -295, 18, 55, -295, 55, 245, - 248, -295 + 17, 6, 61, 91, 124, -22, 80, 85, 70, 95, + 61, -21, 40, -41, 220, 87, -285, 157, 157, -285, + -285, -285, -285, -285, -285, -285, -285, -285, -285, 31, + -285, 176, 230, 97, -285, 103, 182, 151, 151, 61, + 167, 61, 263, 273, 164, -285, 170, 170, 61, -285, + 150, 159, -285, 17, -285, 203, -285, -285, -285, -285, + -285, -41, 206, 196, -41, 253, -285, 328, 10, 332, + 228, 61, 61, 265, -285, 259, 199, -285, -285, -285, + 84, 338, 305, 61, 61, -285, -285, -285, -285, 202, + -285, 279, -285, -285, -285, 84, 279, 263, -285, -285, + -285, -285, -285, -285, 32, -285, -285, -285, -285, -285, + -285, -285, -285, 308, -61, 199, 84, -285, 348, 353, + 54, 57, 215, 74, 165, 224, 183, -285, 116, 288, + 221, -285, 4, 225, -285, -285, -285, -285, -285, -285, + -285, -285, -285, -285, -285, -285, -285, -285, 247, -48, + -285, -285, -285, -285, 371, 253, 226, -285, -40, 253, + 330, -285, 10, -285, 267, 374, 268, -9, 296, -285, + -285, 134, 239, -285, 1, 8, 336, 84, 143, -52, + 241, 183, 295, 84, 184, 242, -64, 3, 265, 84, + -285, 84, 386, 84, -285, -285, 183, -285, 183, -62, + 245, 105, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 263, 84, 338, -285, + 246, 135, -285, -285, 84, -285, -285, -285, -285, 263, + -285, 312, -2, 145, -285, -41, 61, -285, 397, 10, + -285, 84, -285, -285, 255, 55, 96, 84, 84, -285, + 336, 323, 102, -285, -285, -41, -285, 141, -285, 277, + -285, 15, -285, 354, -285, -285, -285, 314, 269, 327, + 183, 272, 116, -285, 337, 275, 327, 327, 327, 351, + 351, 351, 351, 184, 184, -96, -96, -96, 107, 278, + -9, -285, 10, -285, 371, -285, -285, 348, -285, -285, + -285, -285, -285, -285, 374, -285, -285, -285, 149, 155, + -285, 84, 84, -285, 77, 128, 284, -285, 291, 355, + -285, -285, -285, 372, 375, 356, 3, -285, 324, -285, + 183, 327, 116, 298, 163, -285, -285, 180, -285, -285, + -285, -285, -285, -9, 111, -285, 84, -285, 15, 3, + -285, -285, 3, 231, 84, 295, 300, 186, -285, -285, + -285, -285, -9, -285, -285, 210, -32, -285, -285, 302, + 84, 84, -285, 14, -9, -285, -9, 301, 303, -285 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -871,48 +870,47 @@ static const yytype_uint8 yydefact[] = 21, 0, 19, 61, 0, 91, 90, 89, 67, 0, 101, 0, 0, 0, 37, 0, 0, 53, 0, 0, 155, 0, 161, 163, 0, 0, 0, 0, 0, 143, - 0, 0, 0, 116, 108, 0, 78, 174, 176, 178, - 189, 177, 82, 99, 135, 186, 136, 0, 131, 0, - 0, 0, 122, 0, 134, 133, 149, 150, 151, 152, - 153, 154, 126, 125, 128, 127, 129, 130, 0, 58, - 57, 0, 17, 0, 88, 96, 0, 41, 42, 43, - 40, 39, 33, 0, 34, 27, 205, 0, 0, 147, - 0, 0, 141, 0, 0, 0, 157, 0, 0, 199, - 193, 194, 198, 197, 0, 0, 182, 0, 74, 0, - 132, 0, 0, 0, 123, 158, 0, 20, 32, 38, - 51, 156, 145, 0, 144, 0, 148, 189, 0, 196, - 195, 180, 175, 0, 0, 159, 0, 0, 139, 137, - 22, 142, 146, 179, 190, 0, 200, 84, 140, 138, - 181, 0, 0, 0, 81, 0, 201, 191, 83, 160, - 0, 192 + 0, 0, 0, 116, 108, 0, 78, 174, 176, 0, + 178, 189, 177, 82, 99, 135, 186, 136, 0, 131, + 0, 0, 0, 122, 0, 134, 133, 149, 150, 151, + 152, 153, 154, 126, 125, 128, 127, 129, 130, 0, + 58, 57, 0, 17, 0, 88, 96, 0, 41, 42, + 43, 40, 39, 33, 0, 34, 27, 205, 0, 0, + 147, 0, 0, 141, 0, 0, 0, 157, 0, 0, + 199, 193, 194, 198, 197, 0, 0, 182, 0, 74, + 0, 132, 0, 0, 0, 123, 158, 0, 20, 32, + 38, 51, 156, 145, 0, 144, 0, 148, 189, 0, + 196, 195, 0, 175, 0, 159, 0, 0, 139, 137, + 22, 142, 146, 179, 190, 200, 84, 140, 138, 0, + 0, 0, 81, 0, 201, 191, 83, 160, 0, 192 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -295, -295, -295, 340, -295, 377, -295, 106, -295, -295, - -295, -295, -295, 107, -295, -295, 369, -295, 113, -295, - -295, 367, -295, -295, -295, 302, -295, -295, 202, -178, - 14, 357, -13, 391, -295, -295, 230, 250, -295, -295, - -97, -295, -295, 21, -295, 199, -295, -295, -45, -176, - -215, 238, -94, -70, -295, -295, -295, -295, -295, -295, - 251, -295, -295, -295, -295, -295, -295, 51, -66, -113, - -295, -39, -295, -295, -295, -294, 80, -295, -295, -295, - 2, -295, -241, -295, -295, -295, -295, -295 + -285, -285, -285, 401, -285, 432, -285, 168, -285, -285, + -285, -285, -285, 161, -285, -285, 421, -285, 169, -285, + -285, 424, -285, -285, -285, 357, -285, -285, 256, -104, + 52, 412, -13, 446, -285, -285, 201, 304, -285, -285, + -119, -285, -285, -60, -285, 258, -285, -285, 37, -174, + -220, 290, -94, -70, -285, -285, -285, -285, -285, -285, + 315, -285, -285, -285, -285, -285, -285, 110, -66, -113, + -285, -39, -285, -285, -285, -284, 137, -285, -285, -285, + 2, -285, -240, -285, -285, -285, -285, -285 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 14, 15, 16, 17, 56, 221, 222, 18, 112, - 19, 20, 75, 168, 21, 22, 71, 233, 234, 301, + 19, 20, 75, 168, 21, 22, 71, 233, 234, 302, 23, 83, 24, 25, 26, 120, 27, 149, 150, 28, 29, 91, 30, 61, 62, 94, 31, 80, 129, 188, - 117, 328, 374, 65, 156, 157, 227, 43, 98, 130, + 117, 329, 372, 65, 156, 157, 227, 43, 98, 130, 104, 131, 132, 133, 134, 135, 136, 137, 138, 139, 179, 140, 141, 142, 143, 144, 145, 146, 147, 106, - 107, 108, 109, 110, 256, 257, 258, 352, 259, 44, - 260, 194, 195, 261, 325, 377, 54, 171 + 107, 108, 109, 110, 256, 257, 258, 259, 260, 44, + 261, 194, 195, 262, 325, 375, 54, 171 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -920,120 +918,110 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 51, 158, 105, 78, 34, 169, 318, 252, 190, 190, - 33, 242, 45, 79, 100, 101, 77, 9, 373, 326, - 164, 379, 167, 297, 307, 116, 269, 50, 191, 178, - 351, 58, 48, 37, 186, 298, 32, 225, 319, 9, - 58, 73, 320, 76, 33, 172, 316, 193, 321, 322, - 85, 189, 219, 46, 182, 270, 184, 304, 160, 366, - 38, 59, 191, 226, 49, 308, -200, 323, 52, 35, - 59, 370, 254, 114, 115, 90, 336, 317, 90, 161, - 47, 193, 162, 245, 165, 152, 153, 121, 100, 101, - 77, 262, 299, 60, 36, 333, 230, 264, 63, 266, - 102, 218, 60, 202, 39, 300, 363, 173, 191, 40, - 223, 182, 155, 13, 228, 185, 42, 159, 237, 192, - 192, 238, 216, 289, 122, 189, 267, 193, 268, 324, - 158, 41, 274, 275, 276, 277, 278, 279, 280, 281, - 282, 283, 284, 285, 286, 287, 243, 240, 121, 100, - 101, 77, 255, 313, 314, 357, 127, 191, 310, 123, - 103, 247, 311, 244, 174, 191, 175, 66, 121, 100, - 101, 77, 345, 105, 102, 53, 193, 288, 367, 191, - 248, 248, 177, 169, 193, 122, 55, 249, 312, 202, - 295, 177, 67, 124, 9, 191, 202, 68, 193, 330, - 121, 100, 101, 77, 69, 122, 215, 125, 216, 272, - 212, 213, 214, 215, 193, 216, 342, 343, 70, 74, - 123, 126, 127, 191, 191, 105, 344, 361, 273, 128, - 77, 79, 82, 1, 103, 102, 292, 315, 305, 293, - 123, 2, 193, 193, 121, 100, 101, 77, 3, 302, - 81, 362, 303, 4, 124, 102, 86, 87, 332, 355, - 5, 6, 89, 340, 341, 318, 162, 189, 125, 7, - 8, 93, 123, 359, 124, 9, 189, 95, 376, 378, - 10, 180, 126, 127, 97, 99, 113, 102, 125, 196, - 128, 92, 111, 116, 92, 103, 318, 319, 118, 119, - 148, 320, 126, 127, 11, 151, 181, 321, 322, 360, - 128, 371, 162, 154, 63, 103, 123, 197, 356, 12, - 125, 369, 100, 163, 189, 170, 323, 176, 319, 183, - 187, 102, 320, 189, 126, 127, 217, 220, 321, 322, - 224, 229, 128, 231, 232, 236, 235, 103, 239, 9, - 181, 250, 265, 253, 271, 296, -200, 323, 291, 372, - 198, 197, 306, 309, 125, 269, 327, 331, 191, 334, - 216, 13, 335, 348, 354, 346, 349, 350, 126, 127, - 347, 199, 353, 358, 365, 375, 128, 197, 368, 200, - 201, 103, 175, 88, 381, 57, 202, 203, 204, 337, - 205, 206, 207, 338, 198, 208, 209, 72, 210, 211, - 212, 213, 214, 215, 84, 216, 339, 166, 329, 197, - 290, 96, 64, 294, 241, 251, 380, 263, 364, 246, - 198, 0, 0, 0, 201, 0, 0, 0, 0, 0, - 202, 203, 204, 197, 205, 206, 207, 0, 0, 208, - 209, 251, 210, 211, 212, 213, 214, 215, 0, 216, - 201, 0, -201, 0, 0, 0, 202, 203, 204, 0, - 205, 206, 207, 0, 0, 208, 209, 0, 210, 211, - 212, 213, 214, 215, 0, 216, 0, 0, 0, 0, - 0, 0, 201, 0, 0, 0, 0, 0, 202, -201, - -201, 0, -201, 206, 207, 0, 0, 208, 209, 0, - 210, 211, 212, 213, 214, 215, 201, 216, 0, 0, - 0, 0, 202, 0, 0, 0, 0, -201, -201, 0, - 0, -201, -201, 0, 210, 211, 212, 213, 214, 215, - 0, 216 + 51, 158, 105, 78, 34, 169, 33, 190, 9, 252, + 371, 242, 45, 79, 100, 101, 77, 377, 190, 308, + 164, 327, 167, 298, 1, 116, 270, 247, 202, 178, + 219, 155, 2, 32, 186, 299, 159, 225, 191, 3, + 58, 73, 353, 76, 4, 215, 248, 216, 37, 46, + 85, 5, 6, 249, 182, 271, 184, 193, 160, 48, + 7, 8, 191, 226, 33, 50, 9, 309, 365, 263, + 59, 10, 337, 114, 115, 38, 47, 121, 100, 101, + 77, 193, 254, 245, 165, 152, 153, 121, 100, 101, + 77, 49, 300, 191, 35, 11, 230, 265, 334, 267, + 102, 218, 60, 9, 13, 301, 191, 173, 363, 172, + 12, 182, 193, 90, 122, 185, 90, 189, 192, 121, + 100, 101, 77, 290, 122, 193, 268, 36, 269, 192, + 158, 305, 275, 276, 277, 278, 279, 280, 281, 282, + 283, 284, 285, 286, 287, 288, 243, 240, 255, 123, + 311, 318, 127, 314, 315, 41, 122, 191, 357, 123, + 103, 39, 13, 244, 102, 9, 40, 319, 121, 100, + 101, 77, 177, 105, 102, 312, 193, 289, 161, 191, + 366, 162, 345, 124, 169, 58, 121, 100, 101, 77, + 296, 123, 223, 124, 248, 273, 228, 125, 193, 320, + 331, 313, 174, 321, 175, 180, 102, 125, 42, 322, + 323, 126, 127, 191, 274, 59, 361, 343, 344, 128, + 52, 126, 127, 346, 103, 124, 105, -200, 324, 128, + 191, 202, 193, 66, 103, 53, 319, 316, 306, 125, + 123, 177, 196, 63, 67, 191, 317, 60, 68, 193, + 216, 189, 362, 126, 127, 102, 55, 319, 123, 333, + 355, 128, 92, 69, 193, 92, 103, 70, 320, 77, + 197, 74, 321, 102, 181, 81, 374, 376, 322, 323, + 237, 293, 369, 238, 294, 79, 82, 89, 125, 320, + -180, 303, 181, 321, 304, 341, 86, 324, 162, 322, + 323, 342, 126, 127, 189, 87, 125, 93, 202, 359, + 128, 95, 189, 198, 197, 103, 97, -200, 324, 356, + 126, 127, 212, 213, 214, 215, 360, 216, 128, 162, + 370, 99, 368, 103, 199, 189, 111, 113, 116, 118, + 197, 148, 200, 201, 119, 151, 63, 154, 163, 202, + 203, 204, 100, 205, 206, 207, 170, 198, 208, 209, + 176, 210, 211, 212, 213, 214, 215, 183, 216, 187, + 189, 330, 197, 217, 220, 224, 229, 232, 251, 231, + -181, 236, 235, 198, 239, 9, 250, 201, 253, 266, + 272, 292, 297, 202, 203, 204, 197, 205, 206, 207, + 307, 310, 208, 209, 251, 210, 211, 212, 213, 214, + 215, 270, 216, 201, 328, -201, 191, 332, 216, 202, + 203, 204, 336, 205, 206, 207, 326, 335, 208, 209, + 347, 210, 211, 212, 213, 214, 215, 348, 216, 354, + 350, 349, 352, 351, 358, 201, 367, 373, 175, 379, + 57, 202, -201, -201, 88, -201, 206, 207, 339, 72, + 208, 209, 338, 210, 211, 212, 213, 214, 215, 201, + 216, 84, 166, 340, 291, 202, 96, 64, 241, 264, + -201, -201, 295, 378, -201, -201, 364, 210, 211, 212, + 213, 214, 215, 246, 216 }; -static const yytype_int16 yycheck[] = +static const yytype_uint16 yycheck[] = { - 13, 95, 68, 42, 2, 118, 26, 183, 3, 3, - 3, 3, 10, 12, 4, 5, 6, 49, 42, 260, - 81, 3, 116, 25, 239, 73, 88, 13, 102, 123, - 324, 9, 19, 70, 128, 37, 27, 77, 58, 49, - 9, 39, 62, 41, 3, 55, 144, 121, 68, 69, - 48, 149, 149, 70, 124, 117, 126, 235, 97, 353, - 97, 39, 102, 103, 51, 241, 86, 87, 0, 3, - 39, 365, 146, 71, 72, 61, 291, 255, 64, 146, - 97, 121, 149, 177, 145, 83, 84, 3, 4, 5, - 6, 188, 94, 71, 3, 271, 162, 191, 67, 193, - 90, 149, 71, 124, 81, 107, 347, 120, 102, 81, - 155, 181, 91, 145, 159, 128, 113, 96, 146, 114, - 114, 149, 143, 217, 40, 149, 196, 121, 198, 149, - 224, 85, 202, 203, 204, 205, 206, 207, 208, 209, - 210, 211, 212, 213, 214, 215, 138, 146, 3, 4, - 5, 6, 145, 247, 248, 331, 138, 102, 95, 75, - 150, 79, 79, 176, 145, 102, 147, 3, 3, 4, - 5, 6, 95, 239, 90, 148, 121, 216, 354, 102, - 98, 98, 98, 296, 121, 40, 99, 105, 105, 124, - 229, 98, 147, 109, 49, 102, 124, 145, 121, 269, - 3, 4, 5, 6, 81, 40, 141, 123, 143, 90, - 138, 139, 140, 141, 121, 143, 310, 311, 116, 104, - 75, 137, 138, 102, 102, 291, 105, 105, 109, 145, - 6, 12, 116, 7, 150, 90, 146, 250, 236, 149, - 75, 15, 121, 121, 3, 4, 5, 6, 22, 146, - 111, 345, 149, 27, 109, 90, 146, 146, 271, 329, - 34, 35, 84, 146, 146, 26, 149, 149, 123, 43, - 44, 101, 75, 146, 109, 49, 149, 115, 372, 373, - 54, 40, 137, 138, 63, 3, 109, 90, 123, 17, - 145, 61, 4, 73, 64, 150, 26, 58, 80, 145, - 3, 62, 137, 138, 78, 40, 109, 68, 69, 146, - 145, 72, 149, 145, 67, 150, 75, 45, 331, 93, - 123, 146, 4, 40, 149, 3, 87, 145, 58, 143, - 81, 90, 62, 149, 137, 138, 126, 3, 68, 69, - 149, 46, 145, 112, 3, 85, 114, 150, 145, 49, - 109, 145, 3, 146, 145, 80, 86, 87, 145, 120, - 88, 45, 3, 146, 123, 88, 60, 145, 102, 90, - 143, 145, 144, 86, 115, 146, 68, 68, 137, 138, - 146, 109, 86, 146, 149, 145, 145, 45, 146, 117, - 118, 150, 147, 53, 146, 18, 124, 125, 126, 293, - 128, 129, 130, 296, 88, 133, 134, 38, 136, 137, - 138, 139, 140, 141, 47, 143, 303, 115, 102, 45, - 218, 64, 31, 224, 174, 109, 375, 189, 348, 178, - 88, -1, -1, -1, 118, -1, -1, -1, -1, -1, - 124, 125, 126, 45, 128, 129, 130, -1, -1, 133, - 134, 109, 136, 137, 138, 139, 140, 141, -1, 143, - 118, -1, 88, -1, -1, -1, 124, 125, 126, -1, - 128, 129, 130, -1, -1, 133, 134, -1, 136, 137, - 138, 139, 140, 141, -1, 143, -1, -1, -1, -1, - -1, -1, 118, -1, -1, -1, -1, -1, 124, 125, - 126, -1, 128, 129, 130, -1, -1, 133, 134, -1, - 136, 137, 138, 139, 140, 141, 118, 143, -1, -1, - -1, -1, 124, -1, -1, -1, -1, 129, 130, -1, - -1, 133, 134, -1, 136, 137, 138, 139, 140, 141, - -1, 143 + 13, 95, 68, 42, 2, 118, 3, 3, 49, 183, + 42, 3, 10, 12, 4, 5, 6, 3, 3, 239, + 81, 261, 116, 25, 7, 73, 88, 79, 124, 123, + 149, 91, 15, 27, 128, 37, 96, 77, 102, 22, + 9, 39, 326, 41, 27, 141, 98, 143, 70, 70, + 48, 34, 35, 105, 124, 117, 126, 121, 97, 19, + 43, 44, 102, 103, 3, 13, 49, 241, 352, 188, + 39, 54, 292, 71, 72, 97, 97, 3, 4, 5, + 6, 121, 146, 177, 145, 83, 84, 3, 4, 5, + 6, 51, 94, 102, 3, 78, 162, 191, 272, 193, + 90, 149, 71, 49, 145, 107, 102, 120, 348, 55, + 93, 181, 121, 61, 40, 128, 64, 149, 114, 3, + 4, 5, 6, 217, 40, 121, 196, 3, 198, 114, + 224, 235, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 138, 146, 145, 75, + 95, 255, 138, 247, 248, 85, 40, 102, 332, 75, + 150, 81, 145, 176, 90, 49, 81, 26, 3, 4, + 5, 6, 98, 239, 90, 79, 121, 216, 146, 102, + 354, 149, 105, 109, 297, 9, 3, 4, 5, 6, + 229, 75, 155, 109, 98, 90, 159, 123, 121, 58, + 270, 105, 145, 62, 147, 40, 90, 123, 113, 68, + 69, 137, 138, 102, 109, 39, 105, 311, 312, 145, + 0, 137, 138, 95, 150, 109, 292, 86, 87, 145, + 102, 124, 121, 3, 150, 148, 26, 250, 236, 123, + 75, 98, 17, 67, 147, 102, 144, 71, 145, 121, + 143, 149, 346, 137, 138, 90, 99, 26, 75, 272, + 330, 145, 61, 81, 121, 64, 150, 116, 58, 6, + 45, 104, 62, 90, 109, 111, 370, 371, 68, 69, + 146, 146, 72, 149, 149, 12, 116, 84, 123, 58, + 149, 146, 109, 62, 149, 146, 146, 87, 149, 68, + 69, 146, 137, 138, 149, 146, 123, 101, 124, 146, + 145, 115, 149, 88, 45, 150, 63, 86, 87, 332, + 137, 138, 138, 139, 140, 141, 146, 143, 145, 149, + 120, 3, 146, 150, 109, 149, 4, 109, 73, 80, + 45, 3, 117, 118, 145, 40, 67, 145, 40, 124, + 125, 126, 4, 128, 129, 130, 3, 88, 133, 134, + 145, 136, 137, 138, 139, 140, 141, 143, 143, 81, + 149, 102, 45, 126, 3, 149, 46, 3, 109, 112, + 149, 85, 114, 88, 145, 49, 145, 118, 146, 3, + 145, 145, 80, 124, 125, 126, 45, 128, 129, 130, + 3, 146, 133, 134, 109, 136, 137, 138, 139, 140, + 141, 88, 143, 118, 60, 88, 102, 145, 143, 124, + 125, 126, 144, 128, 129, 130, 149, 90, 133, 134, + 146, 136, 137, 138, 139, 140, 141, 146, 143, 115, + 68, 86, 86, 68, 146, 118, 146, 145, 147, 146, + 18, 124, 125, 126, 53, 128, 129, 130, 297, 38, + 133, 134, 294, 136, 137, 138, 139, 140, 141, 118, + 143, 47, 115, 304, 218, 124, 64, 31, 174, 189, + 129, 130, 224, 373, 133, 134, 349, 136, 137, 138, + 139, 140, 141, 178, 143 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1065,20 +1053,19 @@ static const yytype_uint8 yystos[] = 3, 157, 158, 199, 149, 77, 103, 197, 199, 46, 219, 112, 3, 168, 169, 114, 85, 146, 149, 145, 146, 188, 3, 138, 183, 203, 211, 79, 98, 105, - 145, 109, 200, 146, 146, 145, 225, 226, 227, 229, - 231, 234, 191, 202, 203, 3, 203, 204, 204, 88, - 117, 145, 90, 109, 204, 204, 204, 204, 204, 204, - 204, 204, 204, 204, 204, 204, 204, 204, 222, 203, - 179, 145, 146, 149, 196, 222, 80, 25, 37, 94, - 107, 170, 146, 149, 180, 231, 3, 201, 200, 146, - 95, 79, 105, 203, 203, 183, 144, 180, 26, 58, - 62, 68, 69, 87, 149, 235, 233, 60, 192, 102, - 204, 145, 183, 200, 90, 144, 201, 158, 164, 169, - 146, 146, 203, 203, 105, 95, 146, 146, 86, 68, - 68, 226, 228, 86, 115, 204, 183, 200, 146, 146, - 146, 105, 203, 233, 227, 149, 226, 200, 146, 146, - 226, 72, 120, 42, 193, 145, 203, 236, 203, 3, - 218, 146 + 145, 109, 200, 146, 146, 145, 225, 226, 227, 228, + 229, 231, 234, 191, 202, 203, 3, 203, 204, 204, + 88, 117, 145, 90, 109, 204, 204, 204, 204, 204, + 204, 204, 204, 204, 204, 204, 204, 204, 204, 222, + 203, 179, 145, 146, 149, 196, 222, 80, 25, 37, + 94, 107, 170, 146, 149, 180, 231, 3, 201, 200, + 146, 95, 79, 105, 203, 203, 183, 144, 180, 26, + 58, 62, 68, 69, 87, 235, 149, 233, 60, 192, + 102, 204, 145, 183, 200, 90, 144, 201, 158, 164, + 169, 146, 146, 203, 203, 105, 95, 146, 146, 86, + 68, 68, 86, 226, 115, 204, 183, 200, 146, 146, + 146, 105, 203, 233, 227, 226, 200, 146, 146, 72, + 120, 42, 193, 145, 203, 236, 203, 3, 218, 146 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1629,25 +1616,25 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio case 3: /* IDENTIFIER */ #line 140 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1633 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1620 "bison_parser.cpp" /* yacc.c:1257 */ break; case 4: /* STRING */ #line 140 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1639 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1626 "bison_parser.cpp" /* yacc.c:1257 */ break; case 5: /* FLOATVAL */ #line 138 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1645 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1632 "bison_parser.cpp" /* yacc.c:1257 */ break; case 6: /* INTVAL */ #line 138 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1651 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1638 "bison_parser.cpp" /* yacc.c:1257 */ break; case 153: /* statement_list */ @@ -1660,19 +1647,19 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).stmt_vec)); } -#line 1664 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1651 "bison_parser.cpp" /* yacc.c:1257 */ break; case 154: /* statement */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).statement)); } -#line 1670 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1657 "bison_parser.cpp" /* yacc.c:1257 */ break; case 155: /* preparable_statement */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).statement)); } -#line 1676 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1663 "bison_parser.cpp" /* yacc.c:1257 */ break; case 156: /* opt_hints */ @@ -1685,7 +1672,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1689 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1676 "bison_parser.cpp" /* yacc.c:1257 */ break; case 157: /* hint_list */ @@ -1698,67 +1685,67 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1702 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1689 "bison_parser.cpp" /* yacc.c:1257 */ break; case 158: /* hint */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1708 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1695 "bison_parser.cpp" /* yacc.c:1257 */ break; case 159: /* prepare_statement */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).prep_stmt)); } -#line 1714 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1701 "bison_parser.cpp" /* yacc.c:1257 */ break; case 160: /* prepare_target_query */ #line 140 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1720 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1707 "bison_parser.cpp" /* yacc.c:1257 */ break; case 161: /* execute_statement */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).exec_stmt)); } -#line 1726 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1713 "bison_parser.cpp" /* yacc.c:1257 */ break; case 162: /* import_statement */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).import_stmt)); } -#line 1732 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1719 "bison_parser.cpp" /* yacc.c:1257 */ break; case 163: /* import_file_type */ #line 138 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1738 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1725 "bison_parser.cpp" /* yacc.c:1257 */ break; case 164: /* file_path */ #line 140 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1744 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1731 "bison_parser.cpp" /* yacc.c:1257 */ break; case 165: /* show_statement */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).show_stmt)); } -#line 1750 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1737 "bison_parser.cpp" /* yacc.c:1257 */ break; case 166: /* create_statement */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).create_stmt)); } -#line 1756 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1743 "bison_parser.cpp" /* yacc.c:1257 */ break; case 167: /* opt_not_exists */ #line 138 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1762 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1749 "bison_parser.cpp" /* yacc.c:1257 */ break; case 168: /* column_def_commalist */ @@ -1771,49 +1758,49 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).column_vec)); } -#line 1775 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1762 "bison_parser.cpp" /* yacc.c:1257 */ break; case 169: /* column_def */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).column_t)); } -#line 1781 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1768 "bison_parser.cpp" /* yacc.c:1257 */ break; case 170: /* column_type */ #line 138 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1787 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1774 "bison_parser.cpp" /* yacc.c:1257 */ break; case 171: /* drop_statement */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).drop_stmt)); } -#line 1793 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1780 "bison_parser.cpp" /* yacc.c:1257 */ break; case 172: /* opt_exists */ #line 138 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1799 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1786 "bison_parser.cpp" /* yacc.c:1257 */ break; case 173: /* delete_statement */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).delete_stmt)); } -#line 1805 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1792 "bison_parser.cpp" /* yacc.c:1257 */ break; case 174: /* truncate_statement */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).delete_stmt)); } -#line 1811 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1798 "bison_parser.cpp" /* yacc.c:1257 */ break; case 175: /* insert_statement */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).insert_stmt)); } -#line 1817 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1804 "bison_parser.cpp" /* yacc.c:1257 */ break; case 176: /* opt_column_list */ @@ -1826,13 +1813,13 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).str_vec)); } -#line 1830 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1817 "bison_parser.cpp" /* yacc.c:1257 */ break; case 177: /* update_statement */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).update_stmt)); } -#line 1836 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1823 "bison_parser.cpp" /* yacc.c:1257 */ break; case 178: /* update_clause_commalist */ @@ -1845,49 +1832,49 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).update_vec)); } -#line 1849 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1836 "bison_parser.cpp" /* yacc.c:1257 */ break; case 179: /* update_clause */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).update_t)); } -#line 1855 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1842 "bison_parser.cpp" /* yacc.c:1257 */ break; case 180: /* select_statement */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1861 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1848 "bison_parser.cpp" /* yacc.c:1257 */ break; case 181: /* select_with_paren */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1867 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1854 "bison_parser.cpp" /* yacc.c:1257 */ break; case 182: /* select_paren_or_clause */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1873 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1860 "bison_parser.cpp" /* yacc.c:1257 */ break; case 183: /* select_no_paren */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1879 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1866 "bison_parser.cpp" /* yacc.c:1257 */ break; case 187: /* select_clause */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1885 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1872 "bison_parser.cpp" /* yacc.c:1257 */ break; case 188: /* opt_distinct */ #line 138 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1891 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1878 "bison_parser.cpp" /* yacc.c:1257 */ break; case 189: /* select_list */ @@ -1900,31 +1887,31 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1904 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1891 "bison_parser.cpp" /* yacc.c:1257 */ break; case 190: /* from_clause */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 1910 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1897 "bison_parser.cpp" /* yacc.c:1257 */ break; case 191: /* opt_where */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1916 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1903 "bison_parser.cpp" /* yacc.c:1257 */ break; case 192: /* opt_group */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).group_t)); } -#line 1922 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1909 "bison_parser.cpp" /* yacc.c:1257 */ break; case 193: /* opt_having */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1928 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1915 "bison_parser.cpp" /* yacc.c:1257 */ break; case 194: /* opt_order */ @@ -1937,7 +1924,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).order_vec)); } -#line 1941 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1928 "bison_parser.cpp" /* yacc.c:1257 */ break; case 195: /* order_list */ @@ -1950,31 +1937,31 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).order_vec)); } -#line 1954 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1941 "bison_parser.cpp" /* yacc.c:1257 */ break; case 196: /* order_desc */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).order)); } -#line 1960 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1947 "bison_parser.cpp" /* yacc.c:1257 */ break; case 197: /* opt_order_type */ #line 138 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1966 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1953 "bison_parser.cpp" /* yacc.c:1257 */ break; case 198: /* opt_top */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).limit)); } -#line 1972 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1959 "bison_parser.cpp" /* yacc.c:1257 */ break; case 199: /* opt_limit */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).limit)); } -#line 1978 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1965 "bison_parser.cpp" /* yacc.c:1257 */ break; case 200: /* expr_list */ @@ -1987,7 +1974,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1991 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1978 "bison_parser.cpp" /* yacc.c:1257 */ break; case 201: /* literal_list */ @@ -2000,163 +1987,163 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 2004 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1991 "bison_parser.cpp" /* yacc.c:1257 */ break; case 202: /* expr_alias */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2010 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1997 "bison_parser.cpp" /* yacc.c:1257 */ break; case 203: /* expr */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2016 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2003 "bison_parser.cpp" /* yacc.c:1257 */ break; case 204: /* operand */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2022 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2009 "bison_parser.cpp" /* yacc.c:1257 */ break; case 205: /* scalar_expr */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2028 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2015 "bison_parser.cpp" /* yacc.c:1257 */ break; case 206: /* unary_expr */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2034 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2021 "bison_parser.cpp" /* yacc.c:1257 */ break; case 207: /* binary_expr */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2040 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2027 "bison_parser.cpp" /* yacc.c:1257 */ break; case 208: /* logic_expr */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2046 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2033 "bison_parser.cpp" /* yacc.c:1257 */ break; case 209: /* in_expr */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2052 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2039 "bison_parser.cpp" /* yacc.c:1257 */ break; case 210: /* case_expr */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2058 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2045 "bison_parser.cpp" /* yacc.c:1257 */ break; case 211: /* case_list */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2064 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2051 "bison_parser.cpp" /* yacc.c:1257 */ break; case 212: /* exists_expr */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2070 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2057 "bison_parser.cpp" /* yacc.c:1257 */ break; case 213: /* comp_expr */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2076 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2063 "bison_parser.cpp" /* yacc.c:1257 */ break; case 214: /* function_expr */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2082 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2069 "bison_parser.cpp" /* yacc.c:1257 */ break; case 215: /* array_expr */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2088 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2075 "bison_parser.cpp" /* yacc.c:1257 */ break; case 216: /* array_index */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2094 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2081 "bison_parser.cpp" /* yacc.c:1257 */ break; case 217: /* between_expr */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2100 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2087 "bison_parser.cpp" /* yacc.c:1257 */ break; case 218: /* column_name */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2106 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2093 "bison_parser.cpp" /* yacc.c:1257 */ break; case 219: /* literal */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2112 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2099 "bison_parser.cpp" /* yacc.c:1257 */ break; case 220: /* string_literal */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2118 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2105 "bison_parser.cpp" /* yacc.c:1257 */ break; case 221: /* num_literal */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2124 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2111 "bison_parser.cpp" /* yacc.c:1257 */ break; case 222: /* int_literal */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2130 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2117 "bison_parser.cpp" /* yacc.c:1257 */ break; case 223: /* null_literal */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2136 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2123 "bison_parser.cpp" /* yacc.c:1257 */ break; case 224: /* param_expr */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2142 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2129 "bison_parser.cpp" /* yacc.c:1257 */ break; case 225: /* table_ref */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2148 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2135 "bison_parser.cpp" /* yacc.c:1257 */ break; case 226: /* table_ref_atomic */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2154 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2141 "bison_parser.cpp" /* yacc.c:1257 */ break; case 227: /* nonjoin_table_ref_atomic */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2160 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2147 "bison_parser.cpp" /* yacc.c:1257 */ break; case 228: /* table_ref_commalist */ @@ -2169,55 +2156,55 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).table_vec)); } -#line 2173 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2160 "bison_parser.cpp" /* yacc.c:1257 */ break; case 229: /* table_ref_name */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2179 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2166 "bison_parser.cpp" /* yacc.c:1257 */ break; case 230: /* table_ref_name_no_alias */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2185 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2172 "bison_parser.cpp" /* yacc.c:1257 */ break; case 231: /* table_name */ #line 139 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2191 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2178 "bison_parser.cpp" /* yacc.c:1257 */ break; case 232: /* alias */ #line 140 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 2197 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2184 "bison_parser.cpp" /* yacc.c:1257 */ break; case 233: /* opt_alias */ #line 140 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 2203 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2190 "bison_parser.cpp" /* yacc.c:1257 */ break; case 234: /* join_clause */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2209 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2196 "bison_parser.cpp" /* yacc.c:1257 */ break; case 235: /* opt_join_type */ #line 138 "bison_parser.y" /* yacc.c:1257 */ { } -#line 2215 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2202 "bison_parser.cpp" /* yacc.c:1257 */ break; case 236: /* join_condition */ #line 149 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2221 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2208 "bison_parser.cpp" /* yacc.c:1257 */ break; case 238: /* ident_commalist */ @@ -2230,7 +2217,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).str_vec)); } -#line 2234 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2221 "bison_parser.cpp" /* yacc.c:1257 */ break; @@ -2349,7 +2336,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2353 "bison_parser.cpp" /* yacc.c:1436 */ +#line 2340 "bison_parser.cpp" /* yacc.c:1436 */ yylsp[0] = yylloc; goto yysetstate; @@ -2554,7 +2541,7 @@ yyreduce: } delete (yyvsp[-1].stmt_vec); } -#line 2558 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2545 "bison_parser.cpp" /* yacc.c:1661 */ break; case 3: @@ -2565,7 +2552,7 @@ yyreduce: (yyval.stmt_vec) = new std::vector(); (yyval.stmt_vec)->push_back((yyvsp[0].statement)); } -#line 2569 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2556 "bison_parser.cpp" /* yacc.c:1661 */ break; case 4: @@ -2576,7 +2563,7 @@ yyreduce: (yyvsp[-2].stmt_vec)->push_back((yyvsp[0].statement)); (yyval.stmt_vec) = (yyvsp[-2].stmt_vec); } -#line 2580 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2567 "bison_parser.cpp" /* yacc.c:1661 */ break; case 5: @@ -2585,7 +2572,7 @@ yyreduce: (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 2589 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2576 "bison_parser.cpp" /* yacc.c:1661 */ break; case 6: @@ -2594,7 +2581,7 @@ yyreduce: (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 2598 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2585 "bison_parser.cpp" /* yacc.c:1661 */ break; case 7: @@ -2602,85 +2589,85 @@ yyreduce: { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 2606 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2593 "bison_parser.cpp" /* yacc.c:1661 */ break; case 8: #line 298 "bison_parser.y" /* yacc.c:1661 */ { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 2612 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2599 "bison_parser.cpp" /* yacc.c:1661 */ break; case 9: #line 299 "bison_parser.y" /* yacc.c:1661 */ { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 2618 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2605 "bison_parser.cpp" /* yacc.c:1661 */ break; case 10: #line 300 "bison_parser.y" /* yacc.c:1661 */ { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 2624 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2611 "bison_parser.cpp" /* yacc.c:1661 */ break; case 11: #line 301 "bison_parser.y" /* yacc.c:1661 */ { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 2630 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2617 "bison_parser.cpp" /* yacc.c:1661 */ break; case 12: #line 302 "bison_parser.y" /* yacc.c:1661 */ { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 2636 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2623 "bison_parser.cpp" /* yacc.c:1661 */ break; case 13: #line 303 "bison_parser.y" /* yacc.c:1661 */ { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 2642 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2629 "bison_parser.cpp" /* yacc.c:1661 */ break; case 14: #line 304 "bison_parser.y" /* yacc.c:1661 */ { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 2648 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2635 "bison_parser.cpp" /* yacc.c:1661 */ break; case 15: #line 305 "bison_parser.y" /* yacc.c:1661 */ { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 2654 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2641 "bison_parser.cpp" /* yacc.c:1661 */ break; case 16: #line 306 "bison_parser.y" /* yacc.c:1661 */ { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 2660 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2647 "bison_parser.cpp" /* yacc.c:1661 */ break; case 17: #line 315 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 2666 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2653 "bison_parser.cpp" /* yacc.c:1661 */ break; case 18: #line 316 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr_vec) = nullptr; } -#line 2672 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2659 "bison_parser.cpp" /* yacc.c:1661 */ break; case 19: #line 321 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 2678 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2665 "bison_parser.cpp" /* yacc.c:1661 */ break; case 20: #line 322 "bison_parser.y" /* yacc.c:1661 */ { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 2684 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2671 "bison_parser.cpp" /* yacc.c:1661 */ break; case 21: @@ -2689,7 +2676,7 @@ yyreduce: (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 2693 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2680 "bison_parser.cpp" /* yacc.c:1661 */ break; case 22: @@ -2699,7 +2686,7 @@ yyreduce: (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 2703 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2690 "bison_parser.cpp" /* yacc.c:1661 */ break; case 23: @@ -2709,7 +2696,7 @@ yyreduce: (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 2713 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2700 "bison_parser.cpp" /* yacc.c:1661 */ break; case 25: @@ -2718,7 +2705,7 @@ yyreduce: (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 2722 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2709 "bison_parser.cpp" /* yacc.c:1661 */ break; case 26: @@ -2728,7 +2715,7 @@ yyreduce: (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 2732 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2719 "bison_parser.cpp" /* yacc.c:1661 */ break; case 27: @@ -2739,19 +2726,19 @@ yyreduce: (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 2743 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2730 "bison_parser.cpp" /* yacc.c:1661 */ break; case 28: #line 377 "bison_parser.y" /* yacc.c:1661 */ { (yyval.uval) = kImportCSV; } -#line 2749 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2736 "bison_parser.cpp" /* yacc.c:1661 */ break; case 29: #line 381 "bison_parser.y" /* yacc.c:1661 */ { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 2755 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2742 "bison_parser.cpp" /* yacc.c:1661 */ break; case 30: @@ -2759,7 +2746,7 @@ yyreduce: { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 2763 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2750 "bison_parser.cpp" /* yacc.c:1661 */ break; case 31: @@ -2769,7 +2756,7 @@ yyreduce: (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } -#line 2773 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2760 "bison_parser.cpp" /* yacc.c:1661 */ break; case 32: @@ -2781,7 +2768,7 @@ yyreduce: (yyval.create_stmt)->tableName = (yyvsp[-4].table_name).name; (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 2785 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2772 "bison_parser.cpp" /* yacc.c:1661 */ break; case 33: @@ -2793,7 +2780,7 @@ yyreduce: (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->columns = (yyvsp[-1].column_vec); } -#line 2797 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2784 "bison_parser.cpp" /* yacc.c:1661 */ break; case 34: @@ -2806,31 +2793,31 @@ yyreduce: (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 2810 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2797 "bison_parser.cpp" /* yacc.c:1661 */ break; case 35: #line 433 "bison_parser.y" /* yacc.c:1661 */ { (yyval.bval) = true; } -#line 2816 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2803 "bison_parser.cpp" /* yacc.c:1661 */ break; case 36: #line 434 "bison_parser.y" /* yacc.c:1661 */ { (yyval.bval) = false; } -#line 2822 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2809 "bison_parser.cpp" /* yacc.c:1661 */ break; case 37: #line 438 "bison_parser.y" /* yacc.c:1661 */ { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 2828 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2815 "bison_parser.cpp" /* yacc.c:1661 */ break; case 38: #line 439 "bison_parser.y" /* yacc.c:1661 */ { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 2834 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2821 "bison_parser.cpp" /* yacc.c:1661 */ break; case 39: @@ -2838,31 +2825,31 @@ yyreduce: { (yyval.column_t) = new ColumnDefinition((yyvsp[-1].sval), (ColumnDefinition::DataType) (yyvsp[0].uval)); } -#line 2842 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2829 "bison_parser.cpp" /* yacc.c:1661 */ break; case 40: #line 450 "bison_parser.y" /* yacc.c:1661 */ { (yyval.uval) = ColumnDefinition::INT; } -#line 2848 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2835 "bison_parser.cpp" /* yacc.c:1661 */ break; case 41: #line 451 "bison_parser.y" /* yacc.c:1661 */ { (yyval.uval) = ColumnDefinition::INT; } -#line 2854 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2841 "bison_parser.cpp" /* yacc.c:1661 */ break; case 42: #line 452 "bison_parser.y" /* yacc.c:1661 */ { (yyval.uval) = ColumnDefinition::DOUBLE; } -#line 2860 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2847 "bison_parser.cpp" /* yacc.c:1661 */ break; case 43: #line 453 "bison_parser.y" /* yacc.c:1661 */ { (yyval.uval) = ColumnDefinition::TEXT; } -#line 2866 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2853 "bison_parser.cpp" /* yacc.c:1661 */ break; case 44: @@ -2873,7 +2860,7 @@ yyreduce: (yyval.drop_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; } -#line 2877 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2864 "bison_parser.cpp" /* yacc.c:1661 */ break; case 45: @@ -2884,7 +2871,7 @@ yyreduce: (yyval.drop_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; } -#line 2888 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2875 "bison_parser.cpp" /* yacc.c:1661 */ break; case 46: @@ -2894,19 +2881,19 @@ yyreduce: (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 2898 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2885 "bison_parser.cpp" /* yacc.c:1661 */ break; case 47: #line 483 "bison_parser.y" /* yacc.c:1661 */ { (yyval.bval) = true; } -#line 2904 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2891 "bison_parser.cpp" /* yacc.c:1661 */ break; case 48: #line 484 "bison_parser.y" /* yacc.c:1661 */ { (yyval.bval) = false; } -#line 2910 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2897 "bison_parser.cpp" /* yacc.c:1661 */ break; case 49: @@ -2917,7 +2904,7 @@ yyreduce: (yyval.delete_stmt)->tableName = (yyvsp[-1].table_name).name; (yyval.delete_stmt)->expr = (yyvsp[0].expr); } -#line 2921 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2908 "bison_parser.cpp" /* yacc.c:1661 */ break; case 50: @@ -2927,7 +2914,7 @@ yyreduce: (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 2931 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2918 "bison_parser.cpp" /* yacc.c:1661 */ break; case 51: @@ -2939,7 +2926,7 @@ yyreduce: (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 2943 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2930 "bison_parser.cpp" /* yacc.c:1661 */ break; case 52: @@ -2951,19 +2938,19 @@ yyreduce: (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 2955 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2942 "bison_parser.cpp" /* yacc.c:1661 */ break; case 53: #line 533 "bison_parser.y" /* yacc.c:1661 */ { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 2961 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2948 "bison_parser.cpp" /* yacc.c:1661 */ break; case 54: #line 534 "bison_parser.y" /* yacc.c:1661 */ { (yyval.str_vec) = nullptr; } -#line 2967 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2954 "bison_parser.cpp" /* yacc.c:1661 */ break; case 55: @@ -2974,19 +2961,19 @@ yyreduce: (yyval.update_stmt)->updates = (yyvsp[-1].update_vec); (yyval.update_stmt)->where = (yyvsp[0].expr); } -#line 2978 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2965 "bison_parser.cpp" /* yacc.c:1661 */ break; case 56: #line 553 "bison_parser.y" /* yacc.c:1661 */ { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 2984 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2971 "bison_parser.cpp" /* yacc.c:1661 */ break; case 57: #line 554 "bison_parser.y" /* yacc.c:1661 */ { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 2990 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2977 "bison_parser.cpp" /* yacc.c:1661 */ break; case 58: @@ -2996,7 +2983,7 @@ yyreduce: (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3000 "bison_parser.cpp" /* yacc.c:1661 */ +#line 2987 "bison_parser.cpp" /* yacc.c:1661 */ break; case 61: @@ -3015,19 +3002,19 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3019 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3006 "bison_parser.cpp" /* yacc.c:1661 */ break; case 62: #line 589 "bison_parser.y" /* yacc.c:1661 */ { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3025 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3012 "bison_parser.cpp" /* yacc.c:1661 */ break; case 63: #line 590 "bison_parser.y" /* yacc.c:1661 */ { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3031 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3018 "bison_parser.cpp" /* yacc.c:1661 */ break; case 66: @@ -3042,7 +3029,7 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3046 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3033 "bison_parser.cpp" /* yacc.c:1661 */ break; case 67: @@ -3061,7 +3048,7 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3065 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3052 "bison_parser.cpp" /* yacc.c:1661 */ break; case 74: @@ -3075,37 +3062,37 @@ yyreduce: (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3079 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3066 "bison_parser.cpp" /* yacc.c:1661 */ break; case 75: #line 653 "bison_parser.y" /* yacc.c:1661 */ { (yyval.bval) = true; } -#line 3085 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3072 "bison_parser.cpp" /* yacc.c:1661 */ break; case 76: #line 654 "bison_parser.y" /* yacc.c:1661 */ { (yyval.bval) = false; } -#line 3091 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3078 "bison_parser.cpp" /* yacc.c:1661 */ break; case 78: #line 662 "bison_parser.y" /* yacc.c:1661 */ { (yyval.table) = (yyvsp[0].table); } -#line 3097 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3084 "bison_parser.cpp" /* yacc.c:1661 */ break; case 79: #line 667 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = (yyvsp[0].expr); } -#line 3103 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3090 "bison_parser.cpp" /* yacc.c:1661 */ break; case 80: #line 668 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = nullptr; } -#line 3109 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3096 "bison_parser.cpp" /* yacc.c:1661 */ break; case 81: @@ -3115,127 +3102,127 @@ yyreduce: (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3119 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3106 "bison_parser.cpp" /* yacc.c:1661 */ break; case 82: #line 677 "bison_parser.y" /* yacc.c:1661 */ { (yyval.group_t) = nullptr; } -#line 3125 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3112 "bison_parser.cpp" /* yacc.c:1661 */ break; case 83: #line 681 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = (yyvsp[0].expr); } -#line 3131 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3118 "bison_parser.cpp" /* yacc.c:1661 */ break; case 84: #line 682 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = nullptr; } -#line 3137 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3124 "bison_parser.cpp" /* yacc.c:1661 */ break; case 85: #line 685 "bison_parser.y" /* yacc.c:1661 */ { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3143 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3130 "bison_parser.cpp" /* yacc.c:1661 */ break; case 86: #line 686 "bison_parser.y" /* yacc.c:1661 */ { (yyval.order_vec) = nullptr; } -#line 3149 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3136 "bison_parser.cpp" /* yacc.c:1661 */ break; case 87: #line 690 "bison_parser.y" /* yacc.c:1661 */ { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3155 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3142 "bison_parser.cpp" /* yacc.c:1661 */ break; case 88: #line 691 "bison_parser.y" /* yacc.c:1661 */ { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3161 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3148 "bison_parser.cpp" /* yacc.c:1661 */ break; case 89: #line 695 "bison_parser.y" /* yacc.c:1661 */ { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3167 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3154 "bison_parser.cpp" /* yacc.c:1661 */ break; case 90: #line 699 "bison_parser.y" /* yacc.c:1661 */ { (yyval.order_type) = kOrderAsc; } -#line 3173 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3160 "bison_parser.cpp" /* yacc.c:1661 */ break; case 91: #line 700 "bison_parser.y" /* yacc.c:1661 */ { (yyval.order_type) = kOrderDesc; } -#line 3179 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3166 "bison_parser.cpp" /* yacc.c:1661 */ break; case 92: #line 701 "bison_parser.y" /* yacc.c:1661 */ { (yyval.order_type) = kOrderAsc; } -#line 3185 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3172 "bison_parser.cpp" /* yacc.c:1661 */ break; case 93: #line 707 "bison_parser.y" /* yacc.c:1661 */ { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } -#line 3191 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3178 "bison_parser.cpp" /* yacc.c:1661 */ break; case 94: #line 708 "bison_parser.y" /* yacc.c:1661 */ { (yyval.limit) = nullptr; } -#line 3197 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3184 "bison_parser.cpp" /* yacc.c:1661 */ break; case 95: #line 712 "bison_parser.y" /* yacc.c:1661 */ { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } -#line 3203 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3190 "bison_parser.cpp" /* yacc.c:1661 */ break; case 96: #line 713 "bison_parser.y" /* yacc.c:1661 */ { (yyval.limit) = new LimitDescription((yyvsp[-2].expr)->ival, (yyvsp[0].expr)->ival); delete (yyvsp[-2].expr); delete (yyvsp[0].expr); } -#line 3209 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3196 "bison_parser.cpp" /* yacc.c:1661 */ break; case 97: #line 714 "bison_parser.y" /* yacc.c:1661 */ { (yyval.limit) = nullptr; } -#line 3215 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3202 "bison_parser.cpp" /* yacc.c:1661 */ break; case 98: #line 721 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3221 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3208 "bison_parser.cpp" /* yacc.c:1661 */ break; case 99: #line 722 "bison_parser.y" /* yacc.c:1661 */ { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3227 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3214 "bison_parser.cpp" /* yacc.c:1661 */ break; case 100: #line 726 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3233 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3220 "bison_parser.cpp" /* yacc.c:1661 */ break; case 101: #line 727 "bison_parser.y" /* yacc.c:1661 */ { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3239 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3226 "bison_parser.cpp" /* yacc.c:1661 */ break; case 102: @@ -3244,307 +3231,307 @@ yyreduce: (yyval.expr) = (yyvsp[-1].expr); (yyval.expr)->alias = (yyvsp[0].sval); } -#line 3248 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3235 "bison_parser.cpp" /* yacc.c:1661 */ break; case 108: #line 746 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = (yyvsp[-1].expr); } -#line 3254 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3241 "bison_parser.cpp" /* yacc.c:1661 */ break; case 116: #line 754 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 3260 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3247 "bison_parser.cpp" /* yacc.c:1661 */ break; case 119: #line 763 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 3266 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3253 "bison_parser.cpp" /* yacc.c:1661 */ break; case 120: #line 764 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 3272 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3259 "bison_parser.cpp" /* yacc.c:1661 */ break; case 121: #line 765 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 3278 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3265 "bison_parser.cpp" /* yacc.c:1661 */ break; case 122: #line 766 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 3284 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3271 "bison_parser.cpp" /* yacc.c:1661 */ break; case 123: #line 767 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 3290 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3277 "bison_parser.cpp" /* yacc.c:1661 */ break; case 125: #line 772 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 3296 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3283 "bison_parser.cpp" /* yacc.c:1661 */ break; case 126: #line 773 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 3302 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3289 "bison_parser.cpp" /* yacc.c:1661 */ break; case 127: #line 774 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 3308 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3295 "bison_parser.cpp" /* yacc.c:1661 */ break; case 128: #line 775 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 3314 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3301 "bison_parser.cpp" /* yacc.c:1661 */ break; case 129: #line 776 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 3320 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3307 "bison_parser.cpp" /* yacc.c:1661 */ break; case 130: #line 777 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 3326 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3313 "bison_parser.cpp" /* yacc.c:1661 */ break; case 131: #line 778 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 3332 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3319 "bison_parser.cpp" /* yacc.c:1661 */ break; case 132: #line 779 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 3338 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3325 "bison_parser.cpp" /* yacc.c:1661 */ break; case 133: #line 780 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 3344 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3331 "bison_parser.cpp" /* yacc.c:1661 */ break; case 134: #line 781 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 3350 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3337 "bison_parser.cpp" /* yacc.c:1661 */ break; case 135: #line 785 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 3356 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3343 "bison_parser.cpp" /* yacc.c:1661 */ break; case 136: #line 786 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 3362 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3349 "bison_parser.cpp" /* yacc.c:1661 */ break; case 137: #line 790 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 3368 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3355 "bison_parser.cpp" /* yacc.c:1661 */ break; case 138: #line 791 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 3374 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3361 "bison_parser.cpp" /* yacc.c:1661 */ break; case 139: #line 792 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 3380 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3367 "bison_parser.cpp" /* yacc.c:1661 */ break; case 140: #line 793 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 3386 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3373 "bison_parser.cpp" /* yacc.c:1661 */ break; case 141: #line 799 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 3392 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3379 "bison_parser.cpp" /* yacc.c:1661 */ break; case 142: #line 800 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 3398 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3385 "bison_parser.cpp" /* yacc.c:1661 */ break; case 143: #line 801 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 3404 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3391 "bison_parser.cpp" /* yacc.c:1661 */ break; case 144: #line 802 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 3410 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3397 "bison_parser.cpp" /* yacc.c:1661 */ break; case 145: #line 806 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 3416 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3403 "bison_parser.cpp" /* yacc.c:1661 */ break; case 146: #line 807 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 3422 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3409 "bison_parser.cpp" /* yacc.c:1661 */ break; case 147: #line 811 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 3428 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3415 "bison_parser.cpp" /* yacc.c:1661 */ break; case 148: #line 812 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 3434 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3421 "bison_parser.cpp" /* yacc.c:1661 */ break; case 149: #line 816 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 3440 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3427 "bison_parser.cpp" /* yacc.c:1661 */ break; case 150: #line 817 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 3446 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3433 "bison_parser.cpp" /* yacc.c:1661 */ break; case 151: #line 818 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 3452 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3439 "bison_parser.cpp" /* yacc.c:1661 */ break; case 152: #line 819 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 3458 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3445 "bison_parser.cpp" /* yacc.c:1661 */ break; case 153: #line 820 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 3464 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3451 "bison_parser.cpp" /* yacc.c:1661 */ break; case 154: #line 821 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 3470 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3457 "bison_parser.cpp" /* yacc.c:1661 */ break; case 155: #line 825 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 3476 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3463 "bison_parser.cpp" /* yacc.c:1661 */ break; case 156: #line 826 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 3482 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3469 "bison_parser.cpp" /* yacc.c:1661 */ break; case 157: #line 830 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 3488 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3475 "bison_parser.cpp" /* yacc.c:1661 */ break; case 158: #line 834 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 3494 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3481 "bison_parser.cpp" /* yacc.c:1661 */ break; case 159: #line 838 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 3500 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3487 "bison_parser.cpp" /* yacc.c:1661 */ break; case 160: #line 842 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 3506 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3493 "bison_parser.cpp" /* yacc.c:1661 */ break; case 161: #line 843 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 3512 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3499 "bison_parser.cpp" /* yacc.c:1661 */ break; case 162: #line 844 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeStar(); } -#line 3518 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3505 "bison_parser.cpp" /* yacc.c:1661 */ break; case 163: #line 845 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 3524 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3511 "bison_parser.cpp" /* yacc.c:1661 */ break; case 168: #line 856 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 3530 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3517 "bison_parser.cpp" /* yacc.c:1661 */ break; case 169: #line 861 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 3536 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3523 "bison_parser.cpp" /* yacc.c:1661 */ break; case 171: #line 866 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 3542 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3529 "bison_parser.cpp" /* yacc.c:1661 */ break; case 172: #line 870 "bison_parser.y" /* yacc.c:1661 */ { (yyval.expr) = Expr::makeNullLiteral(); } -#line 3548 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3535 "bison_parser.cpp" /* yacc.c:1661 */ break; case 173: @@ -3554,18 +3541,18 @@ yyreduce: (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 3558 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3545 "bison_parser.cpp" /* yacc.c:1661 */ break; case 175: #line 887 "bison_parser.y" /* yacc.c:1661 */ { - (yyvsp[0].table_vec)->push_back((yyvsp[-2].table)); + (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); - tbl->list = (yyvsp[0].table_vec); + tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 3569 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3556 "bison_parser.cpp" /* yacc.c:1661 */ break; case 179: @@ -3576,19 +3563,19 @@ yyreduce: tbl->alias = (yyvsp[0].sval); (yyval.table) = tbl; } -#line 3580 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3567 "bison_parser.cpp" /* yacc.c:1661 */ break; case 180: #line 912 "bison_parser.y" /* yacc.c:1661 */ { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 3586 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3573 "bison_parser.cpp" /* yacc.c:1661 */ break; case 181: #line 913 "bison_parser.y" /* yacc.c:1661 */ { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 3592 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3579 "bison_parser.cpp" /* yacc.c:1661 */ break; case 182: @@ -3600,7 +3587,7 @@ yyreduce: tbl->alias = (yyvsp[0].sval); (yyval.table) = tbl; } -#line 3604 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3591 "bison_parser.cpp" /* yacc.c:1661 */ break; case 183: @@ -3610,31 +3597,31 @@ yyreduce: (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 3614 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3601 "bison_parser.cpp" /* yacc.c:1661 */ break; case 184: #line 938 "bison_parser.y" /* yacc.c:1661 */ { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 3620 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3607 "bison_parser.cpp" /* yacc.c:1661 */ break; case 185: #line 939 "bison_parser.y" /* yacc.c:1661 */ { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 3626 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3613 "bison_parser.cpp" /* yacc.c:1661 */ break; case 186: #line 944 "bison_parser.y" /* yacc.c:1661 */ { (yyval.sval) = (yyvsp[0].sval); } -#line 3632 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3619 "bison_parser.cpp" /* yacc.c:1661 */ break; case 189: #line 950 "bison_parser.y" /* yacc.c:1661 */ { (yyval.sval) = nullptr; } -#line 3638 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3625 "bison_parser.cpp" /* yacc.c:1661 */ break; case 190: @@ -3646,7 +3633,7 @@ yyreduce: (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 3650 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3637 "bison_parser.cpp" /* yacc.c:1661 */ break; case 191: @@ -3659,7 +3646,7 @@ yyreduce: (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 3663 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3650 "bison_parser.cpp" /* yacc.c:1661 */ break; case 192: @@ -3679,71 +3666,71 @@ yyreduce: (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 3683 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3670 "bison_parser.cpp" /* yacc.c:1661 */ break; case 193: #line 995 "bison_parser.y" /* yacc.c:1661 */ { (yyval.uval) = kJoinInner; } -#line 3689 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3676 "bison_parser.cpp" /* yacc.c:1661 */ break; case 194: #line 996 "bison_parser.y" /* yacc.c:1661 */ { (yyval.uval) = kJoinOuter; } -#line 3695 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3682 "bison_parser.cpp" /* yacc.c:1661 */ break; case 195: #line 997 "bison_parser.y" /* yacc.c:1661 */ { (yyval.uval) = kJoinLeftOuter; } -#line 3701 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3688 "bison_parser.cpp" /* yacc.c:1661 */ break; case 196: #line 998 "bison_parser.y" /* yacc.c:1661 */ { (yyval.uval) = kJoinRightOuter; } -#line 3707 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3694 "bison_parser.cpp" /* yacc.c:1661 */ break; case 197: #line 999 "bison_parser.y" /* yacc.c:1661 */ { (yyval.uval) = kJoinLeft; } -#line 3713 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3700 "bison_parser.cpp" /* yacc.c:1661 */ break; case 198: #line 1000 "bison_parser.y" /* yacc.c:1661 */ { (yyval.uval) = kJoinRight; } -#line 3719 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3706 "bison_parser.cpp" /* yacc.c:1661 */ break; case 199: #line 1001 "bison_parser.y" /* yacc.c:1661 */ { (yyval.uval) = kJoinCross; } -#line 3725 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3712 "bison_parser.cpp" /* yacc.c:1661 */ break; case 200: #line 1002 "bison_parser.y" /* yacc.c:1661 */ { (yyval.uval) = kJoinInner; } -#line 3731 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3718 "bison_parser.cpp" /* yacc.c:1661 */ break; case 204: #line 1022 "bison_parser.y" /* yacc.c:1661 */ { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 3737 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3724 "bison_parser.cpp" /* yacc.c:1661 */ break; case 205: #line 1023 "bison_parser.y" /* yacc.c:1661 */ { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 3743 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3730 "bison_parser.cpp" /* yacc.c:1661 */ break; -#line 3747 "bison_parser.cpp" /* yacc.c:1661 */ +#line 3734 "bison_parser.cpp" /* yacc.c:1661 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 3e07179..0d98897 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -793,7 +793,7 @@ in_expr: | operand NOT IN '(' select_no_paren ')' { $$ = Expr::makeOpUnary(kOpNot, Expr::makeInOperator($1, $5)); } ; -// CASE grammar based on: flex & bison by John Levine +// CASE grammar based on: flex & bison by John Levine // https://www.safaribooksonline.com/library/view/flex-bison/9780596805418/ch04.html#id352665 case_expr: CASE expr case_list END { $$ = Expr::makeCase($2, $3, nullptr); } @@ -884,10 +884,10 @@ param_expr: ******************************/ table_ref: table_ref_atomic - | table_ref_atomic ',' table_ref_commalist { - $3->push_back($1); + | table_ref_commalist ',' table_ref_atomic { + $1->push_back($3); auto tbl = new TableRef(kTableCrossProduct); - tbl->list = $3; + tbl->list = $1; $$ = tbl; } ; diff --git a/test/select_tests.cpp b/test/select_tests.cpp index 5353201..3197a31 100644 --- a/test/select_tests.cpp +++ b/test/select_tests.cpp @@ -325,3 +325,25 @@ TEST(SelectJoin) { ASSERT_STREQ(inner_join->condition->expr2->table, "City"); ASSERT_STREQ(inner_join->condition->expr2->name, "id"); } + + +TEST(SelectColumnOrder) { + TEST_PARSE_SINGLE_SQL( + "SELECT *\ + FROM a,\ + (SELECT a AS b FROM a) b,\ + (SELECT a AS c FROM a) c,\ + (SELECT a AS d FROM a) d;", + kStmtSelect, + SelectStatement, + result, + stmt); + + ASSERT_EQ(stmt->fromTable->list->size(), 4); + + // Make sure the order of the table list is corrects + ASSERT_STREQ(stmt->fromTable->list->at(0)->name, "a"); + ASSERT_STREQ(stmt->fromTable->list->at(1)->alias, "b"); + ASSERT_STREQ(stmt->fromTable->list->at(2)->alias, "c"); + ASSERT_STREQ(stmt->fromTable->list->at(3)->alias, "d"); +}