Skip to content

Commit

Permalink
remove bigint because we dont support it (#2031)
Browse files Browse the repository at this point in the history
Co-authored-by: dutor <440396+dutor@users.noreply.github.com>
  • Loading branch information
knightXun and dutor authored Apr 2, 2020
1 parent eea7407 commit 3423df1
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 14 deletions.
1 change: 0 additions & 1 deletion .linters/cpp/checkKeyword.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
'KW_INDEXES',
'KW_REBUILD',
'KW_INT',
'KW_BIGINT',
'KW_DOUBLE',
'KW_STRING',
'KW_BOOL',
Expand Down
4 changes: 0 additions & 4 deletions src/common/filter/Expressions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -615,8 +615,6 @@ std::string columnTypeToString(ColumnType type) {
return "string";
case ColumnType::DOUBLE:
return "double";
case ColumnType::BIGINT:
return "bigint";
case ColumnType::BOOL:
return "bool";
case ColumnType::TIMESTAMP:
Expand Down Expand Up @@ -656,8 +654,6 @@ OptVariantType TypeCastingExpression::eval(Getters &getters) const {
return Expression::toDouble(result.value());
case ColumnType::BOOL:
return Expression::toBool(result.value());
case ColumnType::BIGINT:
return Status::Error("Type bigint not supported yet");
}
LOG(FATAL) << "casting to unknown type: " << static_cast<int>(type_);
}
Expand Down
2 changes: 1 addition & 1 deletion src/common/filter/Expressions.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Cord;
using OptVariantType = StatusOr<VariantType>;

enum class ColumnType {
INT, STRING, DOUBLE, BIGINT, BOOL, TIMESTAMP,
INT, STRING, DOUBLE, BOOL, TIMESTAMP,
};

std::string columnTypeToString(ColumnType type);
Expand Down
3 changes: 1 addition & 2 deletions src/parser/parser.yy
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ static constexpr size_t MAX_ABS_INTEGER = 9223372036854775808ULL;
%token KW_GO KW_AS KW_TO KW_OR KW_AND KW_XOR KW_USE KW_SET KW_FROM KW_WHERE KW_ALTER
%token KW_MATCH KW_INSERT KW_VALUES KW_YIELD KW_RETURN KW_CREATE KW_VERTEX KW_OFFLINE
%token KW_EDGE KW_EDGES KW_STEPS KW_OVER KW_UPTO KW_REVERSELY KW_SPACE KW_DELETE KW_FIND KW_REBUILD
%token KW_INT KW_BIGINT KW_DOUBLE KW_STRING KW_BOOL KW_TAG KW_TAGS KW_UNION KW_INTERSECT KW_MINUS
%token KW_INT KW_DOUBLE KW_STRING KW_BOOL KW_TAG KW_TAGS KW_UNION KW_INTERSECT KW_MINUS
%token KW_NO KW_OVERWRITE KW_IN KW_DESCRIBE KW_DESC KW_SHOW KW_HOSTS KW_PART KW_PARTS KW_TIMESTAMP KW_ADD
%token KW_PARTITION_NUM KW_REPLICA_FACTOR KW_CHARSET KW_COLLATE KW_COLLATION
%token KW_DROP KW_REMOVE KW_SPACES KW_INGEST KW_INDEX KW_INDEXES
Expand Down Expand Up @@ -484,7 +484,6 @@ type_spec
| KW_DOUBLE { $$ = ColumnType::DOUBLE; }
| KW_STRING { $$ = ColumnType::STRING; }
| KW_BOOL { $$ = ColumnType::BOOL; }
| KW_BIGINT { $$ = ColumnType::BIGINT; }
| KW_TIMESTAMP { $$ = ColumnType::TIMESTAMP; }
;

Expand Down
2 changes: 0 additions & 2 deletions src/parser/scanner.lex
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ INDEXES ([Ii][Nn][Dd][Ee][Xx][Ee][Ss])
REBUILD ([Rr][Ee][Bb][Uu][Ii][Ll][Dd])
STATUS ([Ss][Tt][Aa][Tt][Uu][Ss])
INT ([Ii][Nn][Tt])
BIGINT ([Bb][Ii][Gg][Ii][Nn][Tt])
DOUBLE ([Dd][Oo][Uu][Bb][Ll][Ee])
STRING ([Ss][Tt][Rr][Ii][Nn][Gg])
BOOL ([Bb][Oo][Oo][Ll])
Expand Down Expand Up @@ -204,7 +203,6 @@ RECOVER ([Rr][Ee][Cc][Oo][Vv][Ee][Rr])
{INDEXES} { return TokenType::KW_INDEXES; }
{REBUILD} { return TokenType::KW_REBUILD; }
{INT} { return TokenType::KW_INT; }
{BIGINT} { return TokenType::KW_BIGINT; }
{DOUBLE} { return TokenType::KW_DOUBLE; }
{STRING} { return TokenType::KW_STRING; }
{BOOL} { return TokenType::KW_BOOL; }
Expand Down
3 changes: 0 additions & 3 deletions src/parser/test/ScannerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,6 @@ TEST(Scanner, Basic) {
CHECK_SEMANTIC_TYPE("PARTS", TokenType::KW_PARTS),
CHECK_SEMANTIC_TYPE("Parts", TokenType::KW_PARTS),
CHECK_SEMANTIC_TYPE("parts", TokenType::KW_PARTS),
CHECK_SEMANTIC_TYPE("BIGINT", TokenType::KW_BIGINT),
CHECK_SEMANTIC_TYPE("Bigint", TokenType::KW_BIGINT),
CHECK_SEMANTIC_TYPE("bigint", TokenType::KW_BIGINT),
CHECK_SEMANTIC_TYPE("DOUBLE", TokenType::KW_DOUBLE),
CHECK_SEMANTIC_TYPE("double", TokenType::KW_DOUBLE),
CHECK_SEMANTIC_TYPE("STRING", TokenType::KW_STRING),
Expand Down
1 change: 0 additions & 1 deletion src/parser/test/fuzzing/nebula.dict
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ keyword_REVERSELY="REVERSELY"
keyword_SPACE="SPACE"
keyword_SPACES="SPACES"
keyword_INT="INT"
keyword_BIGINT="BIGINT"
keyword_DOUBLE="DOUBLE"
keyword_STRING="STRING"
keyword_BOOL="BOOL"
Expand Down

0 comments on commit 3423df1

Please sign in to comment.