-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
round the float/double when insert it to integer column
- Loading branch information
Showing
5 changed files
with
66 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Copyright (c) 2021 vesoft inc. All rights reserved. | ||
# | ||
# This source code is licensed under Apache 2.0 License. | ||
Feature: Round the float/double when insert them into integer column | ||
|
||
# issue https://github.com/vesoft-inc/nebula/issues/3473 | ||
Scenario: Insert float/double into a integer column | ||
Given an empty graph | ||
And create a space with following options: | ||
| partition_num | 9 | | ||
| replica_factor | 1 | | ||
| vid_type | FIXED_STRING(30) | | ||
| charset | utf8 | | ||
| collate | utf8_bin | | ||
When executing query: | ||
""" | ||
create tag test(a int32); | ||
""" | ||
Then the execution should be successful | ||
When try to execute query: | ||
""" | ||
INSERT VERTEX test(a) VALUES '101':(3.2); | ||
""" | ||
Then the execution should be successful | ||
When executing query: | ||
""" | ||
INSERT VERTEX test(a) VALUES '102':(3.8); | ||
""" | ||
Then the execution should be successful | ||
When executing query: | ||
""" | ||
INSERT VERTEX test(a) VALUES '103':(-3.2); | ||
""" | ||
Then the execution should be successful | ||
When executing query: | ||
""" | ||
INSERT VERTEX test(a) VALUES '104':(-3.8); | ||
""" | ||
Then the execution should be successful | ||
When executing query: | ||
""" | ||
INSERT VERTEX test(a) VALUES '104':(2147483647.1)); | ||
""" | ||
Then an ExecutionError should be raised at runtime:Storage Error: Out of range value. | ||
Then drop the used space |