diff --git a/src/lib/Expr.h b/src/lib/Expr.h index b66dac3..3a3f0e5 100644 --- a/src/lib/Expr.h +++ b/src/lib/Expr.h @@ -28,11 +28,13 @@ typedef struct Expr Expr; /** * @class Expr * @brief Represents SQL expressions (i.e. literals, operators, column_refs) + * + * TODO: When destructing a placeholder expression, we might need to alter the placeholder_list */ struct Expr { /** * Operator types. These are important for expressions of type kExprOperator - * Trivial types are those that can be descriped by a sigle character e.g: + * Trivial types are those that can be described by a single character e.g: * + - * / < > = % * Non-trivial are: * <> <= >= LIKE ISNULL NOT @@ -64,8 +66,8 @@ struct Expr { alias(NULL) {}; // Interesting side-effect: - // Making the destructor virtual causes segmentation faults - ~Expr(); + // Making the destructor virtual used to cause segmentation faults + Expr(); ExprType type; diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 531f082..3ed1f7b 100644 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -498,7 +498,6 @@ opt_where: | /* empty */ { $$ = NULL; } ; -// TODO: having opt_group: GROUP BY expr_list opt_having { $$ = new GroupByDescription(); @@ -626,7 +625,7 @@ star_expr: '*' { $$ = new Expr(kExprStar); } ; -/* TODO: keep list of placeholders */ + placeholder_expr: '?' { $$ = Expr::makePlaceholder(yylloc.total_column);