未验证 提交 1a2cf476 编写于 作者: 羽飞's avatar 羽飞 提交者: GitHub

修复clang 14 compile error (#193)

### What problem were solved in this pull request?

Issue Number: close #192 

Problem:
clang 14编译失败

### What is changed and how it works?
修复编译错误

### Other information
上级 6d9a299a
......@@ -21,7 +21,7 @@ See the Mulan PSL v2 for more details. */
using namespace std;
InsertPhysicalOperator::InsertPhysicalOperator(Table *table, vector<Value> &&values)
: table_(table), values_(move(values))
: table_(table), values_(std::move(values))
{}
RC InsertPhysicalOperator::open(Trx *trx)
......
......@@ -75,7 +75,7 @@ string TableScanPhysicalOperator::param() const
void TableScanPhysicalOperator::set_predicates(vector<unique_ptr<Expression>> &&exprs)
{
predicates_ = move(exprs);
predicates_ = std::move(exprs);
}
RC TableScanPhysicalOperator::filter(RowTuple &tuple, bool &result)
......
......@@ -262,10 +262,10 @@ RC OptimizeStage::create_select_logical_plan(
unique_ptr<LogicalOperator> project_oper(new ProjectLogicalOperator(all_fields));
if (predicate_oper) {
predicate_oper->add_child(move(table_oper));
project_oper->add_child(move(predicate_oper));
predicate_oper->add_child(std::move(table_oper));
project_oper->add_child(std::move(predicate_oper));
} else {
project_oper->add_child(move(table_oper));
project_oper->add_child(std::move(table_oper));
}
logical_operator.swap(project_oper);
......@@ -296,10 +296,10 @@ RC OptimizeStage::create_predicate_logical_plan(
unique_ptr<PredicateLogicalOperator> predicate_oper;
if (!cmp_exprs.empty()) {
unique_ptr<ConjunctionExpr> conjunction_expr(new ConjunctionExpr(ConjunctionExpr::Type::AND, cmp_exprs));
predicate_oper = unique_ptr<PredicateLogicalOperator>(new PredicateLogicalOperator(move(conjunction_expr)));
predicate_oper = unique_ptr<PredicateLogicalOperator>(new PredicateLogicalOperator(std::move(conjunction_expr)));
}
logical_operator = move(predicate_oper);
logical_operator = std::move(predicate_oper);
return RC::SUCCESS;
}
......@@ -335,13 +335,13 @@ RC OptimizeStage::create_delete_logical_plan(
unique_ptr<LogicalOperator> delete_oper(new DeleteLogicalOperator(table));
if (predicate_oper) {
predicate_oper->add_child(move(table_get_oper));
delete_oper->add_child(move(predicate_oper));
predicate_oper->add_child(std::move(table_get_oper));
delete_oper->add_child(std::move(predicate_oper));
} else {
delete_oper->add_child(move(table_get_oper));
delete_oper->add_child(std::move(table_get_oper));
}
logical_operator = move(delete_oper);
logical_operator = std::move(delete_oper);
return rc;
}
......
......@@ -12,6 +12,8 @@ See the Mulan PSL v2 for more details. */
// Created by Wangyunlai on 2022/12/14.
//
#include <utility>
#include "sql/optimizer/physical_plan_generator.h"
#include "sql/operator/table_get_logical_operator.h"
#include "sql/operator/table_scan_physical_operator.h"
......@@ -128,12 +130,12 @@ RC PhysicalPlanGenerator::create_plan(TableGetLogicalOperator &table_get_oper, u
&tuple_cell, true /*left_inclusive*/,
&tuple_cell, true /*right_inclusive*/);
index_scan_oper->set_predicates(move(predicates));
index_scan_oper->set_predicates(std::move(predicates));
oper = unique_ptr<PhysicalOperator>(index_scan_oper);
LOG_TRACE("use index scan");
} else {
auto table_scan_oper = new TableScanPhysicalOperator(table, table_get_oper.readonly());
table_scan_oper->set_predicates(move(predicates));
table_scan_oper->set_predicates(std::move(predicates));
oper = unique_ptr<PhysicalOperator>(table_scan_oper);
LOG_TRACE("use table scan");
}
......@@ -158,9 +160,9 @@ RC PhysicalPlanGenerator::create_plan(PredicateLogicalOperator &pred_oper, uniqu
vector<unique_ptr<Expression>> &expressions = pred_oper.expressions();
ASSERT(expressions.size() == 1, "predicate logical operator's children should be 1");
unique_ptr<Expression> expression = move(expressions.front());
oper = unique_ptr<PhysicalOperator>(new PredicatePhysicalOperator(move(expression)));
oper->add_child(move(child_phy_oper));
unique_ptr<Expression> expression = std::move(expressions.front());
oper = unique_ptr<PhysicalOperator>(new PredicatePhysicalOperator(std::move(expression)));
oper->add_child(std::move(child_phy_oper));
return rc;
}
......@@ -187,7 +189,7 @@ RC PhysicalPlanGenerator::create_plan(ProjectLogicalOperator &project_oper, uniq
}
if (child_phy_oper) {
project_operator->add_child(move(child_phy_oper));
project_operator->add_child(std::move(child_phy_oper));
}
oper = unique_ptr<PhysicalOperator>(project_operator);
......@@ -200,7 +202,7 @@ RC PhysicalPlanGenerator::create_plan(InsertLogicalOperator &insert_oper, unique
{
Table *table = insert_oper.table();
vector<Value> &values = insert_oper.values();
InsertPhysicalOperator *insert_phy_oper = new InsertPhysicalOperator(table, move(values));
InsertPhysicalOperator *insert_phy_oper = new InsertPhysicalOperator(table, std::move(values));
oper.reset(insert_phy_oper);
return RC::SUCCESS;
}
......@@ -224,7 +226,7 @@ RC PhysicalPlanGenerator::create_plan(DeleteLogicalOperator &delete_oper, unique
oper = unique_ptr<PhysicalOperator>(new DeletePhysicalOperator(delete_oper.table()));
if (child_physical_oper) {
oper->add_child(move(child_physical_oper));
oper->add_child(std::move(child_physical_oper));
}
return rc;
}
......@@ -243,10 +245,10 @@ RC PhysicalPlanGenerator::create_plan(ExplainLogicalOperator &explain_oper, uniq
return rc;
}
explain_physical_oper->add_child(move(child_physical_oper));
explain_physical_oper->add_child(std::move(child_physical_oper));
}
oper = move(explain_physical_oper);
oper = std::move(explain_physical_oper);
return rc;
}
......@@ -269,9 +271,9 @@ RC PhysicalPlanGenerator::create_plan(JoinLogicalOperator &join_oper, unique_ptr
return rc;
}
join_physical_oper->add_child(move(child_physical_oper));
join_physical_oper->add_child(std::move(child_physical_oper));
}
oper = move(join_physical_oper);
oper = std::move(join_physical_oper);
return rc;
}
......@@ -47,6 +47,7 @@ typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
typedef uint64_t flex_uint64_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
......@@ -170,6 +171,11 @@ typedef void* yyscan_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
......@@ -192,11 +198,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
......@@ -214,7 +215,7 @@ struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
int yy_n_chars;
yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
......@@ -293,7 +294,7 @@ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
void *yyalloc (yy_size_t ,yyscan_t yyscanner );
void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
......@@ -344,7 +345,7 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
*/
#define YY_DO_BEFORE_ACTION \
yyg->yytext_ptr = yy_bp; \
yyleng = (size_t) (yy_cp - yy_bp); \
yyleng = (yy_size_t) (yy_cp - yy_bp); \
yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
......@@ -625,7 +626,7 @@ extern double atof();
/* 1. 匹配的规则长的优先 */
/* 2. 写在最前面的优先 */
/* yylval 就可以认为是 yacc 中 %union 定义的结构体(union 结构) */
#line 629 "lex_sql.cpp"
#line 630 "lex_sql.cpp"
#define INITIAL 0
#define STR 1
......@@ -655,8 +656,8 @@ struct yyguts_t
size_t yy_buffer_stack_max; /**< capacity of stack. */
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
char yy_hold_char;
int yy_n_chars;
int yyleng_r;
yy_size_t yy_n_chars;
yy_size_t yyleng_r;
char *yy_c_buf_p;
int yy_init;
int yy_start;
......@@ -713,7 +714,7 @@ FILE *yyget_out (yyscan_t yyscanner );
void yyset_out (FILE * out_str ,yyscan_t yyscanner );
int yyget_leng (yyscan_t yyscanner );
yy_size_t yyget_leng (yyscan_t yyscanner );
char *yyget_text (yyscan_t yyscanner );
......@@ -769,7 +770,7 @@ static int input (yyscan_t yyscanner );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#define ECHO fwrite( yytext, yyleng, 1, yyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
......@@ -780,7 +781,7 @@ static int input (yyscan_t yyscanner );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
unsigned n; \
yy_size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
......@@ -868,7 +869,7 @@ YY_DECL
#line 55 "lex_sql.l"
#line 872 "lex_sql.cpp"
#line 873 "lex_sql.cpp"
yylval = yylval_param;
......@@ -1223,7 +1224,7 @@ YY_RULE_SETUP
#line 113 "lex_sql.l"
ECHO;
YY_BREAK
#line 1227 "lex_sql.cpp"
#line 1228 "lex_sql.cpp"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(STR):
yyterminate();
......@@ -1411,7 +1412,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
int num_to_read =
yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
......@@ -1425,7 +1426,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( b->yy_is_our_buffer )
{
int new_size = b->yy_buf_size * 2;
yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
......@@ -1456,7 +1457,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
yyg->yy_n_chars, (size_t) num_to_read );
yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
......@@ -1581,7 +1582,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{ /* need more input */
int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
......@@ -1605,7 +1606,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
case EOB_ACT_END_OF_FILE:
{
if ( yywrap(yyscanner ) )
return EOF;
return 0;
if ( ! yyg->yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
......@@ -1865,7 +1866,7 @@ void yypop_buffer_state (yyscan_t yyscanner)
*/
static void yyensure_buffer_stack (yyscan_t yyscanner)
{
int num_to_alloc;
yy_size_t num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
......@@ -1963,12 +1964,11 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
yy_size_t n, i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
......@@ -2078,7 +2078,7 @@ FILE *yyget_out (yyscan_t yyscanner)
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
int yyget_leng (yyscan_t yyscanner)
yy_size_t yyget_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
......
......@@ -51,6 +51,7 @@ typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
typedef uint64_t flex_uint64_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
......@@ -161,7 +162,7 @@ struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
int yy_n_chars;
yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
......@@ -205,7 +206,7 @@ void yypop_buffer_state (yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
void *yyalloc (yy_size_t ,yyscan_t yyscanner );
void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
......@@ -261,7 +262,7 @@ FILE *yyget_out (yyscan_t yyscanner );
void yyset_out (FILE * out_str ,yyscan_t yyscanner );
int yyget_leng (yyscan_t yyscanner );
yy_size_t yyget_leng (yyscan_t yyscanner );
char *yyget_text (yyscan_t yyscanner );
......@@ -341,6 +342,6 @@ extern int yylex \
#line 113 "lex_sql.l"
#line 345 "lex_sql.h"
#line 346 "lex_sql.h"
#undef yyIN_HEADER
#endif /* yyHEADER_H */
......@@ -586,12 +586,12 @@ static const yytype_int16 yyrline[] =
{
0, 142, 142, 150, 151, 152, 153, 154, 155, 156,
157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
167, 171, 176, 181, 187, 193, 199, 205, 212, 218,
226, 240, 250, 269, 272, 285, 293, 303, 306, 307,
308, 311, 327, 330, 341, 346, 351, 361, 373, 388,
411, 418, 430, 435, 446, 449, 463, 466, 479, 482,
488, 491, 496, 503, 515, 527, 539, 554, 555, 556,
557, 558, 559, 563, 573, 580, 581
167, 171, 177, 182, 188, 194, 200, 206, 213, 219,
227, 241, 251, 270, 273, 286, 294, 304, 307, 308,
309, 312, 328, 331, 342, 347, 352, 362, 374, 389,
412, 419, 431, 436, 447, 450, 464, 467, 480, 483,
489, 492, 497, 504, 516, 528, 540, 555, 556, 557,
558, 559, 560, 564, 574, 581, 582
};
#endif
......@@ -1648,81 +1648,82 @@ yyreduce:
case 21: /* exit: EXIT */
#line 171 "yacc_sql.y"
{
(void)yynerrs;
(yyval.command) = new Command(SCF_EXIT);
}
#line 1654 "yacc_sql.cpp"
#line 1655 "yacc_sql.cpp"
break;
case 22: /* help: HELP */
#line 176 "yacc_sql.y"
#line 177 "yacc_sql.y"
{
(yyval.command) = new Command(SCF_HELP);
}
#line 1662 "yacc_sql.cpp"
#line 1663 "yacc_sql.cpp"
break;
case 23: /* sync: SYNC */
#line 181 "yacc_sql.y"
#line 182 "yacc_sql.y"
{
(yyval.command) = new Command(SCF_SYNC);
}
#line 1670 "yacc_sql.cpp"
#line 1671 "yacc_sql.cpp"
break;
case 24: /* begin: TRX_BEGIN */
#line 187 "yacc_sql.y"
#line 188 "yacc_sql.y"
{
(yyval.command) = new Command(SCF_BEGIN);
}
#line 1678 "yacc_sql.cpp"
#line 1679 "yacc_sql.cpp"
break;
case 25: /* commit: TRX_COMMIT */
#line 193 "yacc_sql.y"
#line 194 "yacc_sql.y"
{
(yyval.command) = new Command(SCF_COMMIT);
}
#line 1686 "yacc_sql.cpp"
#line 1687 "yacc_sql.cpp"
break;
case 26: /* rollback: TRX_ROLLBACK */
#line 199 "yacc_sql.y"
#line 200 "yacc_sql.y"
{
(yyval.command) = new Command(SCF_ROLLBACK);
}
#line 1694 "yacc_sql.cpp"
#line 1695 "yacc_sql.cpp"
break;
case 27: /* drop_table: DROP TABLE ID */
#line 205 "yacc_sql.y"
#line 206 "yacc_sql.y"
{
(yyval.command) = new Command(SCF_DROP_TABLE);
(yyval.command)->drop_table.relation_name = (yyvsp[0].string);
free((yyvsp[0].string));
}
#line 1704 "yacc_sql.cpp"
#line 1705 "yacc_sql.cpp"
break;
case 28: /* show_tables: SHOW TABLES */
#line 212 "yacc_sql.y"
#line 213 "yacc_sql.y"
{
(yyval.command) = new Command(SCF_SHOW_TABLES);
}
#line 1712 "yacc_sql.cpp"
#line 1713 "yacc_sql.cpp"
break;
case 29: /* desc_table: DESC ID */
#line 218 "yacc_sql.y"
#line 219 "yacc_sql.y"
{
(yyval.command) = new Command(SCF_DESC_TABLE);
(yyval.command)->desc_table.relation_name = (yyvsp[0].string);
free((yyvsp[0].string));
}
#line 1722 "yacc_sql.cpp"
#line 1723 "yacc_sql.cpp"
break;
case 30: /* create_index: CREATE INDEX ID ON ID LBRACE ID RBRACE */
#line 227 "yacc_sql.y"
#line 228 "yacc_sql.y"
{
(yyval.command) = new Command(SCF_CREATE_INDEX);
CreateIndex &create_index = (yyval.command)->create_index;
......@@ -1733,11 +1734,11 @@ yyreduce:
free((yyvsp[-3].string));
free((yyvsp[-1].string));
}
#line 1737 "yacc_sql.cpp"
#line 1738 "yacc_sql.cpp"
break;
case 31: /* drop_index: DROP INDEX ID ON ID */
#line 241 "yacc_sql.y"
#line 242 "yacc_sql.y"
{
(yyval.command) = new Command(SCF_DROP_INDEX);
(yyval.command)->drop_index.index_name = (yyvsp[-2].string);
......@@ -1745,11 +1746,11 @@ yyreduce:
free((yyvsp[-2].string));
free((yyvsp[0].string));
}
#line 1749 "yacc_sql.cpp"
#line 1750 "yacc_sql.cpp"
break;
case 32: /* create_table: CREATE TABLE ID LBRACE attr_def attr_def_list RBRACE */
#line 251 "yacc_sql.y"
#line 252 "yacc_sql.y"
{
(yyval.command) = new Command(SCF_CREATE_TABLE);
CreateTable &create_table = (yyval.command)->create_table;
......@@ -1765,19 +1766,19 @@ yyreduce:
std::reverse(create_table.attr_infos.begin(), create_table.attr_infos.end());
delete (yyvsp[-2].attr_info);
}
#line 1769 "yacc_sql.cpp"
#line 1770 "yacc_sql.cpp"
break;
case 33: /* attr_def_list: %empty */
#line 269 "yacc_sql.y"
#line 270 "yacc_sql.y"
{
(yyval.attr_infos) = nullptr;
}
#line 1777 "yacc_sql.cpp"
#line 1778 "yacc_sql.cpp"
break;
case 34: /* attr_def_list: COMMA attr_def attr_def_list */
#line 273 "yacc_sql.y"
#line 274 "yacc_sql.y"
{
if ((yyvsp[0].attr_infos) != nullptr) {
(yyval.attr_infos) = (yyvsp[0].attr_infos);
......@@ -1787,11 +1788,11 @@ yyreduce:
(yyval.attr_infos)->emplace_back(*(yyvsp[-1].attr_info));
delete (yyvsp[-1].attr_info);
}
#line 1791 "yacc_sql.cpp"
#line 1792 "yacc_sql.cpp"
break;
case 35: /* attr_def: ID type LBRACE number RBRACE */
#line 286 "yacc_sql.y"
#line 287 "yacc_sql.y"
{
(yyval.attr_info) = new AttrInfo;
(yyval.attr_info)->type = (AttrType)(yyvsp[-3].number);
......@@ -1799,11 +1800,11 @@ yyreduce:
(yyval.attr_info)->length = (yyvsp[-1].number);
free((yyvsp[-4].string));
}
#line 1803 "yacc_sql.cpp"
#line 1804 "yacc_sql.cpp"
break;
case 36: /* attr_def: ID type */
#line 294 "yacc_sql.y"
#line 295 "yacc_sql.y"
{
(yyval.attr_info) = new AttrInfo;
(yyval.attr_info)->type = (AttrType)(yyvsp[0].number);
......@@ -1811,35 +1812,35 @@ yyreduce:
(yyval.attr_info)->length = 4;
free((yyvsp[-1].string));
}
#line 1815 "yacc_sql.cpp"
#line 1816 "yacc_sql.cpp"
break;
case 37: /* number: NUMBER */
#line 303 "yacc_sql.y"
#line 304 "yacc_sql.y"
{(yyval.number) = (yyvsp[0].number);}
#line 1821 "yacc_sql.cpp"
#line 1822 "yacc_sql.cpp"
break;
case 38: /* type: INT_T */
#line 306 "yacc_sql.y"
#line 307 "yacc_sql.y"
{ (yyval.number)=INTS; }
#line 1827 "yacc_sql.cpp"
#line 1828 "yacc_sql.cpp"
break;
case 39: /* type: STRING_T */
#line 307 "yacc_sql.y"
#line 308 "yacc_sql.y"
{ (yyval.number)=CHARS; }
#line 1833 "yacc_sql.cpp"
#line 1834 "yacc_sql.cpp"
break;
case 40: /* type: FLOAT_T */
#line 308 "yacc_sql.y"
#line 309 "yacc_sql.y"
{ (yyval.number)=FLOATS; }
#line 1839 "yacc_sql.cpp"
#line 1840 "yacc_sql.cpp"
break;
case 41: /* insert: INSERT INTO ID VALUES LBRACE value value_list RBRACE */
#line 312 "yacc_sql.y"
#line 313 "yacc_sql.y"
{
(yyval.command) = new Command(SCF_INSERT);
(yyval.command)->insertion.relation_name = (yyvsp[-5].string);
......@@ -1851,19 +1852,19 @@ yyreduce:
delete (yyvsp[-2].value);
free((yyvsp[-5].string));
}
#line 1855 "yacc_sql.cpp"
#line 1856 "yacc_sql.cpp"
break;
case 42: /* value_list: %empty */
#line 327 "yacc_sql.y"