You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@quickstep.apache.org by hb...@apache.org on 2016/10/04 00:08:30 UTC
[1/5] incubator-quickstep git commit: Refactored RebuildStatus.
[Forced Update!]
Repository: incubator-quickstep
Updated Branches:
refs/heads/fix-fasthash-destructor 29fda90cf -> 3616e4dfe (forced update)
Refactored RebuildStatus.
Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/6b377d5d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/6b377d5d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/6b377d5d
Branch: refs/heads/fix-fasthash-destructor
Commit: 6b377d5d6c6f2e05ef74a4c1a022590af2db6571
Parents: ac3512c
Author: Zuyu Zhang <zu...@twitter.com>
Authored: Sat Sep 24 15:05:16 2016 -0700
Committer: Zuyu Zhang <zu...@twitter.com>
Committed: Sat Sep 24 15:05:16 2016 -0700
----------------------------------------------------------------------
query_execution/QueryExecutionState.hpp | 72 ++++++++++++++++++++--------
1 file changed, 53 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/6b377d5d/query_execution/QueryExecutionState.hpp
----------------------------------------------------------------------
diff --git a/query_execution/QueryExecutionState.hpp b/query_execution/QueryExecutionState.hpp
index 9ae9563..f5281d5 100644
--- a/query_execution/QueryExecutionState.hpp
+++ b/query_execution/QueryExecutionState.hpp
@@ -92,8 +92,15 @@ class QueryExecutionState {
const std::size_t num_rebuild_workorders,
const bool rebuild_initiated) {
DCHECK(operator_index < num_operators_);
- rebuild_status_[operator_index].second = num_rebuild_workorders;
- rebuild_status_[operator_index].first = rebuild_initiated;
+ auto search_res = rebuild_status_.find(operator_index);
+ if (search_res != rebuild_status_.end()) {
+ search_res->second.has_initiated = rebuild_initiated;
+ search_res->second.num_pending_workorders = num_rebuild_workorders;
+ } else {
+ RebuildStatus rebuild_status(rebuild_initiated, num_rebuild_workorders);
+
+ rebuild_status_.emplace(operator_index, std::move(rebuild_status));
+ }
}
/**
@@ -107,7 +114,7 @@ class QueryExecutionState {
DCHECK(operator_index < num_operators_);
const auto search_res = rebuild_status_.find(operator_index);
if (search_res != rebuild_status_.end()) {
- return search_res->second.first;
+ return search_res->second.has_initiated;
}
return false;
}
@@ -124,7 +131,7 @@ class QueryExecutionState {
DCHECK(operator_index < num_operators_);
const auto search_res = rebuild_status_.find(operator_index);
if (search_res != rebuild_status_.end()) {
- return search_res->second.second;
+ return search_res->second.num_pending_workorders;
}
LOG(WARNING) << "Called QueryExecutionState::getNumRebuildWorkOrders() "
"for an operator whose rebuild entry doesn't exist.";
@@ -132,22 +139,39 @@ class QueryExecutionState {
}
/**
+ * @brief Increment the number of rebuild WorkOrders for the given operator.
+ *
+ * @param operator_index The index of the given operator.
+ * @param num_rebuild_workorders The number of rebuild workorders of the given
+ * operator.
+ **/
+ inline void incrementNumRebuildWorkOrders(const std::size_t operator_index,
+ const std::size_t num_rebuild_workorders) {
+ DCHECK_LT(operator_index, num_operators_);
+ auto search_res = rebuild_status_.find(operator_index);
+ DCHECK(search_res != rebuild_status_.end())
+ << "Called for an operator whose rebuild status does not exist.";
+ DCHECK(search_res->second.has_initiated);
+
+ search_res->second.num_pending_workorders += num_rebuild_workorders;
+ }
+
+ /**
* @brief Decrement the number of rebuild WorkOrders for the given operator.
*
* @param operator_index The index of the given operator.
**/
inline void decrementNumRebuildWorkOrders(const std::size_t operator_index) {
DCHECK(operator_index < num_operators_);
- const auto search_res = rebuild_status_.find(operator_index);
- if (search_res != rebuild_status_.end()) {
- DCHECK(search_res->second.first);
- DCHECK_GE(search_res->second.second, 1u);
- --rebuild_status_[operator_index].second;
- } else {
- LOG(FATAL) <<
- "Called QueryExecutionState::decrementNumRebuildWorkOrders() for an "
- "operator whose rebuild entry doesn't exist.";
- }
+ auto search_res = rebuild_status_.find(operator_index);
+ CHECK(search_res != rebuild_status_.end())
+ << "Called QueryExecutionState::decrementNumRebuildWorkOrders() for an "
+ "operator whose rebuild entry doesn't exist.";
+
+ DCHECK(search_res->second.has_initiated);
+ DCHECK_GE(search_res->second.num_pending_workorders, 1u);
+
+ --(search_res->second.num_pending_workorders);
}
/**
@@ -279,11 +303,21 @@ class QueryExecutionState {
// The ith bit denotes if the operator with ID = i has finished its execution.
std::vector<bool> execution_finished_;
- // Key is dag_node_index for which rebuild is required. Value is a pair -
- // first element is a bool (whether rebuild for operator at index i has been
- // initiated) and if the boolean is true, the second element denotes the
- // number of pending rebuild workorders for the operator.
- std::unordered_map<std::size_t, std::pair<bool, std::size_t>> rebuild_status_;
+ struct RebuildStatus {
+ RebuildStatus(const bool initiated,
+ const std::size_t num_workorders)
+ : has_initiated(initiated),
+ num_pending_workorders(num_workorders) {}
+
+ // Whether rebuild for operator at index i has been initiated.
+ bool has_initiated;
+ // The number of pending rebuild workorders for the operator.
+ // Valid if and only if 'has_initiated' is true.
+ std::size_t num_pending_workorders;
+ };
+
+ // Key is dag_node_index for which rebuild is required.
+ std::unordered_map<std::size_t, RebuildStatus> rebuild_status_;
DISALLOW_COPY_AND_ASSIGN(QueryExecutionState);
};
[3/5] incubator-quickstep git commit: Checking in preprocessed files
for datetime change.
Posted by hb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/0820e3d9/parser/preprocessed/SqlParser_gen.cpp
----------------------------------------------------------------------
diff --git a/parser/preprocessed/SqlParser_gen.cpp b/parser/preprocessed/SqlParser_gen.cpp
index 8fdf490..283bcbe 100644
--- a/parser/preprocessed/SqlParser_gen.cpp
+++ b/parser/preprocessed/SqlParser_gen.cpp
@@ -1,19 +1,19 @@
-/* A Bison parser, made by GNU Bison 2.7. */
+/* A Bison parser, made by GNU Bison 3.0.2. */
/* Bison implementation for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
-
+
+ Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -26,7 +26,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -44,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.7"
+#define YYBISON_VERSION "3.0.2"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -63,15 +63,12 @@
#define yyparse quickstep_yyparse
#define yylex quickstep_yylex
#define yyerror quickstep_yyerror
-#define yylval quickstep_yylval
-#define yychar quickstep_yychar
#define yydebug quickstep_yydebug
#define yynerrs quickstep_yynerrs
-#define yylloc quickstep_yylloc
+
/* Copy the first part of user declarations. */
-/* Line 371 of yacc.c */
-#line 35 "../SqlParser.ypp"
+#line 35 "../SqlParser.ypp" /* yacc.c:339 */
/* Override the default definition, as we only need <first_line> and <first_column>. */
@@ -99,8 +96,7 @@ typedef struct YYLTYPE {
} \
} while (0)
-/* Line 371 of yacc.c */
-#line 64 "../SqlParser.ypp"
+#line 64 "../SqlParser.ypp" /* yacc.c:339 */
#include <cstdlib>
#include <string>
@@ -156,14 +152,13 @@ typedef struct YYLTYPE {
// Needed for Bison 2.6 and higher, which do not automatically provide this typedef.
typedef void* yyscan_t;
-/* Line 371 of yacc.c */
-#line 161 "SqlParser_gen.cpp"
+#line 156 "SqlParser_gen.cpp" /* yacc.c:339 */
-# ifndef YY_NULL
+# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
-# define YY_NULL nullptr
+# define YY_NULLPTR nullptr
# else
-# define YY_NULL 0
+# define YY_NULLPTR 0
# endif
# endif
@@ -179,7 +174,7 @@ typedef void* yyscan_t;
by #include "SqlParser_gen.hpp". */
#ifndef YY_QUICKSTEP_YY_SQLPARSER_GEN_HPP_INCLUDED
# define YY_QUICKSTEP_YY_SQLPARSER_GEN_HPP_INCLUDED
-/* Enabling traces. */
+/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
@@ -187,152 +182,151 @@ typedef void* yyscan_t;
extern int quickstep_yydebug;
#endif
-/* Tokens. */
+/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- TOKEN_COMMAND = 258,
- TOKEN_NAME = 259,
- TOKEN_STRING_SINGLE_QUOTED = 260,
- TOKEN_STRING_DOUBLE_QUOTED = 261,
- TOKEN_UNSIGNED_NUMVAL = 262,
- TOKEN_OR = 263,
- TOKEN_AND = 264,
- TOKEN_NOT = 265,
- TOKEN_EQ = 266,
- TOKEN_NEQ = 267,
- TOKEN_GEQ = 268,
- TOKEN_GT = 269,
- TOKEN_LEQ = 270,
- TOKEN_LT = 271,
- TOKEN_REGEXP = 272,
- TOKEN_LIKE = 273,
- TOKEN_BETWEEN = 274,
- TOKEN_IS = 275,
- UNARY_MINUS = 276,
- UNARY_PLUS = 277,
- TOKEN_ADD = 278,
- TOKEN_ALL = 279,
- TOKEN_ALTER = 280,
- TOKEN_AS = 281,
- TOKEN_ASC = 282,
- TOKEN_BIGINT = 283,
- TOKEN_BIT = 284,
- TOKEN_BITWEAVING = 285,
- TOKEN_BLOCKPROPERTIES = 286,
- TOKEN_BLOCKSAMPLE = 287,
- TOKEN_BLOOM_FILTER = 288,
- TOKEN_CSB_TREE = 289,
- TOKEN_BY = 290,
- TOKEN_CASE = 291,
- TOKEN_CHARACTER = 292,
- TOKEN_CHECK = 293,
- TOKEN_COLUMN = 294,
- TOKEN_CONSTRAINT = 295,
- TOKEN_COPY = 296,
- TOKEN_CREATE = 297,
- TOKEN_CURRENT = 298,
- TOKEN_DATE = 299,
- TOKEN_DATETIME = 300,
- TOKEN_DAY = 301,
- TOKEN_DECIMAL = 302,
- TOKEN_DEFAULT = 303,
- TOKEN_DELETE = 304,
- TOKEN_DELIMITER = 305,
- TOKEN_DESC = 306,
- TOKEN_DISTINCT = 307,
- TOKEN_DOUBLE = 308,
- TOKEN_DROP = 309,
- TOKEN_ELSE = 310,
- TOKEN_END = 311,
- TOKEN_ESCAPE_STRINGS = 312,
- TOKEN_EXISTS = 313,
- TOKEN_EXTRACT = 314,
- TOKEN_FALSE = 315,
- TOKEN_FIRST = 316,
- TOKEN_FLOAT = 317,
- TOKEN_FOLLOWING = 318,
- TOKEN_FOR = 319,
- TOKEN_FOREIGN = 320,
- TOKEN_FROM = 321,
- TOKEN_FULL = 322,
- TOKEN_GROUP = 323,
- TOKEN_HASH = 324,
- TOKEN_HAVING = 325,
- TOKEN_HOUR = 326,
- TOKEN_IN = 327,
- TOKEN_INDEX = 328,
- TOKEN_INNER = 329,
- TOKEN_INSERT = 330,
- TOKEN_INTEGER = 331,
- TOKEN_INTERVAL = 332,
- TOKEN_INTO = 333,
- TOKEN_JOIN = 334,
- TOKEN_KEY = 335,
- TOKEN_LAST = 336,
- TOKEN_LEFT = 337,
- TOKEN_LIMIT = 338,
- TOKEN_LONG = 339,
- TOKEN_MINUTE = 340,
- TOKEN_MONTH = 341,
- TOKEN_NULL = 342,
- TOKEN_NULLS = 343,
- TOKEN_OFF = 344,
- TOKEN_ON = 345,
- TOKEN_ORDER = 346,
- TOKEN_OUTER = 347,
- TOKEN_OVER = 348,
- TOKEN_PARTITION = 349,
- TOKEN_PARTITIONS = 350,
- TOKEN_PERCENT = 351,
- TOKEN_PRECEDING = 352,
- TOKEN_PRIMARY = 353,
- TOKEN_PRIORITY = 354,
- TOKEN_QUIT = 355,
- TOKEN_RANGE = 356,
- TOKEN_REAL = 357,
- TOKEN_REFERENCES = 358,
- TOKEN_RIGHT = 359,
- TOKEN_ROW = 360,
- TOKEN_ROW_DELIMITER = 361,
- TOKEN_ROWS = 362,
- TOKEN_SECOND = 363,
- TOKEN_SELECT = 364,
- TOKEN_SET = 365,
- TOKEN_SMA = 366,
- TOKEN_SMALLINT = 367,
- TOKEN_SUBSTRING = 368,
- TOKEN_TABLE = 369,
- TOKEN_THEN = 370,
- TOKEN_TIME = 371,
- TOKEN_TIMESTAMP = 372,
- TOKEN_TRUE = 373,
- TOKEN_TUPLESAMPLE = 374,
- TOKEN_UNBOUNDED = 375,
- TOKEN_UNIQUE = 376,
- TOKEN_UPDATE = 377,
- TOKEN_USING = 378,
- TOKEN_VALUES = 379,
- TOKEN_VARCHAR = 380,
- TOKEN_WHEN = 381,
- TOKEN_WHERE = 382,
- TOKEN_WINDOW = 383,
- TOKEN_WITH = 384,
- TOKEN_YEAR = 385,
- TOKEN_YEARMONTH = 386,
- TOKEN_EOF = 387,
- TOKEN_LEX_ERROR = 388
- };
+ enum yytokentype
+ {
+ TOKEN_COMMAND = 258,
+ TOKEN_NAME = 259,
+ TOKEN_STRING_SINGLE_QUOTED = 260,
+ TOKEN_STRING_DOUBLE_QUOTED = 261,
+ TOKEN_UNSIGNED_NUMVAL = 262,
+ TOKEN_OR = 263,
+ TOKEN_AND = 264,
+ TOKEN_NOT = 265,
+ TOKEN_EQ = 266,
+ TOKEN_LT = 267,
+ TOKEN_LEQ = 268,
+ TOKEN_GT = 269,
+ TOKEN_GEQ = 270,
+ TOKEN_NEQ = 271,
+ TOKEN_LIKE = 272,
+ TOKEN_REGEXP = 273,
+ TOKEN_BETWEEN = 274,
+ TOKEN_IS = 275,
+ UNARY_PLUS = 276,
+ UNARY_MINUS = 277,
+ TOKEN_ADD = 278,
+ TOKEN_ALL = 279,
+ TOKEN_ALTER = 280,
+ TOKEN_AS = 281,
+ TOKEN_ASC = 282,
+ TOKEN_BIGINT = 283,
+ TOKEN_BIT = 284,
+ TOKEN_BITWEAVING = 285,
+ TOKEN_BLOCKPROPERTIES = 286,
+ TOKEN_BLOCKSAMPLE = 287,
+ TOKEN_BLOOM_FILTER = 288,
+ TOKEN_CSB_TREE = 289,
+ TOKEN_BY = 290,
+ TOKEN_CASE = 291,
+ TOKEN_CHARACTER = 292,
+ TOKEN_CHECK = 293,
+ TOKEN_COLUMN = 294,
+ TOKEN_CONSTRAINT = 295,
+ TOKEN_COPY = 296,
+ TOKEN_CREATE = 297,
+ TOKEN_CURRENT = 298,
+ TOKEN_DATE = 299,
+ TOKEN_DATETIME = 300,
+ TOKEN_DAY = 301,
+ TOKEN_DECIMAL = 302,
+ TOKEN_DEFAULT = 303,
+ TOKEN_DELETE = 304,
+ TOKEN_DELIMITER = 305,
+ TOKEN_DESC = 306,
+ TOKEN_DISTINCT = 307,
+ TOKEN_DOUBLE = 308,
+ TOKEN_DROP = 309,
+ TOKEN_ELSE = 310,
+ TOKEN_END = 311,
+ TOKEN_ESCAPE_STRINGS = 312,
+ TOKEN_EXISTS = 313,
+ TOKEN_EXTRACT = 314,
+ TOKEN_FALSE = 315,
+ TOKEN_FIRST = 316,
+ TOKEN_FLOAT = 317,
+ TOKEN_FOLLOWING = 318,
+ TOKEN_FOR = 319,
+ TOKEN_FOREIGN = 320,
+ TOKEN_FROM = 321,
+ TOKEN_FULL = 322,
+ TOKEN_GROUP = 323,
+ TOKEN_HASH = 324,
+ TOKEN_HAVING = 325,
+ TOKEN_HOUR = 326,
+ TOKEN_IN = 327,
+ TOKEN_INDEX = 328,
+ TOKEN_INNER = 329,
+ TOKEN_INSERT = 330,
+ TOKEN_INTEGER = 331,
+ TOKEN_INTERVAL = 332,
+ TOKEN_INTO = 333,
+ TOKEN_JOIN = 334,
+ TOKEN_KEY = 335,
+ TOKEN_LAST = 336,
+ TOKEN_LEFT = 337,
+ TOKEN_LIMIT = 338,
+ TOKEN_LONG = 339,
+ TOKEN_MINUTE = 340,
+ TOKEN_MONTH = 341,
+ TOKEN_NULL = 342,
+ TOKEN_NULLS = 343,
+ TOKEN_OFF = 344,
+ TOKEN_ON = 345,
+ TOKEN_ORDER = 346,
+ TOKEN_OUTER = 347,
+ TOKEN_OVER = 348,
+ TOKEN_PARTITION = 349,
+ TOKEN_PARTITIONS = 350,
+ TOKEN_PERCENT = 351,
+ TOKEN_PRECEDING = 352,
+ TOKEN_PRIMARY = 353,
+ TOKEN_PRIORITY = 354,
+ TOKEN_QUIT = 355,
+ TOKEN_RANGE = 356,
+ TOKEN_REAL = 357,
+ TOKEN_REFERENCES = 358,
+ TOKEN_RIGHT = 359,
+ TOKEN_ROW = 360,
+ TOKEN_ROW_DELIMITER = 361,
+ TOKEN_ROWS = 362,
+ TOKEN_SECOND = 363,
+ TOKEN_SELECT = 364,
+ TOKEN_SET = 365,
+ TOKEN_SMA = 366,
+ TOKEN_SMALLINT = 367,
+ TOKEN_SUBSTRING = 368,
+ TOKEN_TABLE = 369,
+ TOKEN_THEN = 370,
+ TOKEN_TIME = 371,
+ TOKEN_TIMESTAMP = 372,
+ TOKEN_TRUE = 373,
+ TOKEN_TUPLESAMPLE = 374,
+ TOKEN_UNBOUNDED = 375,
+ TOKEN_UNIQUE = 376,
+ TOKEN_UPDATE = 377,
+ TOKEN_USING = 378,
+ TOKEN_VALUES = 379,
+ TOKEN_VARCHAR = 380,
+ TOKEN_WHEN = 381,
+ TOKEN_WHERE = 382,
+ TOKEN_WINDOW = 383,
+ TOKEN_WITH = 384,
+ TOKEN_YEAR = 385,
+ TOKEN_YEARMONTH = 386,
+ TOKEN_EOF = 387,
+ TOKEN_LEX_ERROR = 388
+ };
#endif
-
+/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
+typedef union YYSTYPE YYSTYPE;
+union YYSTYPE
{
-/* Line 387 of yacc.c */
-#line 120 "../SqlParser.ypp"
+#line 120 "../SqlParser.ypp" /* yacc.c:355 */
quickstep::ParseString *string_value_;
@@ -432,55 +426,40 @@ typedef union YYSTYPE
quickstep::ParsePriority *opt_priority_clause_;
-
-/* Line 387 of yacc.c */
-#line 438 "SqlParser_gen.cpp"
-} YYSTYPE;
+#line 430 "SqlParser_gen.cpp" /* yacc.c:355 */
+};
# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
+/* Location type. */
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
-typedef struct YYLTYPE
+typedef struct YYLTYPE YYLTYPE;
+struct YYLTYPE
{
int first_line;
int first_column;
int last_line;
int last_column;
-} YYLTYPE;
-# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
+};
# define YYLTYPE_IS_DECLARED 1
# define YYLTYPE_IS_TRIVIAL 1
#endif
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int quickstep_yyparse (void *YYPARSE_PARAM);
-#else
-int quickstep_yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
+
int quickstep_yyparse (yyscan_t yyscanner, quickstep::ParseStatement **parsedStatement);
-#else
-int quickstep_yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
#endif /* !YY_QUICKSTEP_YY_SQLPARSER_GEN_HPP_INCLUDED */
/* Copy the second part of user declarations. */
-/* Line 390 of yacc.c */
-#line 220 "../SqlParser.ypp"
+#line 220 "../SqlParser.ypp" /* yacc.c:358 */
/* This header needs YYSTYPE, which is defined by the %union directive above */
#include "SqlLexer_gen.hpp"
void NotSupported(const YYLTYPE *location, yyscan_t yyscanner, const std::string &feature);
-/* Line 390 of yacc.c */
-#line 484 "SqlParser_gen.cpp"
+#line 463 "SqlParser_gen.cpp" /* yacc.c:358 */
#ifdef short
# undef short
@@ -494,11 +473,8 @@ typedef unsigned char yytype_uint8;
#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
#else
-typedef short int yytype_int8;
+typedef signed char yytype_int8;
#endif
#ifdef YYTYPE_UINT16
@@ -518,8 +494,7 @@ typedef short int yytype_int16;
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# elif ! defined YYSIZE_T
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
@@ -541,6 +516,33 @@ typedef short int yytype_int16;
# endif
#endif
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+#if !defined _Noreturn \
+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
+# endif
+#endif
+
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
# define YYUSE(E) ((void) (E))
@@ -548,24 +550,26 @@ typedef short int yytype_int16;
# define YYUSE(E) /* empty */
#endif
-/* Identity function, used to suppress warnings about constant conditions. */
-#ifndef lint
-# define YYID(N) (N)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
#else
-static int
-YYID (yyi)
- int yyi;
+# define YY_INITIAL_VALUE(Value) Value
#endif
-{
- return yyi;
-}
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif
+
#if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -583,8 +587,7 @@ YYID (yyi)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
/* Use EXIT_SUCCESS as a witness for stdlib.h. */
# ifndef EXIT_SUCCESS
@@ -596,8 +599,8 @@ YYID (yyi)
# endif
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
@@ -613,7 +616,7 @@ YYID (yyi)
# endif
# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
+ && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
@@ -621,15 +624,13 @@ YYID (yyi)
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
@@ -639,8 +640,8 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
#if (! defined yyoverflow \
&& (! defined __cplusplus \
- || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
- && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+ || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
+ && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
@@ -666,16 +667,16 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
#endif
@@ -694,7 +695,7 @@ union yyalloc
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
- while (YYID (0))
+ while (0)
# endif
# endif
#endif /* !YYCOPY_NEEDED */
@@ -710,17 +711,19 @@ union yyalloc
#define YYNNTS 107
/* YYNRULES -- Number of rules. */
#define YYNRULES 289
-/* YYNRULES -- Number of states. */
+/* YYNSTATES -- Number of states. */
#define YYNSTATES 536
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+ by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 388
-#define YYTRANSLATE(YYX) \
+#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, without out-of-bounds checking. */
static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -765,139 +768,7 @@ static const yytype_uint8 yytranslate[] =
};
#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const yytype_uint16 yyprhs[] =
-{
- 0, 0, 3, 6, 9, 12, 15, 17, 19, 21,
- 23, 25, 27, 29, 31, 33, 35, 37, 39, 41,
- 48, 55, 62, 69, 79, 89, 93, 97, 99, 103,
- 105, 107, 109, 111, 113, 115, 117, 119, 121, 123,
- 125, 127, 129, 131, 134, 137, 142, 147, 149, 152,
- 154, 157, 160, 165, 171, 174, 176, 177, 179, 184,
- 190, 201, 206, 210, 212, 213, 215, 216, 220, 221,
- 227, 228, 237, 239, 241, 243, 247, 249, 251, 253,
- 256, 259, 264, 267, 269, 271, 273, 275, 276, 280,
- 291, 299, 304, 310, 316, 317, 322, 325, 328, 333,
- 338, 344, 349, 353, 355, 359, 362, 366, 367, 371,
- 374, 376, 380, 384, 395, 396, 398, 400, 402, 404,
- 406, 410, 414, 417, 419, 422, 426, 427, 431, 435,
- 436, 438, 440, 443, 445, 448, 450, 453, 460, 462,
- 465, 469, 472, 475, 477, 481, 483, 486, 488, 493,
- 495, 499, 500, 504, 505, 508, 509, 513, 514, 517,
- 518, 520, 522, 525, 532, 536, 537, 541, 542, 546,
- 547, 553, 555, 557, 560, 563, 566, 569, 572, 575,
- 577, 581, 585, 586, 588, 590, 591, 594, 597, 598,
- 600, 603, 607, 609, 613, 615, 618, 620, 626, 633,
- 638, 642, 646, 650, 653, 657, 663, 668, 675, 679,
- 681, 685, 687, 690, 692, 694, 696, 698, 702, 708,
- 710, 712, 714, 718, 720, 724, 729, 734, 740, 747,
- 754, 763, 769, 774, 776, 779, 784, 786, 789, 794,
- 795, 798, 800, 804, 806, 808, 811, 814, 816, 819,
- 823, 826, 828, 830, 832, 834, 836, 838, 840, 844,
- 846, 850, 852, 856, 858, 860, 862, 864, 866, 868,
- 870, 873, 875, 878, 880, 882, 884, 886, 888, 890,
- 892, 896, 898, 900, 902, 904, 906, 908, 911, 914
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int16 yyrhs[] =
-{
- 146, 0, -1, 147, 139, -1, 147, 137, -1, 250,
- 140, -1, 250, 137, -1, 1, -1, 137, -1, 149,
- -1, 174, -1, 150, -1, 151, -1, 178, -1, 152,
- -1, 173, -1, 148, -1, 181, -1, 177, -1, 105,
- -1, 30, 119, 248, 28, 44, 153, -1, 30, 119,
- 248, 28, 45, 159, -1, 30, 119, 248, 59, 44,
- 248, -1, 30, 119, 248, 59, 45, 248, -1, 47,
- 119, 248, 141, 154, 142, 161, 163, 164, -1, 47,
- 78, 248, 95, 248, 162, 128, 171, 172, -1, 59,
- 119, 248, -1, 248, 155, 158, -1, 153, -1, 154,
- 143, 153, -1, 34, -1, 49, -1, 50, -1, 121,
- -1, 122, -1, 52, -1, 107, -1, 58, -1, 67,
- -1, 117, -1, 81, -1, 33, -1, 89, -1, 82,
- -1, 50, 82, -1, 136, 82, -1, 42, 141, 7,
- 142, -1, 130, 141, 7, 142, -1, 92, -1, 10,
- 92, -1, 126, -1, 103, 85, -1, 53, 238, -1,
- 43, 141, 220, 142, -1, 108, 248, 141, 248, 142,
- -1, 157, 156, -1, 156, -1, -1, 157, -1, 126,
- 141, 247, 142, -1, 103, 85, 141, 247, 142, -1,
- 70, 85, 141, 247, 142, 108, 248, 141, 247, 142,
- -1, 43, 141, 220, 142, -1, 160, 143, 159, -1,
- 159, -1, -1, 160, -1, -1, 141, 242, 142, -1,
- -1, 134, 36, 141, 166, 142, -1, -1, 99, 40,
- 165, 141, 247, 142, 100, 7, -1, 74, -1, 106,
- -1, 167, -1, 166, 143, 167, -1, 168, -1, 169,
- -1, 170, -1, 248, 248, -1, 248, 29, -1, 248,
- 141, 247, 142, -1, 248, 7, -1, 35, -1, 38,
- -1, 39, -1, 116, -1, -1, 141, 166, 142, -1,
- 80, 83, 248, 141, 247, 142, 129, 141, 240, 142,
- -1, 80, 83, 248, 129, 141, 240, 142, -1, 80,
- 83, 248, 186, -1, 183, 80, 83, 248, 186, -1,
- 46, 248, 71, 5, 175, -1, -1, 134, 141, 176,
- 142, -1, 55, 5, -1, 62, 249, -1, 176, 143,
- 55, 5, -1, 176, 143, 62, 249, -1, 127, 248,
- 115, 179, 218, -1, 54, 71, 248, 218, -1, 179,
- 143, 180, -1, 180, -1, 248, 11, 224, -1, 186,
- 182, -1, 183, 186, 182, -1, -1, 134, 104, 7,
- -1, 134, 184, -1, 185, -1, 184, 143, 185, -1,
- 198, 31, 192, -1, 114, 187, 188, 191, 218, 200,
- 201, 202, 203, 204, -1, -1, 29, -1, 57, -1,
- 23, -1, 189, -1, 190, -1, 189, 143, 190, -1,
- 224, 31, 248, -1, 224, 248, -1, 224, -1, 71,
- 199, -1, 141, 186, 142, -1, -1, 37, 7, 101,
- -1, 124, 7, 101, -1, -1, 79, -1, 87, -1,
- 87, 97, -1, 109, -1, 109, 97, -1, 72, -1,
- 72, 97, -1, 195, 194, 84, 196, 95, 220, -1,
- 196, -1, 192, 197, -1, 248, 193, 197, -1, 248,
- 193, -1, 228, 197, -1, 228, -1, 141, 195, 142,
- -1, 198, -1, 31, 198, -1, 248, -1, 248, 141,
- 247, 142, -1, 195, -1, 199, 143, 195, -1, -1,
- 73, 40, 237, -1, -1, 75, 220, -1, -1, 96,
- 40, 214, -1, -1, 88, 7, -1, -1, 205, -1,
- 206, -1, 205, 206, -1, 133, 248, 31, 141, 207,
- 142, -1, 208, 209, 210, -1, -1, 99, 40, 237,
- -1, -1, 96, 40, 214, -1, -1, 211, 19, 212,
- 9, 213, -1, 112, -1, 106, -1, 7, 102, -1,
- 125, 102, -1, 48, 110, -1, 7, 68, -1, 125,
- 68, -1, 48, 110, -1, 215, -1, 214, 143, 215,
- -1, 224, 216, 217, -1, -1, 32, -1, 56, -1,
- -1, 93, 66, -1, 93, 86, -1, -1, 219, -1,
- 132, 220, -1, 220, 8, 221, -1, 221, -1, 221,
- 9, 222, -1, 222, -1, 10, 223, -1, 223, -1,
- 224, 19, 224, 9, 224, -1, 224, 10, 19, 224,
- 9, 224, -1, 241, 20, 10, 92, -1, 241, 20,
- 92, -1, 224, 243, 224, -1, 141, 220, 142, -1,
- 63, 192, -1, 224, 77, 192, -1, 224, 77, 141,
- 237, 142, -1, 224, 10, 77, 192, -1, 224, 10,
- 77, 141, 237, 142, -1, 224, 245, 225, -1, 225,
- -1, 225, 246, 226, -1, 226, -1, 244, 227, -1,
- 227, -1, 241, -1, 238, -1, 228, -1, 228, 98,
- 248, -1, 228, 98, 141, 207, 142, -1, 229, -1,
- 230, -1, 231, -1, 141, 224, 142, -1, 192, -1,
- 248, 141, 142, -1, 248, 141, 23, 142, -1, 248,
- 141, 237, 142, -1, 248, 141, 57, 237, 142, -1,
- 64, 141, 239, 71, 224, 142, -1, 118, 141, 224,
- 71, 7, 142, -1, 118, 141, 224, 71, 7, 69,
- 7, 142, -1, 41, 224, 232, 236, 61, -1, 41,
- 234, 236, 61, -1, 233, -1, 232, 233, -1, 131,
- 224, 120, 224, -1, 235, -1, 234, 235, -1, 131,
- 220, 120, 224, -1, -1, 60, 224, -1, 224, -1,
- 237, 143, 224, -1, 92, -1, 7, -1, 21, 7,
- -1, 22, 7, -1, 5, -1, 82, 5, -1, 82,
- 5, 239, -1, 155, 5, -1, 135, -1, 91, -1,
- 51, -1, 76, -1, 90, -1, 113, -1, 238, -1,
- 240, 143, 238, -1, 248, -1, 248, 27, 248, -1,
- 241, -1, 242, 143, 241, -1, 11, -1, 12, -1,
- 16, -1, 15, -1, 14, -1, 13, -1, 18, -1,
- 10, 18, -1, 17, -1, 10, 17, -1, 22, -1,
- 21, -1, 22, -1, 144, -1, 23, -1, 24, -1,
- 248, -1, 247, 143, 248, -1, 4, -1, 6, -1,
- 123, -1, 95, -1, 65, -1, 94, -1, 3, 251,
- -1, 251, 3, -1, -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
0, 629, 629, 633, 637, 641, 645, 648, 655, 658,
@@ -940,9 +811,9 @@ static const char *const yytname[] =
"$end", "error", "$undefined", "TOKEN_COMMAND", "TOKEN_NAME",
"TOKEN_STRING_SINGLE_QUOTED", "TOKEN_STRING_DOUBLE_QUOTED",
"TOKEN_UNSIGNED_NUMVAL", "TOKEN_OR", "TOKEN_AND", "TOKEN_NOT",
- "TOKEN_EQ", "TOKEN_NEQ", "TOKEN_GEQ", "TOKEN_GT", "TOKEN_LEQ",
- "TOKEN_LT", "TOKEN_REGEXP", "TOKEN_LIKE", "TOKEN_BETWEEN", "TOKEN_IS",
- "'+'", "'-'", "'*'", "'/'", "UNARY_MINUS", "UNARY_PLUS", "'.'",
+ "TOKEN_EQ", "TOKEN_LT", "TOKEN_LEQ", "TOKEN_GT", "TOKEN_GEQ",
+ "TOKEN_NEQ", "TOKEN_LIKE", "TOKEN_REGEXP", "TOKEN_BETWEEN", "TOKEN_IS",
+ "'+'", "'-'", "'*'", "'/'", "UNARY_PLUS", "UNARY_MINUS", "'.'",
"TOKEN_ADD", "TOKEN_ALL", "TOKEN_ALTER", "TOKEN_AS", "TOKEN_ASC",
"TOKEN_BIGINT", "TOKEN_BIT", "TOKEN_BITWEAVING", "TOKEN_BLOCKPROPERTIES",
"TOKEN_BLOCKSAMPLE", "TOKEN_BLOOM_FILTER", "TOKEN_CSB_TREE", "TOKEN_BY",
@@ -1004,13 +875,13 @@ static const char *const yytname[] =
"literal_value_commalist", "attribute_ref", "attribute_ref_list",
"comparison_operation", "unary_operation", "add_operation",
"multiply_operation", "name_commalist", "any_name", "boolean_value",
- "command", "command_argument_list", YY_NULL
+ "command", "command_argument_list", YY_NULLPTR
};
#endif
# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- token YYLEX-NUM. */
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
@@ -1031,154 +902,18 @@ static const yytype_uint16 yytoknum[] =
};
# endif
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint8 yyr1[] =
-{
- 0, 145, 146, 146, 146, 146, 146, 146, 147, 147,
- 147, 147, 147, 147, 147, 147, 147, 147, 148, 149,
- 149, 149, 149, 150, 151, 152, 153, 154, 154, 155,
- 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
- 155, 155, 155, 155, 155, 155, 155, 156, 156, 156,
- 156, 156, 156, 156, 157, 157, 158, 158, 159, 159,
- 159, 159, 160, 160, 161, 161, 162, 162, 163, 163,
- 164, 164, 165, 165, 166, 166, 167, 167, 167, 168,
- 168, 169, 170, 171, 171, 171, 171, 172, 172, 173,
- 173, 173, 173, 174, 175, 175, 176, 176, 176, 176,
- 177, 178, 179, 179, 180, 181, 181, 182, 182, 183,
- 184, 184, 185, 186, 187, 187, 187, 188, 188, 189,
- 189, 190, 190, 190, 191, 192, 193, 193, 193, 194,
- 194, 194, 194, 194, 194, 194, 194, 195, 195, 196,
- 196, 196, 196, 196, 196, 197, 197, 198, 198, 199,
- 199, 200, 200, 201, 201, 202, 202, 203, 203, 204,
- 204, 205, 205, 206, 207, 208, 208, 209, 209, 210,
- 210, 211, 211, 212, 212, 212, 213, 213, 213, 214,
- 214, 215, 216, 216, 216, 217, 217, 217, 218, 218,
- 219, 220, 220, 221, 221, 222, 222, 223, 223, 223,
- 223, 223, 223, 223, 223, 223, 223, 223, 224, 224,
- 225, 225, 226, 226, 227, 227, 227, 227, 227, 227,
- 227, 227, 227, 227, 228, 228, 228, 228, 229, 230,
- 230, 231, 231, 232, 232, 233, 234, 234, 235, 236,
- 236, 237, 237, 238, 238, 238, 238, 238, 238, 238,
- 238, 239, 239, 239, 239, 239, 239, 240, 240, 241,
- 241, 242, 242, 243, 243, 243, 243, 243, 243, 243,
- 243, 243, 243, 244, 245, 245, 246, 246, 246, 247,
- 247, 248, 248, 249, 249, 249, 249, 250, 251, 251
-};
+#define YYPACT_NINF -234
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
-{
- 0, 2, 2, 2, 2, 2, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 6,
- 6, 6, 6, 9, 9, 3, 3, 1, 3, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 2, 2, 4, 4, 1, 2, 1,
- 2, 2, 4, 5, 2, 1, 0, 1, 4, 5,
- 10, 4, 3, 1, 0, 1, 0, 3, 0, 5,
- 0, 8, 1, 1, 1, 3, 1, 1, 1, 2,
- 2, 4, 2, 1, 1, 1, 1, 0, 3, 10,
- 7, 4, 5, 5, 0, 4, 2, 2, 4, 4,
- 5, 4, 3, 1, 3, 2, 3, 0, 3, 2,
- 1, 3, 3, 10, 0, 1, 1, 1, 1, 1,
- 3, 3, 2, 1, 2, 3, 0, 3, 3, 0,
- 1, 1, 2, 1, 2, 1, 2, 6, 1, 2,
- 3, 2, 2, 1, 3, 1, 2, 1, 4, 1,
- 3, 0, 3, 0, 2, 0, 3, 0, 2, 0,
- 1, 1, 2, 6, 3, 0, 3, 0, 3, 0,
- 5, 1, 1, 2, 2, 2, 2, 2, 2, 1,
- 3, 3, 0, 1, 1, 0, 2, 2, 0, 1,
- 2, 3, 1, 3, 1, 2, 1, 5, 6, 4,
- 3, 3, 3, 2, 3, 5, 4, 6, 3, 1,
- 3, 1, 2, 1, 1, 1, 1, 3, 5, 1,
- 1, 1, 3, 1, 3, 4, 4, 5, 6, 6,
- 8, 5, 4, 1, 2, 4, 1, 2, 4, 0,
- 2, 1, 3, 1, 1, 2, 2, 1, 2, 3,
- 2, 1, 1, 1, 1, 1, 1, 1, 3, 1,
- 3, 1, 3, 1, 1, 1, 1, 1, 1, 1,
- 2, 1, 2, 1, 1, 1, 1, 1, 1, 1,
- 3, 1, 1, 1, 1, 1, 1, 2, 2, 0
-};
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-234)))
-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
- Performed when YYTABLE doesn't specify something else to do. Zero
- means the default is an error. */
-static const yytype_uint16 yydefact[] =
-{
- 0, 6, 289, 0, 0, 0, 0, 0, 0, 18,
- 114, 0, 0, 7, 0, 0, 15, 8, 10, 11,
- 13, 14, 9, 17, 12, 16, 0, 107, 0, 287,
- 0, 281, 282, 0, 0, 0, 0, 0, 0, 115,
- 116, 0, 0, 109, 110, 0, 147, 1, 3, 2,
- 0, 107, 0, 105, 5, 4, 288, 0, 0, 0,
- 0, 188, 25, 0, 247, 244, 0, 273, 117, 40,
- 29, 0, 0, 30, 31, 34, 36, 0, 37, 39,
- 0, 41, 243, 35, 38, 0, 32, 33, 0, 0,
- 0, 0, 0, 118, 119, 223, 123, 209, 211, 213,
- 216, 219, 220, 221, 215, 214, 0, 259, 0, 0,
- 0, 0, 0, 106, 0, 0, 0, 94, 0, 0,
- 0, 101, 189, 0, 0, 91, 245, 246, 0, 0,
- 239, 236, 0, 43, 0, 248, 0, 0, 44, 0,
- 0, 250, 0, 188, 0, 274, 275, 0, 0, 122,
- 277, 278, 276, 0, 0, 0, 212, 0, 0, 188,
- 103, 0, 111, 0, 112, 0, 279, 0, 108, 0,
- 0, 0, 0, 0, 93, 66, 27, 0, 0, 0,
- 0, 0, 190, 192, 194, 196, 0, 214, 0, 0,
- 0, 0, 239, 233, 0, 237, 0, 0, 253, 254,
- 255, 252, 256, 251, 0, 249, 0, 0, 125, 222,
- 0, 0, 149, 138, 124, 143, 126, 151, 120, 121,
- 208, 210, 165, 217, 260, 0, 0, 224, 241, 0,
- 0, 100, 0, 148, 0, 92, 19, 0, 0, 0,
- 0, 20, 21, 22, 0, 0, 0, 64, 0, 42,
- 56, 195, 203, 0, 0, 0, 0, 0, 263, 264,
- 268, 267, 266, 265, 271, 269, 0, 0, 0, 0,
- 257, 0, 0, 0, 0, 234, 0, 240, 232, 45,
- 0, 0, 46, 129, 0, 139, 145, 135, 130, 131,
- 133, 0, 0, 142, 0, 0, 141, 0, 153, 0,
- 0, 167, 225, 0, 226, 0, 102, 104, 280, 0,
- 0, 0, 0, 0, 0, 0, 261, 0, 259, 0,
- 63, 65, 68, 28, 0, 0, 0, 47, 0, 0,
- 49, 55, 57, 26, 202, 191, 193, 272, 270, 0,
- 0, 0, 0, 204, 201, 0, 200, 90, 0, 0,
- 238, 0, 231, 0, 0, 144, 146, 136, 132, 134,
- 0, 150, 0, 0, 140, 0, 0, 155, 0, 218,
- 0, 169, 227, 242, 0, 0, 0, 0, 96, 285,
- 286, 284, 283, 97, 95, 0, 67, 0, 83, 84,
- 85, 86, 87, 0, 0, 70, 48, 0, 51, 50,
- 0, 54, 0, 0, 206, 0, 0, 199, 258, 0,
- 235, 228, 0, 229, 0, 127, 128, 152, 154, 0,
- 157, 166, 0, 172, 171, 164, 0, 61, 0, 0,
- 58, 0, 0, 262, 0, 24, 62, 0, 0, 23,
- 0, 0, 0, 0, 197, 205, 0, 0, 0, 0,
- 0, 159, 168, 179, 182, 0, 0, 59, 98, 99,
- 0, 74, 76, 77, 78, 0, 0, 0, 52, 0,
- 198, 207, 89, 230, 137, 156, 158, 0, 113, 160,
- 161, 0, 183, 184, 185, 0, 0, 0, 0, 0,
- 88, 0, 82, 80, 0, 79, 0, 72, 73, 0,
- 53, 0, 162, 180, 0, 181, 173, 175, 174, 0,
- 0, 75, 0, 69, 0, 0, 186, 187, 0, 0,
- 0, 170, 0, 81, 0, 165, 176, 178, 177, 0,
- 0, 0, 60, 0, 163, 71
-};
+#define YYTABLE_NINF -130
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int16 yydefgoto[] =
-{
- -1, 14, 15, 16, 17, 18, 19, 20, 176, 177,
- 91, 331, 332, 333, 241, 321, 322, 246, 395, 439,
- 499, 460, 461, 462, 463, 464, 392, 435, 21, 22,
- 174, 315, 23, 24, 159, 160, 25, 53, 26, 43,
- 44, 139, 41, 92, 93, 94, 143, 95, 296, 291,
- 212, 213, 285, 286, 214, 298, 367, 420, 451, 478,
- 479, 480, 300, 301, 371, 425, 426, 488, 521, 452,
- 453, 484, 505, 121, 122, 182, 183, 184, 185, 186,
- 97, 98, 99, 100, 101, 102, 103, 192, 193, 130,
- 131, 196, 229, 104, 204, 271, 105, 317, 268, 106,
- 148, 153, 165, 107, 383, 28, 29
-};
+#define yytable_value_is_error(Yytable_value) \
+ 0
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-#define YYPACT_NINF -234
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
static const yytype_int16 yypact[] =
{
168, -234, -234, -58, 181, -19, 40, -37, 59, -234,
@@ -1237,7 +972,68 @@ static const yytype_int16 yypact[] =
411, 377, -234, 505, -234, -234
};
-/* YYPGOTO[NTERM-NUM]. */
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint16 yydefact[] =
+{
+ 0, 6, 289, 0, 0, 0, 0, 0, 0, 18,
+ 114, 0, 0, 7, 0, 0, 15, 8, 10, 11,
+ 13, 14, 9, 17, 12, 16, 0, 107, 0, 287,
+ 0, 281, 282, 0, 0, 0, 0, 0, 0, 115,
+ 116, 0, 0, 109, 110, 0, 147, 1, 3, 2,
+ 0, 107, 0, 105, 5, 4, 288, 0, 0, 0,
+ 0, 188, 25, 0, 247, 244, 0, 273, 117, 40,
+ 29, 0, 0, 30, 31, 34, 36, 0, 37, 39,
+ 0, 41, 243, 35, 38, 0, 32, 33, 0, 0,
+ 0, 0, 0, 118, 119, 223, 123, 209, 211, 213,
+ 216, 219, 220, 221, 215, 214, 0, 259, 0, 0,
+ 0, 0, 0, 106, 0, 0, 0, 94, 0, 0,
+ 0, 101, 189, 0, 0, 91, 245, 246, 0, 0,
+ 239, 236, 0, 43, 0, 248, 0, 0, 44, 0,
+ 0, 250, 0, 188, 0, 274, 275, 0, 0, 122,
+ 277, 278, 276, 0, 0, 0, 212, 0, 0, 188,
+ 103, 0, 111, 0, 112, 0, 279, 0, 108, 0,
+ 0, 0, 0, 0, 93, 66, 27, 0, 0, 0,
+ 0, 0, 190, 192, 194, 196, 0, 214, 0, 0,
+ 0, 0, 239, 233, 0, 237, 0, 0, 253, 254,
+ 255, 252, 256, 251, 0, 249, 0, 0, 125, 222,
+ 0, 0, 149, 138, 124, 143, 126, 151, 120, 121,
+ 208, 210, 165, 217, 260, 0, 0, 224, 241, 0,
+ 0, 100, 0, 148, 0, 92, 19, 0, 0, 0,
+ 0, 20, 21, 22, 0, 0, 0, 64, 0, 42,
+ 56, 195, 203, 0, 0, 0, 0, 0, 263, 265,
+ 266, 267, 268, 264, 269, 271, 0, 0, 0, 0,
+ 257, 0, 0, 0, 0, 234, 0, 240, 232, 45,
+ 0, 0, 46, 129, 0, 139, 145, 135, 130, 131,
+ 133, 0, 0, 142, 0, 0, 141, 0, 153, 0,
+ 0, 167, 225, 0, 226, 0, 102, 104, 280, 0,
+ 0, 0, 0, 0, 0, 0, 261, 0, 259, 0,
+ 63, 65, 68, 28, 0, 0, 0, 47, 0, 0,
+ 49, 55, 57, 26, 202, 191, 193, 270, 272, 0,
+ 0, 0, 0, 204, 201, 0, 200, 90, 0, 0,
+ 238, 0, 231, 0, 0, 144, 146, 136, 132, 134,
+ 0, 150, 0, 0, 140, 0, 0, 155, 0, 218,
+ 0, 169, 227, 242, 0, 0, 0, 0, 96, 285,
+ 286, 284, 283, 97, 95, 0, 67, 0, 83, 84,
+ 85, 86, 87, 0, 0, 70, 48, 0, 51, 50,
+ 0, 54, 0, 0, 206, 0, 0, 199, 258, 0,
+ 235, 228, 0, 229, 0, 127, 128, 152, 154, 0,
+ 157, 166, 0, 172, 171, 164, 0, 61, 0, 0,
+ 58, 0, 0, 262, 0, 24, 62, 0, 0, 23,
+ 0, 0, 0, 0, 197, 205, 0, 0, 0, 0,
+ 0, 159, 168, 179, 182, 0, 0, 59, 98, 99,
+ 0, 74, 76, 77, 78, 0, 0, 0, 52, 0,
+ 198, 207, 89, 230, 137, 156, 158, 0, 113, 160,
+ 161, 0, 183, 184, 185, 0, 0, 0, 0, 0,
+ 88, 0, 82, 80, 0, 79, 0, 72, 73, 0,
+ 53, 0, 162, 180, 0, 181, 173, 175, 174, 0,
+ 0, 75, 0, 69, 0, 0, 186, 187, 0, 0,
+ 0, 170, 0, 81, 0, 165, 176, 178, 177, 0,
+ 0, 0, 60, 0, 163, 71
+};
+
+ /* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
-234, -234, -234, -234, -234, -234, -234, -234, -94, -234,
@@ -1253,14 +1049,29 @@ static const yytype_int16 yypgoto[] =
-234, -234, -120, -4, 120, -234, -234
};
-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -130
-static const yytype_int16 yytable[] =
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
{
- 33, 187, 45, 270, 189, 215, 96, 42, 46, 187,
- 255, 27, 190, 164, 320, 255, 255, 255, 157, 303,
+ -1, 14, 15, 16, 17, 18, 19, 20, 176, 177,
+ 91, 331, 332, 333, 241, 321, 322, 246, 395, 439,
+ 499, 460, 461, 462, 463, 464, 392, 435, 21, 22,
+ 174, 315, 23, 24, 159, 160, 25, 53, 26, 43,
+ 44, 139, 41, 92, 93, 94, 143, 95, 296, 291,
+ 212, 213, 285, 286, 214, 298, 367, 420, 451, 478,
+ 479, 480, 300, 301, 371, 425, 426, 488, 521, 452,
+ 453, 484, 505, 121, 122, 182, 183, 184, 185, 186,
+ 97, 98, 99, 100, 101, 102, 103, 192, 193, 130,
+ 131, 196, 229, 104, 204, 271, 105, 317, 268, 106,
+ 148, 153, 165, 107, 383, 28, 29
+};
+
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
+static const yytype_int16 yytable[] =
+{
+ 33, 187, 45, 270, 189, 215, 96, 42, 46, 187,
+ 255, 27, 190, 164, 320, 255, 255, 255, 157, 303,
31, 283, 32, 294, 324, 31, 57, 32, 492, 485,
59, 60, 61, 62, 63, 293, 129, 51, 31, 31,
32, 32, 237, 150, 151, 211, 145, 146, 518, 345,
@@ -1396,12 +1207,6 @@ static const yytype_int16 yytable[] =
88, 0, 0, 0, 0, 0, 89
};
-#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-234)))
-
-#define yytable_value_is_error(Yytable_value) \
- YYID (0)
-
static const yytype_int16 yycheck[] =
{
4, 120, 12, 188, 124, 142, 41, 11, 12, 128,
@@ -1541,8 +1346,8 @@ static const yytype_int16 yycheck[] =
130, -1, -1, -1, -1, -1, 136
};
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
0, 1, 3, 30, 46, 47, 54, 59, 80, 105,
@@ -1601,30 +1406,84 @@ static const yytype_uint8 yystos[] =
142, 207, 142, 100, 142, 7
};
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY (-2)
-#define YYEOF 0
-
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror. This remains here temporarily
- to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. However,
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- discussed. */
-
-#define YYFAIL goto yyerrlab
-#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
-#endif
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 145, 146, 146, 146, 146, 146, 146, 147, 147,
+ 147, 147, 147, 147, 147, 147, 147, 147, 148, 149,
+ 149, 149, 149, 150, 151, 152, 153, 154, 154, 155,
+ 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
+ 155, 155, 155, 155, 155, 155, 155, 156, 156, 156,
+ 156, 156, 156, 156, 157, 157, 158, 158, 159, 159,
+ 159, 159, 160, 160, 161, 161, 162, 162, 163, 163,
+ 164, 164, 165, 165, 166, 166, 167, 167, 167, 168,
+ 168, 169, 170, 171, 171, 171, 171, 172, 172, 173,
+ 173, 173, 173, 174, 175, 175, 176, 176, 176, 176,
+ 177, 178, 179, 179, 180, 181, 181, 182, 182, 183,
+ 184, 184, 185, 186, 187, 187, 187, 188, 188, 189,
+ 189, 190, 190, 190, 191, 192, 193, 193, 193, 194,
+ 194, 194, 194, 194, 194, 194, 194, 195, 195, 196,
+ 196, 196, 196, 196, 196, 197, 197, 198, 198, 199,
+ 199, 200, 200, 201, 201, 202, 202, 203, 203, 204,
+ 204, 205, 205, 206, 207, 208, 208, 209, 209, 210,
+ 210, 211, 211, 212, 212, 212, 213, 213, 213, 214,
+ 214, 215, 216, 216, 216, 217, 217, 217, 218, 218,
+ 219, 220, 220, 221, 221, 222, 222, 223, 223, 223,
+ 223, 223, 223, 223, 223, 223, 223, 223, 224, 224,
+ 225, 225, 226, 226, 227, 227, 227, 227, 227, 227,
+ 227, 227, 227, 227, 228, 228, 228, 228, 229, 230,
+ 230, 231, 231, 232, 232, 233, 234, 234, 235, 236,
+ 236, 237, 237, 238, 238, 238, 238, 238, 238, 238,
+ 238, 239, 239, 239, 239, 239, 239, 240, 240, 241,
+ 241, 242, 242, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 244, 245, 245, 246, 246, 246, 247,
+ 247, 248, 248, 249, 249, 249, 249, 250, 251, 251
+};
+
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 2, 2, 2, 2, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 6,
+ 6, 6, 6, 9, 9, 3, 3, 1, 3, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 2, 2, 4, 4, 1, 2, 1,
+ 2, 2, 4, 5, 2, 1, 0, 1, 4, 5,
+ 10, 4, 3, 1, 0, 1, 0, 3, 0, 5,
+ 0, 8, 1, 1, 1, 3, 1, 1, 1, 2,
+ 2, 4, 2, 1, 1, 1, 1, 0, 3, 10,
+ 7, 4, 5, 5, 0, 4, 2, 2, 4, 4,
+ 5, 4, 3, 1, 3, 2, 3, 0, 3, 2,
+ 1, 3, 3, 10, 0, 1, 1, 1, 1, 1,
+ 3, 3, 2, 1, 2, 3, 0, 3, 3, 0,
+ 1, 1, 2, 1, 2, 1, 2, 6, 1, 2,
+ 3, 2, 2, 1, 3, 1, 2, 1, 4, 1,
+ 3, 0, 3, 0, 2, 0, 3, 0, 2, 0,
+ 1, 1, 2, 6, 3, 0, 3, 0, 3, 0,
+ 5, 1, 1, 2, 2, 2, 2, 2, 2, 1,
+ 3, 3, 0, 1, 1, 0, 2, 2, 0, 1,
+ 2, 3, 1, 3, 1, 2, 1, 5, 6, 4,
+ 3, 3, 3, 2, 3, 5, 4, 6, 3, 1,
+ 3, 1, 2, 1, 1, 1, 1, 3, 5, 1,
+ 1, 1, 3, 1, 3, 4, 4, 5, 6, 6,
+ 8, 5, 4, 1, 2, 4, 1, 2, 4, 0,
+ 2, 1, 3, 1, 1, 2, 2, 1, 2, 3,
+ 2, 1, 1, 1, 1, 1, 1, 1, 3, 1,
+ 3, 1, 3, 1, 1, 1, 1, 1, 1, 1,
+ 2, 1, 2, 1, 1, 1, 1, 1, 1, 1,
+ 3, 1, 1, 1, 1, 1, 1, 2, 2, 0
+};
+
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
#define YYRECOVERING() (!!yyerrstatus)
@@ -1641,13 +1500,13 @@ do \
else \
{ \
yyerror (&yylloc, yyscanner, parsedStatement, YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (YYID (0))
+ YYERROR; \
+ } \
+while (0)
/* Error token number */
-#define YYTERROR 1
-#define YYERRCODE 256
+#define YYTERROR 1
+#define YYERRCODE 256
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
@@ -1657,7 +1516,7 @@ while (YYID (0))
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \
do \
- if (YYID (N)) \
+ if (N) \
{ \
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
@@ -1671,12 +1530,27 @@ while (YYID (0))
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
} \
- while (YYID (0))
+ while (0)
#endif
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+
/* YY_LOCATION_PRINT -- Print the location on the stream.
This macro was not mandated originally: define only if we know
we won't break user code: when these are the locations we know. */
@@ -1686,36 +1560,28 @@ while (YYID (0))
/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
-__attribute__((__unused__))
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+YY_ATTRIBUTE_UNUSED
static unsigned
yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
-#else
-static unsigned
-yy_location_print_ (yyo, yylocp)
- FILE *yyo;
- YYLTYPE const * const yylocp;
-#endif
{
unsigned res = 0;
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
if (0 <= yylocp->first_line)
{
- res += fprintf (yyo, "%d", yylocp->first_line);
+ res += YYFPRINTF (yyo, "%d", yylocp->first_line);
if (0 <= yylocp->first_column)
- res += fprintf (yyo, ".%d", yylocp->first_column);
+ res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
}
if (0 <= yylocp->last_line)
{
if (yylocp->first_line < yylocp->last_line)
{
- res += fprintf (yyo, "-%d", yylocp->last_line);
+ res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
if (0 <= end_col)
- res += fprintf (yyo, ".%d", end_col);
+ res += YYFPRINTF (yyo, ".%d", end_col);
}
else if (0 <= end_col && yylocp->first_column < end_col)
- res += fprintf (yyo, "-%d", end_col);
+ res += YYFPRINTF (yyo, "-%d", end_col);
}
return res;
}
@@ -1729,77 +1595,37 @@ yy_location_print_ (yyo, yylocp)
#endif
-/* YYLEX -- calling `yylex' with the right arguments. */
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
-#else
-# define YYLEX yylex (&yylval, &yylloc, yyscanner)
-#endif
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value, Location, yyscanner, parsedStatement); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
-/* Enable debugging if requested. */
-#if YYDEBUG
-# ifndef YYFPRINTF
-# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-# define YYFPRINTF fprintf
-# endif
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT. |
+`----------------------------------------*/
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (YYID (0))
-
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value, Location, yyscanner, parsedStatement); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (YYID (0))
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, yyscan_t yyscanner, quickstep::ParseStatement **parsedStatement)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, yyscanner, parsedStatement)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
- YYLTYPE const * const yylocationp;
- yyscan_t yyscanner;
- quickstep::ParseStatement **parsedStatement;
-#endif
{
FILE *yyo = yyoutput;
YYUSE (yyo);
- if (!yyvaluep)
- return;
YYUSE (yylocationp);
YYUSE (yyscanner);
YYUSE (parsedStatement);
+ if (!yyvaluep)
+ return;
# ifdef YYPRINT
if (yytype < YYNTOKENS)
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
- YYUSE (yyoutput);
# endif
- switch (yytype)
- {
- default:
- break;
- }
+ YYUSE (yytype);
}
@@ -1807,25 +1633,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, yyscanner, parse
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, yyscan_t yyscanner, quickstep::ParseStatement **parsedStatement)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, yyscanner, parsedStatement)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
- YYLTYPE const * const yylocationp;
- yyscan_t yyscanner;
- quickstep::ParseStatement **parsedStatement;
-#endif
{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+ YYFPRINTF (yyoutput, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
YY_LOCATION_PRINT (yyoutput, *yylocationp);
YYFPRINTF (yyoutput, ": ");
@@ -1838,16 +1650,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, yyscanner, parsedState
| TOP (included). |
`------------------------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
-#endif
{
YYFPRINTF (stderr, "Stack now");
for (; yybottom <= yytop; yybottom++)
@@ -1858,52 +1662,42 @@ yy_stack_print (yybottom, yytop)
YYFPRINTF (stderr, "\n");
}
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (YYID (0))
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
-yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, yyscan_t yyscanner, quickstep::ParseStatement **parsedStatement)
-#else
-static void
-yy_reduce_print (yyvsp, yylsp, yyrule, yyscanner, parsedStatement)
- YYSTYPE *yyvsp;
- YYLTYPE *yylsp;
- int yyrule;
- yyscan_t yyscanner;
- quickstep::ParseStatement **parsedStatement;
-#endif
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, yyscan_t yyscanner, quickstep::ParseStatement **parsedStatement)
{
+ unsigned long int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
- unsigned long int yylno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
+ yyrule - 1, yylno);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- , &(yylsp[(yyi + 1) - (yynrhs)]) , yyscanner, parsedStatement);
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ , &(yylsp[(yyi + 1) - (yynrhs)]) , yyscanner, parsedStatement);
YYFPRINTF (stderr, "\n");
}
}
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyvsp, yylsp, Rule, yyscanner, parsedStatement); \
-} while (YYID (0))
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, yylsp, Rule, yyscanner, parsedStatement); \
+} while (0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
@@ -1917,7 +1711,7 @@ int yydebug;
/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
+#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif
@@ -1940,15 +1734,8 @@ int yydebug;
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
- const char *yystr;
-#endif
{
YYSIZE_T yylen;
for (yylen = 0; yystr[yylen]; yylen++)
@@ -1964,16 +1751,8 @@ yystrlen (yystr)
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static char *
yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-#endif
{
char *yyd = yydest;
const char *yys = yysrc;
@@ -2003,27 +1782,27 @@ yytnamerr (char *yyres, const char *yystr)
char const *yyp = yystr;
for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
do_not_strip_quotes: ;
}
@@ -2046,11 +1825,11 @@ static int
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yytype_int16 *yyssp, int yytoken)
{
- YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
YYSIZE_T yysize = yysize0;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
- const char *yyformat = YY_NULL;
+ const char *yyformat = YY_NULLPTR;
/* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
/* Number of reported tokens (one for the "unexpected", one per
@@ -2058,10 +1837,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
int yycount = 0;
/* There are many possibilities here to consider:
- - Assume YYFAIL is not used. It's too flawed to consider. See
- <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
- for details. YYERROR is fine as it does not invoke this
- function.
- If this state is a consistent state with a default action, then
the only way this function was invoked is if the default action
is an error action. In that case, don't check for expected
@@ -2111,7 +1886,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
}
yyarg[yycount++] = yytname[yyx];
{
- YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
if (! (yysize <= yysize1
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
@@ -2178,1175 +1953,1057 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, yyscan_t yyscanner, quickstep::ParseStatement **parsedStatement)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep, yylocationp, yyscanner, parsedStatement)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
- YYLTYPE *yylocationp;
- yyscan_t yyscanner;
- quickstep::ParseStatement **parsedStatement;
-#endif
{
YYUSE (yyvaluep);
YYUSE (yylocationp);
YYUSE (yyscanner);
YYUSE (parsedStatement);
-
if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
switch (yytype)
{
- case 3: /* TOKEN_COMMAND */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+ case 3: /* TOKEN_COMMAND */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).string_value_) != nullptr) {
delete ((*yyvaluep).string_value_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2218 "SqlParser_gen.cpp"
+}
+#line 1978 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 4: /* TOKEN_NAME */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 4: /* TOKEN_NAME */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).string_value_) != nullptr) {
delete ((*yyvaluep).string_value_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2229 "SqlParser_gen.cpp"
+}
+#line 1988 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 5: /* TOKEN_STRING_SINGLE_QUOTED */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 5: /* TOKEN_STRING_SINGLE_QUOTED */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).string_value_) != nullptr) {
delete ((*yyvaluep).string_value_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2240 "SqlParser_gen.cpp"
+}
+#line 1998 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 6: /* TOKEN_STRING_DOUBLE_QUOTED */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 6: /* TOKEN_STRING_DOUBLE_QUOTED */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).string_value_) != nullptr) {
delete ((*yyvaluep).string_value_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2251 "SqlParser_gen.cpp"
+}
+#line 2008 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 7: /* TOKEN_UNSIGNED_NUMVAL */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 7: /* TOKEN_UNSIGNED_NUMVAL */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).numeric_literal_value_) != nullptr) {
delete ((*yyvaluep).numeric_literal_value_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2262 "SqlParser_gen.cpp"
+}
+#line 2018 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 147: /* sql_statement */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 147: /* sql_statement */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).statement_) != nullptr) {
delete ((*yyvaluep).statement_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2273 "SqlParser_gen.cpp"
+}
+#line 2028 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 148: /* quit_statement */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 148: /* quit_statement */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).quit_statement_) != nullptr) {
delete ((*yyvaluep).quit_statement_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2284 "SqlParser_gen.cpp"
+}
+#line 2038 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 149: /* alter_table_statement */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 149: /* alter_table_statement */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).statement_) != nullptr) {
delete ((*yyvaluep).statement_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2295 "SqlParser_gen.cpp"
+}
+#line 2048 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 150: /* create_table_statement */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 150: /* create_table_statement */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).create_table_statement_) != nullptr) {
delete ((*yyvaluep).create_table_statement_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2306 "SqlParser_gen.cpp"
+}
+#line 2058 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 151: /* create_index_statement */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 151: /* create_index_statement */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).statement_) != nullptr) {
delete ((*yyvaluep).statement_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2317 "SqlParser_gen.cpp"
+}
+#line 2068 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 152: /* drop_table_statement */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 152: /* drop_table_statement */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).drop_table_statement_) != nullptr) {
delete ((*yyvaluep).drop_table_statement_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2328 "SqlParser_gen.cpp"
+}
+#line 2078 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 153: /* column_def */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 153: /* column_def */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).attribute_definition_) != nullptr) {
delete ((*yyvaluep).attribute_definition_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2339 "SqlParser_gen.cpp"
+}
+#line 2088 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 154: /* column_def_commalist */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 154: /* column_def_commalist */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).attribute_definition_list_) != nullptr) {
delete ((*yyvaluep).attribute_definition_list_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2350 "SqlParser_gen.cpp"
+}
+#line 2098 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 155: /* data_type */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 155: /* data_type */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).data_type_) != nullptr) {
delete ((*yyvaluep).data_type_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2361 "SqlParser_gen.cpp"
+}
+#line 2108 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 156: /* column_constraint_def */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 156: /* column_constraint_def */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).column_constraint_) != nullptr) {
delete ((*yyvaluep).column_constraint_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2372 "SqlParser_gen.cpp"
+}
+#line 2118 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 157: /* column_constraint_def_list */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 157: /* column_constraint_def_list */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).column_constraint_list_) != nullptr) {
delete ((*yyvaluep).column_constraint_list_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2383 "SqlParser_gen.cpp"
+}
+#line 2128 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 158: /* opt_column_constraint_def_list */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 158: /* opt_column_constraint_def_list */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).column_constraint_list_) != nullptr) {
delete ((*yyvaluep).column_constraint_list_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2394 "SqlParser_gen.cpp"
+}
+#line 2138 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 162: /* opt_column_list */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 162: /* opt_column_list */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).attribute_list_) != nullptr) {
delete ((*yyvaluep).attribute_list_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2405 "SqlParser_gen.cpp"
+}
+#line 2148 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 163: /* opt_block_properties */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 163: /* opt_block_properties */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).block_properties_) != nullptr) {
delete ((*yyvaluep).block_properties_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2416 "SqlParser_gen.cpp"
+}
+#line 2158 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 164: /* opt_partition_clause */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 164: /* opt_partition_clause */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).partition_clause_) != nullptr) {
delete ((*yyvaluep).partition_clause_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2427 "SqlParser_gen.cpp"
+}
+#line 2168 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 165: /* partition_type */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 165: /* partition_type */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).string_value_) != nullptr) {
delete ((*yyvaluep).string_value_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2438 "SqlParser_gen.cpp"
+}
+#line 2178 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 166: /* key_value_list */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 166: /* key_value_list */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).key_value_list_) != nullptr) {
delete ((*yyvaluep).key_value_list_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2449 "SqlParser_gen.cpp"
+}
+#line 2188 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 167: /* key_value */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 167: /* key_value */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).key_value_) != nullptr) {
delete ((*yyvaluep).key_value_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2460 "SqlParser_gen.cpp"
+}
+#line 2198 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 168: /* key_string_value */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 168: /* key_string_value */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).key_string_value_) != nullptr) {
delete ((*yyvaluep).key_string_value_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2471 "SqlParser_gen.cpp"
+}
+#line 2208 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 169: /* key_string_list */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 169: /* key_string_list */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).key_string_list_) != nullptr) {
delete ((*yyvaluep).key_string_list_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2482 "SqlParser_gen.cpp"
+}
+#line 2218 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 170: /* key_integer_value */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 170: /* key_integer_value */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).key_integer_value_) != nullptr) {
delete ((*yyvaluep).key_integer_value_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2493 "SqlParser_gen.cpp"
+}
+#line 2228 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 171: /* index_type */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 171: /* index_type */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).string_value_) != nullptr) {
delete ((*yyvaluep).string_value_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2504 "SqlParser_gen.cpp"
+}
+#line 2238 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 172: /* opt_index_properties */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 172: /* opt_index_properties */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).key_value_list_) != nullptr) {
delete ((*yyvaluep).key_value_list_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2515 "SqlParser_gen.cpp"
+}
+#line 2248 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 173: /* insert_statement */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 173: /* insert_statement */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).insert_statement_) != nullptr) {
delete ((*yyvaluep).insert_statement_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2526 "SqlParser_gen.cpp"
+}
+#line 2258 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 174: /* copy_from_statement */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 174: /* copy_from_statement */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).copy_from_statement_) != nullptr) {
delete ((*yyvaluep).copy_from_statement_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2537 "SqlParser_gen.cpp"
+}
+#line 2268 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 175: /* opt_copy_from_params */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 175: /* opt_copy_from_params */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).copy_from_params_) != nullptr) {
delete ((*yyvaluep).copy_from_params_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2548 "SqlParser_gen.cpp"
+}
+#line 2278 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 176: /* copy_from_params */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 176: /* copy_from_params */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).copy_from_params_) != nullptr) {
delete ((*yyvaluep).copy_from_params_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2559 "SqlParser_gen.cpp"
+}
+#line 2288 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 177: /* update_statement */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 177: /* update_statement */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).update_statement_) != nullptr) {
delete ((*yyvaluep).update_statement_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2570 "SqlParser_gen.cpp"
+}
+#line 2298 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 178: /* delete_statement */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 178: /* delete_statement */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).delete_statement_) != nullptr) {
delete ((*yyvaluep).delete_statement_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2581 "SqlParser_gen.cpp"
+}
+#line 2308 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 179: /* assignment_list */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 179: /* assignment_list */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).assignment_list_) != nullptr) {
delete ((*yyvaluep).assignment_list_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2592 "SqlParser_gen.cpp"
+}
+#line 2318 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 180: /* assignment_item */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 180: /* assignment_item */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).assignment_) != nullptr) {
delete ((*yyvaluep).assignment_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2603 "SqlParser_gen.cpp"
+}
+#line 2328 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 181: /* select_statement */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 181: /* select_statement */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).select_statement_) != nullptr) {
delete ((*yyvaluep).select_statement_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2614 "SqlParser_gen.cpp"
+}
+#line 2338 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 182: /* opt_priority_clause */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 182: /* opt_priority_clause */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).opt_priority_clause_) != nullptr) {
delete ((*yyvaluep).opt_priority_clause_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2625 "SqlParser_gen.cpp"
+}
+#line 2348 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 183: /* with_clause */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 183: /* with_clause */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).with_list_) != nullptr) {
delete ((*yyvaluep).with_list_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2636 "SqlParser_gen.cpp"
+}
+#line 2358 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 184: /* with_list */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 184: /* with_list */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).with_list_) != nullptr) {
delete ((*yyvaluep).with_list_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2647 "SqlParser_gen.cpp"
+}
+#line 2368 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 185: /* with_list_element */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 185: /* with_list_element */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).with_list_element_) != nullptr) {
delete ((*yyvaluep).with_list_element_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2658 "SqlParser_gen.cpp"
+}
+#line 2378 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 186: /* select_query */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 186: /* select_query */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257 */
+ {
if (((*yyvaluep).select_query_) != nullptr) {
delete ((*yyvaluep).select_query_);
}
-};
-/* Line 1398 of yacc.c */
-#line 2669 "SqlParser_gen.cpp"
+}
+#line 2388 "SqlParser_gen.cpp" /* yacc.c:1257 */
break;
- case 188: /* selection */
-/* Line 1398 of yacc.c */
-#line 620 "../SqlParser.ypp"
- {
+
+ case 188: /* selection */
+#line 620 "../SqlParser.ypp" /* yacc.c:1257
<TRUNCATED>
[5/5] incubator-quickstep git commit: Fix the memory leak in
FastSeparateChaining hash table.
Posted by hb...@apache.org.
Fix the memory leak in FastSeparateChaining hash table.
- Destruction of payload in hash table.
- Separate phases of payload destruction of aggregation hash tables.
- First the payloads will be destructed by respective aggregation
handles.
- Second the hash table itself will be destructed.
- Remove DestroyValues function.
Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/3616e4df
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/3616e4df
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/3616e4df
Branch: refs/heads/fix-fasthash-destructor
Commit: 3616e4dfe2909f6f5eca24c3e0100aa62e4cc484
Parents: 0820e3d
Author: Harshad Deshmukh <hb...@apache.org>
Authored: Fri Sep 23 16:35:48 2016 -0500
Committer: Harshad Deshmukh <hb...@apache.org>
Committed: Mon Oct 3 19:07:09 2016 -0500
----------------------------------------------------------------------
expressions/aggregation/AggregationHandle.hpp | 8 +
.../aggregation/AggregationHandleAvg.hpp | 10 +
.../aggregation/AggregationHandleMax.hpp | 9 +
.../aggregation/AggregationHandleMin.hpp | 9 +
.../aggregation/AggregationHandleSum.hpp | 10 +
query_execution/QueryContext.hpp | 14 ++
.../DestroyAggregationStateOperator.cpp | 1 +
storage/AggregationOperationState.cpp | 13 +-
storage/AggregationOperationState.hpp | 12 +-
storage/CMakeLists.txt | 1 +
storage/FastSeparateChainingHashTable.hpp | 239 +++----------------
storage/HashTableBase.hpp | 6 +
12 files changed, 116 insertions(+), 216 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/3616e4df/expressions/aggregation/AggregationHandle.hpp
----------------------------------------------------------------------
diff --git a/expressions/aggregation/AggregationHandle.hpp b/expressions/aggregation/AggregationHandle.hpp
index 48ce7fe..4b51179 100644
--- a/expressions/aggregation/AggregationHandle.hpp
+++ b/expressions/aggregation/AggregationHandle.hpp
@@ -406,6 +406,14 @@ class AggregationHandle {
virtual void initPayload(std::uint8_t *byte_ptr) const {}
/**
+ * @brief Destroy the payload (in the aggregation hash table) for the given
+ * aggregation handle.
+ *
+ * @param byte_ptr The pointer to the aggregation state in the hash table.
+ **/
+ virtual void destroyPayload(std::uint8_t *byte_ptr) const {}
+
+ /**
* @brief Inform the aggregation handle to block (prohibit) updates on the
* aggregation state.
**/
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/3616e4df/expressions/aggregation/AggregationHandleAvg.hpp
----------------------------------------------------------------------
diff --git a/expressions/aggregation/AggregationHandleAvg.hpp b/expressions/aggregation/AggregationHandleAvg.hpp
index 3c6e0c2..7a19eaf 100644
--- a/expressions/aggregation/AggregationHandleAvg.hpp
+++ b/expressions/aggregation/AggregationHandleAvg.hpp
@@ -161,6 +161,16 @@ class AggregationHandleAvg : public AggregationConcreteHandle {
*count_ptr = blank_state_.count_;
}
+ void destroyPayload(std::uint8_t *byte_ptr) const override {
+ TypedValue *sum_ptr =
+ reinterpret_cast<TypedValue *>(byte_ptr + blank_state_.sum_offset_);
+ if (sum_ptr != nullptr) {
+ if (!sum_ptr->ownsOutOfLineData()) {
+ sum_ptr->~TypedValue();
+ }
+ }
+ }
+
AggregationState* accumulateColumnVectors(
const std::vector<std::unique_ptr<ColumnVector>> &column_vectors)
const override;
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/3616e4df/expressions/aggregation/AggregationHandleMax.hpp
----------------------------------------------------------------------
diff --git a/expressions/aggregation/AggregationHandleMax.hpp b/expressions/aggregation/AggregationHandleMax.hpp
index 5fb9f44..66246ce 100644
--- a/expressions/aggregation/AggregationHandleMax.hpp
+++ b/expressions/aggregation/AggregationHandleMax.hpp
@@ -129,6 +129,15 @@ class AggregationHandleMax : public AggregationConcreteHandle {
*max_ptr = t1;
}
+ void destroyPayload(std::uint8_t *byte_ptr) const override {
+ TypedValue *max_ptr = reinterpret_cast<TypedValue *>(byte_ptr);
+ if (max_ptr != nullptr) {
+ if (!max_ptr->ownsOutOfLineData()) {
+ max_ptr->~TypedValue();
+ }
+ }
+ }
+
AggregationState* accumulateColumnVectors(
const std::vector<std::unique_ptr<ColumnVector>> &column_vectors)
const override;
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/3616e4df/expressions/aggregation/AggregationHandleMin.hpp
----------------------------------------------------------------------
diff --git a/expressions/aggregation/AggregationHandleMin.hpp b/expressions/aggregation/AggregationHandleMin.hpp
index 173911d..dddd30b 100644
--- a/expressions/aggregation/AggregationHandleMin.hpp
+++ b/expressions/aggregation/AggregationHandleMin.hpp
@@ -131,6 +131,15 @@ class AggregationHandleMin : public AggregationConcreteHandle {
*min_ptr = t1;
}
+ void destroyPayload(std::uint8_t *byte_ptr) const override {
+ TypedValue *min_ptr = reinterpret_cast<TypedValue *>(byte_ptr);
+ if (min_ptr != nullptr) {
+ if (!min_ptr->ownsOutOfLineData()) {
+ min_ptr->~TypedValue();
+ }
+ }
+ }
+
AggregationState* accumulateColumnVectors(
const std::vector<std::unique_ptr<ColumnVector>> &column_vectors)
const override;
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/3616e4df/expressions/aggregation/AggregationHandleSum.hpp
----------------------------------------------------------------------
diff --git a/expressions/aggregation/AggregationHandleSum.hpp b/expressions/aggregation/AggregationHandleSum.hpp
index 6c334a6..4492943 100644
--- a/expressions/aggregation/AggregationHandleSum.hpp
+++ b/expressions/aggregation/AggregationHandleSum.hpp
@@ -153,6 +153,16 @@ class AggregationHandleSum : public AggregationConcreteHandle {
*null_ptr = true;
}
+ void destroyPayload(std::uint8_t *byte_ptr) const override {
+ TypedValue *sum_ptr =
+ reinterpret_cast<TypedValue *>(byte_ptr + blank_state_.sum_offset_);
+ if (sum_ptr != nullptr) {
+ if (!sum_ptr->ownsOutOfLineData()) {
+ sum_ptr->~TypedValue();
+ }
+ }
+ }
+
AggregationState* accumulateColumnVectors(
const std::vector<std::unique_ptr<ColumnVector>> &column_vectors)
const override;
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/3616e4df/query_execution/QueryContext.hpp
----------------------------------------------------------------------
diff --git a/query_execution/QueryContext.hpp b/query_execution/QueryContext.hpp
index 393b55e..7059803 100644
--- a/query_execution/QueryContext.hpp
+++ b/query_execution/QueryContext.hpp
@@ -193,6 +193,20 @@ class QueryContext {
}
/**
+ * @brief Destroy the payloads from the aggregation hash tables.
+ *
+ * @warning After calling these methods, the hash table will be in an invalid
+ * state. No other operation should be performed on them.
+ *
+ * @param id The ID of the AggregationOperationState.
+ **/
+ inline void destroyAggregationHashTablePayload(const aggregation_state_id id) {
+ DCHECK_LT(id, aggregation_states_.size());
+ DCHECK(aggregation_states_[id]);
+ aggregation_states_[id]->destroyAggregationHashTablePayload();
+ }
+
+ /**
* @brief Whether the given BloomFilter id is valid.
*
* @param id The BloomFilter id.
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/3616e4df/relational_operators/DestroyAggregationStateOperator.cpp
----------------------------------------------------------------------
diff --git a/relational_operators/DestroyAggregationStateOperator.cpp b/relational_operators/DestroyAggregationStateOperator.cpp
index 62ca9e7..7563fd0 100644
--- a/relational_operators/DestroyAggregationStateOperator.cpp
+++ b/relational_operators/DestroyAggregationStateOperator.cpp
@@ -58,6 +58,7 @@ bool DestroyAggregationStateOperator::getAllWorkOrderProtos(WorkOrderProtosConta
}
void DestroyAggregationStateWorkOrder::execute() {
+ query_context_->destroyAggregationHashTablePayload(aggr_state_index_);
query_context_->destroyAggregationState(aggr_state_index_);
}
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/3616e4df/storage/AggregationOperationState.cpp
----------------------------------------------------------------------
diff --git a/storage/AggregationOperationState.cpp b/storage/AggregationOperationState.cpp
index 073b813..8de6832 100644
--- a/storage/AggregationOperationState.cpp
+++ b/storage/AggregationOperationState.cpp
@@ -166,8 +166,7 @@ AggregationOperationState::AggregationOperationState(
}
// Initialize the corresponding distinctify hash table if this is a
- // DISTINCT
- // aggregation.
+ // DISTINCT aggregation.
if (*is_distinct_it) {
std::vector<const Type *> key_types(group_by_types);
key_types.insert(
@@ -595,4 +594,14 @@ void AggregationOperationState::finalizeHashTable(
output_destination->bulkInsertTuples(&complete_result);
}
+void AggregationOperationState::destroyAggregationHashTablePayload() {
+ if (group_by_hashtable_pool_ != nullptr) {
+ auto all_hash_tables = group_by_hashtable_pool_->getAllHashTables();
+ DCHECK(all_hash_tables != nullptr);
+ for (std::size_t ht_index = 0; ht_index < all_hash_tables->size(); ++ht_index) {
+ (*all_hash_tables)[ht_index]->destroyPayload();
+ }
+ }
+}
+
} // namespace quickstep
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/3616e4df/storage/AggregationOperationState.hpp
----------------------------------------------------------------------
diff --git a/storage/AggregationOperationState.hpp b/storage/AggregationOperationState.hpp
index cbbfc22..3b0f286 100644
--- a/storage/AggregationOperationState.hpp
+++ b/storage/AggregationOperationState.hpp
@@ -167,6 +167,11 @@ class AggregationOperationState {
**/
void finalizeAggregate(InsertDestination *output_destination);
+ /**
+ * @brief Destroy the payloads in the aggregation hash tables.
+ **/
+ void destroyAggregationHashTablePayload();
+
static void mergeGroupByHashTables(AggregationStateHashTableBase *src,
AggregationStateHashTableBase *dst);
@@ -185,6 +190,9 @@ class AggregationOperationState {
void finalizeSingleState(InsertDestination *output_destination);
void finalizeHashTable(InsertDestination *output_destination);
+ // A vector of group by hash table pools.
+ std::unique_ptr<HashTablePool> group_by_hashtable_pool_;
+
// Common state for all aggregates in this operation: the input relation, the
// filter predicate (if any), and the list of GROUP BY expressions (if any).
const CatalogRelationSchema &input_relation_;
@@ -193,7 +201,6 @@ class AggregationOperationState {
// Each individual aggregate in this operation has an AggregationHandle and
// some number of Scalar arguments.
- // std::vector<std::unique_ptr<AggregationHandle>> handles_;
std::vector<AggregationHandle *> handles_;
std::vector<std::vector<std::unique_ptr<const Scalar>>> arguments_;
@@ -221,9 +228,6 @@ class AggregationOperationState {
std::vector<std::unique_ptr<AggregationStateHashTableBase>>
group_by_hashtables_;
- // A vector of group by hash table pools.
- std::unique_ptr<HashTablePool> group_by_hashtable_pool_;
-
StorageManager *storage_manager_;
DISALLOW_COPY_AND_ASSIGN(AggregationOperationState);
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/3616e4df/storage/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/storage/CMakeLists.txt b/storage/CMakeLists.txt
index f05cc46..f83dd36 100644
--- a/storage/CMakeLists.txt
+++ b/storage/CMakeLists.txt
@@ -662,6 +662,7 @@ target_link_libraries(quickstep_storage_FastHashTableFactory
quickstep_utility_BloomFilter
quickstep_utility_Macros)
target_link_libraries(quickstep_storage_FastSeparateChainingHashTable
+ quickstep_expressions_aggregation_AggregationHandle
quickstep_storage_FastHashTable
quickstep_storage_HashTable
quickstep_storage_HashTableBase
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/3616e4df/storage/FastSeparateChainingHashTable.hpp
----------------------------------------------------------------------
diff --git a/storage/FastSeparateChainingHashTable.hpp b/storage/FastSeparateChainingHashTable.hpp
index 886a8ca..c7dd288 100644
--- a/storage/FastSeparateChainingHashTable.hpp
+++ b/storage/FastSeparateChainingHashTable.hpp
@@ -27,6 +27,7 @@
#include <utility>
#include <vector>
+#include "expressions/aggregation/AggregationHandle.hpp"
#include "storage/FastHashTable.hpp"
#include "storage/HashTable.hpp"
#include "storage/HashTableBase.hpp"
@@ -67,35 +68,7 @@ class FastSeparateChainingHashTable
const std::vector<AggregationHandle *> &handles,
StorageManager *storage_manager);
- FastSeparateChainingHashTable(const std::vector<const Type *> &key_types,
- void *hash_table_memory,
- const std::size_t hash_table_memory_size,
- const bool new_hash_table,
- const bool hash_table_memory_zeroed);
-
- // Delegating constructors for single scalar keys.
- FastSeparateChainingHashTable(const Type &key_type,
- const std::size_t num_entries,
- StorageManager *storage_manager)
- : FastSeparateChainingHashTable(std::vector<const Type *>(1, &key_type),
- num_entries,
- storage_manager) {}
-
- FastSeparateChainingHashTable(const Type &key_type,
- void *hash_table_memory,
- const std::size_t hash_table_memory_size,
- const bool new_hash_table,
- const bool hash_table_memory_zeroed)
- : FastSeparateChainingHashTable(std::vector<const Type *>(1, &key_type),
- hash_table_memory,
- hash_table_memory_size,
- new_hash_table,
- hash_table_memory_zeroed) {}
-
~FastSeparateChainingHashTable() override {
- DestroyValues(buckets_,
- header_->buckets_allocated.load(std::memory_order_relaxed),
- bucket_size_);
std::free(init_payload_);
}
@@ -167,6 +140,24 @@ class FastSeparateChainingHashTable
const std::size_t total_variable_key_size,
HashTablePreallocationState *prealloc_state) override;
+ void destroyPayload() override {
+ void *hash_buckets = buckets_;
+ const std::size_t num_buckets =
+ header_->buckets_allocated.load(std::memory_order_relaxed);
+ const std::size_t bucket_size = bucket_size_;
+ void *value_ptr = static_cast<char *>(hash_buckets) + kValueOffset;
+ for (std::size_t bucket_num = 0; bucket_num < num_buckets; ++bucket_num) {
+ std::size_t handle_num = 0;
+ for (AggregationHandle *handle : this->handles_) {
+ value_ptr =
+ static_cast<char *>(value_ptr) + this->payload_offsets_[handle_num];
+ handle->destroyPayload(static_cast<std::uint8_t *>(value_ptr));
+ ++handle_num;
+ }
+ value_ptr = static_cast<char *>(value_ptr) + bucket_size;
+ }
+ }
+
private:
struct Header {
std::size_t num_slots;
@@ -190,13 +181,6 @@ class FastSeparateChainingHashTable
1) *
kBucketAlignment;
}
- // If ValueT is not trivially destructible, invoke its destructor for all
- // values held in the specified buckets (including those in "empty" buckets
- // that were default constructed). If ValueT is trivially destructible, this
- // is a no-op.
- void DestroyValues(void *buckets,
- const std::size_t num_buckets,
- const std::size_t bucket_size);
// Attempt to find an empty bucket to insert 'hash_code' into, starting after
// '*bucket' in the chain (or, if '*bucket' is NULL, starting from the slot
@@ -242,6 +226,8 @@ class FastSeparateChainingHashTable
// at least 'extra_variable_storage' bytes of variable-length storage free.
bool isFull(const std::size_t extra_variable_storage) const;
+ const std::vector<AggregationHandle *> &handles_;
+
// Helper object to manage key storage.
HashTableKeyManager<serializable, force_key_copy> key_manager_;
@@ -309,12 +295,14 @@ FastSeparateChainingHashTable<resizable,
true),
kBucketAlignment(alignof(std::atomic<std::size_t>)),
kValueOffset(sizeof(std::atomic<std::size_t>) + sizeof(std::size_t)),
+ handles_(handles),
key_manager_(this->key_types_, kValueOffset + this->total_payload_size_),
bucket_size_(ComputeBucketSize(key_manager_.getFixedKeySize())) {
init_payload_ =
static_cast<std::uint8_t *>(calloc(this->total_payload_size_, 1));
+ DCHECK(init_payload_ != nullptr);
int k = 0;
- for (auto handle : handles) {
+ for (auto handle : this->handles_) {
handle->initPayload(init_payload_ + this->payload_offsets_[k]);
k++;
}
@@ -433,155 +421,6 @@ template <bool resizable,
bool serializable,
bool force_key_copy,
bool allow_duplicate_keys>
-FastSeparateChainingHashTable<resizable,
- serializable,
- force_key_copy,
- allow_duplicate_keys>::
- FastSeparateChainingHashTable(const std::vector<const Type *> &key_types,
- void *hash_table_memory,
- const std::size_t hash_table_memory_size,
- const bool new_hash_table,
- const bool hash_table_memory_zeroed)
- : FastHashTable<resizable,
- serializable,
- force_key_copy,
- allow_duplicate_keys>(key_types,
- hash_table_memory,
- hash_table_memory_size,
- new_hash_table,
- hash_table_memory_zeroed,
- false,
- false,
- true),
- kBucketAlignment(alignof(std::atomic<std::size_t>) < alignof(std::uint8_t)
- ? alignof(std::uint8_t)
- : alignof(std::atomic<std::size_t>)),
- kValueOffset(sizeof(std::atomic<std::size_t>) + sizeof(std::size_t)),
- key_manager_(this->key_types_, kValueOffset + sizeof(std::uint8_t)),
- bucket_size_(ComputeBucketSize(key_manager_.getFixedKeySize())) {
- // Bucket size always rounds up to the alignment requirement of the atomic
- // size_t "next" pointer at the front or a ValueT, whichever is larger.
- //
- // Make sure that the larger of the two alignment requirements also satisfies
- // the smaller.
- static_assert(
- alignof(std::atomic<std::size_t>) < alignof(std::uint8_t)
- ? alignof(std::uint8_t) % alignof(std::atomic<std::size_t>) == 0
- : alignof(std::atomic<std::size_t>) % alignof(std::uint8_t) == 0,
- "Alignment requirement of std::atomic<std::size_t> does not "
- "evenly divide with alignment requirement of ValueT.");
-
- // Give base HashTable information about what key components are stored
- // inline from 'key_manager_'.
- this->setKeyInline(key_manager_.getKeyInline());
-
- // FIXME(chasseur): If we are reconstituting a HashTable using a block of
- // memory whose start was aligned differently than the memory block that was
- // originally used (modulo alignof(Header)), we could wind up with all of our
- // data structures misaligned. If memory is inside a
- // StorageBlock/StorageBlob, this will never occur, since the StorageManager
- // always allocates slots aligned to kCacheLineBytes. Similarly, this isn't
- // a problem for memory inside any other allocation aligned to at least
- // alignof(Header) == kCacheLineBytes.
-
- void *aligned_memory_start = this->hash_table_memory_;
- std::size_t available_memory = this->hash_table_memory_size_;
-
- if (align(alignof(Header),
- sizeof(Header),
- aligned_memory_start,
- available_memory) == nullptr) {
- FATAL_ERROR("Attempted to create a non-resizable "
- << "SeparateChainingHashTable with "
- << available_memory
- << " bytes of memory at "
- << aligned_memory_start
- << " which either can not fit a "
- << "SeparateChainingHashTable::Header or meet its alignement "
- << "requirement.");
- } else if (aligned_memory_start != this->hash_table_memory_) {
- // In general, we could get memory of any alignment, although at least
- // cache-line aligned would be nice.
- DEV_WARNING("StorageBlob memory adjusted by "
- << (this->hash_table_memory_size_ - available_memory)
- << " bytes to meet alignment requirement for "
- << "SeparateChainingHashTable::Header.");
- }
-
- header_ = static_cast<Header *>(aligned_memory_start);
- aligned_memory_start =
- static_cast<char *>(aligned_memory_start) + sizeof(Header);
- available_memory -= sizeof(Header);
-
- if (new_hash_table) {
- std::size_t estimated_bucket_capacity =
- available_memory /
- (kHashTableLoadFactor * sizeof(std::atomic<std::size_t>) +
- bucket_size_ + key_manager_.getEstimatedVariableKeySize());
- std::size_t num_slots = get_previous_prime_number(
- estimated_bucket_capacity * kHashTableLoadFactor);
-
- // Fill in the header.
- header_->num_slots = num_slots;
- header_->num_buckets = num_slots / kHashTableLoadFactor;
- header_->buckets_allocated.store(0, std::memory_order_relaxed);
- header_->variable_length_bytes_allocated.store(0,
- std::memory_order_relaxed);
- }
-
- // Locate the slot array.
- slots_ = static_cast<std::atomic<std::size_t> *>(aligned_memory_start);
- aligned_memory_start = static_cast<char *>(aligned_memory_start) +
- sizeof(std::atomic<std::size_t>) * header_->num_slots;
- available_memory -= sizeof(std::atomic<std::size_t>) * header_->num_slots;
-
- if (new_hash_table && !hash_table_memory_zeroed) {
- std::memset(
- slots_, 0x0, sizeof(std::atomic<std::size_t>) * header_->num_slots);
- }
-
- // Locate the buckets.
- buckets_ = aligned_memory_start;
- // Extra-paranoid: sizeof(Header) should almost certainly be a multiple of
- // kBucketAlignment, unless ValueT has some members with seriously big
- // (> kCacheLineBytes) alignment requirements specified using alignas().
- if (align(kBucketAlignment, bucket_size_, buckets_, available_memory) ==
- nullptr) {
- FATAL_ERROR("Attempted to create a non-resizable "
- << "SeparateChainingHashTable with "
- << this->hash_table_memory_size_
- << " bytes of memory at "
- << this->hash_table_memory_
- << ", which can hold an aligned "
- << "SeparateChainingHashTable::Header but does not have "
- << "enough remaining space for even a single hash bucket.");
- } else if (buckets_ != aligned_memory_start) {
- DEV_WARNING(
- "Bucket array start position adjusted to meet alignment "
- "requirement for SeparateChainingHashTable's value type.");
- if (header_->num_buckets * bucket_size_ > available_memory) {
- DEBUG_ASSERT(new_hash_table);
- --(header_->num_buckets);
- }
- }
- available_memory -= bucket_size_ * header_->num_buckets;
-
- // Make sure "next" pointers in buckets are zeroed-out.
- if (new_hash_table && !hash_table_memory_zeroed) {
- std::memset(buckets_, 0x0, header_->num_buckets * bucket_size_);
- }
-
- // Locate variable-length key storage region.
- key_manager_.setVariableLengthStorageInfo(
- static_cast<char *>(buckets_) + header_->num_buckets * bucket_size_,
- available_memory,
- &(header_->variable_length_bytes_allocated));
-}
-
-template <bool resizable,
- bool serializable,
- bool force_key_copy,
- bool allow_duplicate_keys>
void FastSeparateChainingHashTable<resizable,
serializable,
force_key_copy,
@@ -589,7 +428,7 @@ void FastSeparateChainingHashTable<resizable,
const std::size_t used_buckets =
header_->buckets_allocated.load(std::memory_order_relaxed);
// Destroy existing values, if necessary.
- DestroyValues(buckets_, used_buckets, bucket_size_);
+ destroyPayload();
// Zero-out slot array.
std::memset(
@@ -995,10 +834,11 @@ std::uint8_t* FastSeparateChainingHashTable<resizable,
// Copy the supplied 'initial_value' into place.
std::uint8_t *value = static_cast<unsigned char *>(bucket) + kValueOffset;
- if (init_value_ptr == nullptr)
+ if (init_value_ptr == nullptr) {
memcpy(value, init_payload_, this->total_payload_size_);
- else
+ } else {
memcpy(value, init_value_ptr, this->total_payload_size_);
+ }
// Update the previous chain pointer to point to the new bucket.
pending_chain_ptr->store(pending_chain_ptr_finish_value,
@@ -1482,8 +1322,7 @@ void FastSeparateChainingHashTable<
original_variable_storage_used);
}
- // Destroy values in the original hash table, if neccesary,
- DestroyValues(buckets_, original_buckets_used, bucket_size_);
+ destroyPayload();
// Make resized structures active.
std::swap(this->blob_, resized_blob);
@@ -1578,26 +1417,6 @@ template <bool resizable,
bool serializable,
bool force_key_copy,
bool allow_duplicate_keys>
-void FastSeparateChainingHashTable<
- resizable,
- serializable,
- force_key_copy,
- allow_duplicate_keys>::DestroyValues(void *hash_buckets,
- const std::size_t num_buckets,
- const std::size_t bucket_size) {
- if (!std::is_trivially_destructible<std::uint8_t>::value) {
- void *value_ptr = static_cast<char *>(hash_buckets) + kValueOffset;
- for (std::size_t bucket_num = 0; bucket_num < num_buckets; ++bucket_num) {
- static_cast<std::uint8_t *>(value_ptr)->~uint8_t();
- value_ptr = static_cast<char *>(value_ptr) + bucket_size;
- }
- }
-}
-
-template <bool resizable,
- bool serializable,
- bool force_key_copy,
- bool allow_duplicate_keys>
inline bool FastSeparateChainingHashTable<resizable,
serializable,
force_key_copy,
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/3616e4df/storage/HashTableBase.hpp
----------------------------------------------------------------------
diff --git a/storage/HashTableBase.hpp b/storage/HashTableBase.hpp
index cd0a141..a3180bb 100644
--- a/storage/HashTableBase.hpp
+++ b/storage/HashTableBase.hpp
@@ -99,6 +99,12 @@ class HashTableBase {
return false;
}
+ /**
+ * @brief Destroy the payload stored in the hash table.
+ **/
+ virtual void destroyPayload() {
+ }
+
protected:
HashTableBase() {}
[2/5] incubator-quickstep git commit: Checking in preprocessed files
for datetime change.
Posted by hb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/0820e3d9/parser/preprocessed/SqlParser_gen.hpp
----------------------------------------------------------------------
diff --git a/parser/preprocessed/SqlParser_gen.hpp b/parser/preprocessed/SqlParser_gen.hpp
index 0f66d1d..fe963be 100644
--- a/parser/preprocessed/SqlParser_gen.hpp
+++ b/parser/preprocessed/SqlParser_gen.hpp
@@ -1,19 +1,19 @@
-/* A Bison parser, made by GNU Bison 2.7. */
+/* A Bison parser, made by GNU Bison 3.0.2. */
/* Bison interface for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
-
+
+ Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -26,13 +26,13 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
#ifndef YY_QUICKSTEP_YY_SQLPARSER_GEN_HPP_INCLUDED
# define YY_QUICKSTEP_YY_SQLPARSER_GEN_HPP_INCLUDED
-/* Enabling traces. */
+/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
@@ -40,152 +40,151 @@
extern int quickstep_yydebug;
#endif
-/* Tokens. */
+/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- TOKEN_COMMAND = 258,
- TOKEN_NAME = 259,
- TOKEN_STRING_SINGLE_QUOTED = 260,
- TOKEN_STRING_DOUBLE_QUOTED = 261,
- TOKEN_UNSIGNED_NUMVAL = 262,
- TOKEN_OR = 263,
- TOKEN_AND = 264,
- TOKEN_NOT = 265,
- TOKEN_EQ = 266,
- TOKEN_NEQ = 267,
- TOKEN_GEQ = 268,
- TOKEN_GT = 269,
- TOKEN_LEQ = 270,
- TOKEN_LT = 271,
- TOKEN_REGEXP = 272,
- TOKEN_LIKE = 273,
- TOKEN_BETWEEN = 274,
- TOKEN_IS = 275,
- UNARY_MINUS = 276,
- UNARY_PLUS = 277,
- TOKEN_ADD = 278,
- TOKEN_ALL = 279,
- TOKEN_ALTER = 280,
- TOKEN_AS = 281,
- TOKEN_ASC = 282,
- TOKEN_BIGINT = 283,
- TOKEN_BIT = 284,
- TOKEN_BITWEAVING = 285,
- TOKEN_BLOCKPROPERTIES = 286,
- TOKEN_BLOCKSAMPLE = 287,
- TOKEN_BLOOM_FILTER = 288,
- TOKEN_CSB_TREE = 289,
- TOKEN_BY = 290,
- TOKEN_CASE = 291,
- TOKEN_CHARACTER = 292,
- TOKEN_CHECK = 293,
- TOKEN_COLUMN = 294,
- TOKEN_CONSTRAINT = 295,
- TOKEN_COPY = 296,
- TOKEN_CREATE = 297,
- TOKEN_CURRENT = 298,
- TOKEN_DATE = 299,
- TOKEN_DATETIME = 300,
- TOKEN_DAY = 301,
- TOKEN_DECIMAL = 302,
- TOKEN_DEFAULT = 303,
- TOKEN_DELETE = 304,
- TOKEN_DELIMITER = 305,
- TOKEN_DESC = 306,
- TOKEN_DISTINCT = 307,
- TOKEN_DOUBLE = 308,
- TOKEN_DROP = 309,
- TOKEN_ELSE = 310,
- TOKEN_END = 311,
- TOKEN_ESCAPE_STRINGS = 312,
- TOKEN_EXISTS = 313,
- TOKEN_EXTRACT = 314,
- TOKEN_FALSE = 315,
- TOKEN_FIRST = 316,
- TOKEN_FLOAT = 317,
- TOKEN_FOLLOWING = 318,
- TOKEN_FOR = 319,
- TOKEN_FOREIGN = 320,
- TOKEN_FROM = 321,
- TOKEN_FULL = 322,
- TOKEN_GROUP = 323,
- TOKEN_HASH = 324,
- TOKEN_HAVING = 325,
- TOKEN_HOUR = 326,
- TOKEN_IN = 327,
- TOKEN_INDEX = 328,
- TOKEN_INNER = 329,
- TOKEN_INSERT = 330,
- TOKEN_INTEGER = 331,
- TOKEN_INTERVAL = 332,
- TOKEN_INTO = 333,
- TOKEN_JOIN = 334,
- TOKEN_KEY = 335,
- TOKEN_LAST = 336,
- TOKEN_LEFT = 337,
- TOKEN_LIMIT = 338,
- TOKEN_LONG = 339,
- TOKEN_MINUTE = 340,
- TOKEN_MONTH = 341,
- TOKEN_NULL = 342,
- TOKEN_NULLS = 343,
- TOKEN_OFF = 344,
- TOKEN_ON = 345,
- TOKEN_ORDER = 346,
- TOKEN_OUTER = 347,
- TOKEN_OVER = 348,
- TOKEN_PARTITION = 349,
- TOKEN_PARTITIONS = 350,
- TOKEN_PERCENT = 351,
- TOKEN_PRECEDING = 352,
- TOKEN_PRIMARY = 353,
- TOKEN_PRIORITY = 354,
- TOKEN_QUIT = 355,
- TOKEN_RANGE = 356,
- TOKEN_REAL = 357,
- TOKEN_REFERENCES = 358,
- TOKEN_RIGHT = 359,
- TOKEN_ROW = 360,
- TOKEN_ROW_DELIMITER = 361,
- TOKEN_ROWS = 362,
- TOKEN_SECOND = 363,
- TOKEN_SELECT = 364,
- TOKEN_SET = 365,
- TOKEN_SMA = 366,
- TOKEN_SMALLINT = 367,
- TOKEN_SUBSTRING = 368,
- TOKEN_TABLE = 369,
- TOKEN_THEN = 370,
- TOKEN_TIME = 371,
- TOKEN_TIMESTAMP = 372,
- TOKEN_TRUE = 373,
- TOKEN_TUPLESAMPLE = 374,
- TOKEN_UNBOUNDED = 375,
- TOKEN_UNIQUE = 376,
- TOKEN_UPDATE = 377,
- TOKEN_USING = 378,
- TOKEN_VALUES = 379,
- TOKEN_VARCHAR = 380,
- TOKEN_WHEN = 381,
- TOKEN_WHERE = 382,
- TOKEN_WINDOW = 383,
- TOKEN_WITH = 384,
- TOKEN_YEAR = 385,
- TOKEN_YEARMONTH = 386,
- TOKEN_EOF = 387,
- TOKEN_LEX_ERROR = 388
- };
+ enum yytokentype
+ {
+ TOKEN_COMMAND = 258,
+ TOKEN_NAME = 259,
+ TOKEN_STRING_SINGLE_QUOTED = 260,
+ TOKEN_STRING_DOUBLE_QUOTED = 261,
+ TOKEN_UNSIGNED_NUMVAL = 262,
+ TOKEN_OR = 263,
+ TOKEN_AND = 264,
+ TOKEN_NOT = 265,
+ TOKEN_EQ = 266,
+ TOKEN_LT = 267,
+ TOKEN_LEQ = 268,
+ TOKEN_GT = 269,
+ TOKEN_GEQ = 270,
+ TOKEN_NEQ = 271,
+ TOKEN_LIKE = 272,
+ TOKEN_REGEXP = 273,
+ TOKEN_BETWEEN = 274,
+ TOKEN_IS = 275,
+ UNARY_PLUS = 276,
+ UNARY_MINUS = 277,
+ TOKEN_ADD = 278,
+ TOKEN_ALL = 279,
+ TOKEN_ALTER = 280,
+ TOKEN_AS = 281,
+ TOKEN_ASC = 282,
+ TOKEN_BIGINT = 283,
+ TOKEN_BIT = 284,
+ TOKEN_BITWEAVING = 285,
+ TOKEN_BLOCKPROPERTIES = 286,
+ TOKEN_BLOCKSAMPLE = 287,
+ TOKEN_BLOOM_FILTER = 288,
+ TOKEN_CSB_TREE = 289,
+ TOKEN_BY = 290,
+ TOKEN_CASE = 291,
+ TOKEN_CHARACTER = 292,
+ TOKEN_CHECK = 293,
+ TOKEN_COLUMN = 294,
+ TOKEN_CONSTRAINT = 295,
+ TOKEN_COPY = 296,
+ TOKEN_CREATE = 297,
+ TOKEN_CURRENT = 298,
+ TOKEN_DATE = 299,
+ TOKEN_DATETIME = 300,
+ TOKEN_DAY = 301,
+ TOKEN_DECIMAL = 302,
+ TOKEN_DEFAULT = 303,
+ TOKEN_DELETE = 304,
+ TOKEN_DELIMITER = 305,
+ TOKEN_DESC = 306,
+ TOKEN_DISTINCT = 307,
+ TOKEN_DOUBLE = 308,
+ TOKEN_DROP = 309,
+ TOKEN_ELSE = 310,
+ TOKEN_END = 311,
+ TOKEN_ESCAPE_STRINGS = 312,
+ TOKEN_EXISTS = 313,
+ TOKEN_EXTRACT = 314,
+ TOKEN_FALSE = 315,
+ TOKEN_FIRST = 316,
+ TOKEN_FLOAT = 317,
+ TOKEN_FOLLOWING = 318,
+ TOKEN_FOR = 319,
+ TOKEN_FOREIGN = 320,
+ TOKEN_FROM = 321,
+ TOKEN_FULL = 322,
+ TOKEN_GROUP = 323,
+ TOKEN_HASH = 324,
+ TOKEN_HAVING = 325,
+ TOKEN_HOUR = 326,
+ TOKEN_IN = 327,
+ TOKEN_INDEX = 328,
+ TOKEN_INNER = 329,
+ TOKEN_INSERT = 330,
+ TOKEN_INTEGER = 331,
+ TOKEN_INTERVAL = 332,
+ TOKEN_INTO = 333,
+ TOKEN_JOIN = 334,
+ TOKEN_KEY = 335,
+ TOKEN_LAST = 336,
+ TOKEN_LEFT = 337,
+ TOKEN_LIMIT = 338,
+ TOKEN_LONG = 339,
+ TOKEN_MINUTE = 340,
+ TOKEN_MONTH = 341,
+ TOKEN_NULL = 342,
+ TOKEN_NULLS = 343,
+ TOKEN_OFF = 344,
+ TOKEN_ON = 345,
+ TOKEN_ORDER = 346,
+ TOKEN_OUTER = 347,
+ TOKEN_OVER = 348,
+ TOKEN_PARTITION = 349,
+ TOKEN_PARTITIONS = 350,
+ TOKEN_PERCENT = 351,
+ TOKEN_PRECEDING = 352,
+ TOKEN_PRIMARY = 353,
+ TOKEN_PRIORITY = 354,
+ TOKEN_QUIT = 355,
+ TOKEN_RANGE = 356,
+ TOKEN_REAL = 357,
+ TOKEN_REFERENCES = 358,
+ TOKEN_RIGHT = 359,
+ TOKEN_ROW = 360,
+ TOKEN_ROW_DELIMITER = 361,
+ TOKEN_ROWS = 362,
+ TOKEN_SECOND = 363,
+ TOKEN_SELECT = 364,
+ TOKEN_SET = 365,
+ TOKEN_SMA = 366,
+ TOKEN_SMALLINT = 367,
+ TOKEN_SUBSTRING = 368,
+ TOKEN_TABLE = 369,
+ TOKEN_THEN = 370,
+ TOKEN_TIME = 371,
+ TOKEN_TIMESTAMP = 372,
+ TOKEN_TRUE = 373,
+ TOKEN_TUPLESAMPLE = 374,
+ TOKEN_UNBOUNDED = 375,
+ TOKEN_UNIQUE = 376,
+ TOKEN_UPDATE = 377,
+ TOKEN_USING = 378,
+ TOKEN_VALUES = 379,
+ TOKEN_VARCHAR = 380,
+ TOKEN_WHEN = 381,
+ TOKEN_WHERE = 382,
+ TOKEN_WINDOW = 383,
+ TOKEN_WITH = 384,
+ TOKEN_YEAR = 385,
+ TOKEN_YEARMONTH = 386,
+ TOKEN_EOF = 387,
+ TOKEN_LEX_ERROR = 388
+ };
#endif
-
+/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
+typedef union YYSTYPE YYSTYPE;
+union YYSTYPE
{
-/* Line 2058 of yacc.c */
-#line 120 "../SqlParser.ypp"
+#line 120 "../SqlParser.ypp" /* yacc.c:1909 */
quickstep::ParseString *string_value_;
@@ -285,41 +284,28 @@ typedef union YYSTYPE
quickstep::ParsePriority *opt_priority_clause_;
-
-/* Line 2058 of yacc.c */
-#line 291 "SqlParser_gen.hpp"
-} YYSTYPE;
+#line 288 "SqlParser_gen.hpp" /* yacc.c:1909 */
+};
# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
+/* Location type. */
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
-typedef struct YYLTYPE
+typedef struct YYLTYPE YYLTYPE;
+struct YYLTYPE
{
int first_line;
int first_column;
int last_line;
int last_column;
-} YYLTYPE;
-# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
+};
# define YYLTYPE_IS_DECLARED 1
# define YYLTYPE_IS_TRIVIAL 1
#endif
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int quickstep_yyparse (void *YYPARSE_PARAM);
-#else
-int quickstep_yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
+
int quickstep_yyparse (yyscan_t yyscanner, quickstep::ParseStatement **parsedStatement);
-#else
-int quickstep_yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
#endif /* !YY_QUICKSTEP_YY_SQLPARSER_GEN_HPP_INCLUDED */
[4/5] incubator-quickstep git commit: Checking in preprocessed files
for datetime change.
Posted by hb...@apache.org.
Checking in preprocessed files for datetime change.
Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/0820e3d9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/0820e3d9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/0820e3d9
Branch: refs/heads/fix-fasthash-destructor
Commit: 0820e3d92001b4f15caff0a5291beb134bd16a6c
Parents: 6b377d5
Author: Harshad Deshmukh <hb...@apache.org>
Authored: Sun Oct 2 07:59:55 2016 -0500
Committer: Harshad Deshmukh <hb...@apache.org>
Committed: Sun Oct 2 07:59:55 2016 -0500
----------------------------------------------------------------------
parser/preprocessed/SqlParser_gen.cpp | 4602 +++++++++++++---------------
parser/preprocessed/SqlParser_gen.hpp | 322 +-
2 files changed, 2261 insertions(+), 2663 deletions(-)
----------------------------------------------------------------------