diff --git a/src/context/test/CMakeLists.txt b/src/context/test/CMakeLists.txt index d0d172679070ef9e43592987cbd8cded1cc37a0a..3c73016437aee984545ad7b022a417ee9166857d 100644 --- a/src/context/test/CMakeLists.txt +++ b/src/context/test/CMakeLists.txt @@ -23,7 +23,6 @@ SET(CONTEXT_TEST_LIBS $<TARGET_OBJECTS:common_common_thrift_obj> $<TARGET_OBJECTS:common_graph_thrift_obj> $<TARGET_OBJECTS:common_storage_thrift_obj> - $<TARGET_OBJECTS:common_time_function_obj> $<TARGET_OBJECTS:common_http_client_obj> $<TARGET_OBJECTS:common_process_obj> $<TARGET_OBJECTS:common_time_utils_obj> diff --git a/src/daemons/CMakeLists.txt b/src/daemons/CMakeLists.txt index e4593708035a641ff6992801055ce6eb1edf8e8a..446729f52dd498429d3fca4efd5b65b4df4f8581 100644 --- a/src/daemons/CMakeLists.txt +++ b/src/daemons/CMakeLists.txt @@ -25,7 +25,6 @@ nebula_add_executable( $<TARGET_OBJECTS:optimizer_obj> $<TARGET_OBJECTS:graph_flags_obj> $<TARGET_OBJECTS:graph_auth_obj> - $<TARGET_OBJECTS:common_time_function_obj> $<TARGET_OBJECTS:common_expression_obj> $<TARGET_OBJECTS:common_http_client_obj> $<TARGET_OBJECTS:common_network_obj> diff --git a/src/executor/test/CMakeLists.txt b/src/executor/test/CMakeLists.txt index c873d755227320c257bc0cf2cdad01ab691b005c..d9c08fff54bddd227e9d19a3b9af5966ee9f2a62 100644 --- a/src/executor/test/CMakeLists.txt +++ b/src/executor/test/CMakeLists.txt @@ -14,7 +14,6 @@ SET(EXEC_QUERY_TEST_OBJS $<TARGET_OBJECTS:common_meta_client_obj> $<TARGET_OBJECTS:common_stats_obj> $<TARGET_OBJECTS:common_time_obj> - $<TARGET_OBJECTS:common_time_function_obj> $<TARGET_OBJECTS:common_meta_thrift_obj> $<TARGET_OBJECTS:common_common_thrift_obj> $<TARGET_OBJECTS:common_thrift_obj> diff --git a/src/optimizer/test/CMakeLists.txt b/src/optimizer/test/CMakeLists.txt index 64c6e743ac06ca284050312f7f8db22b805c345f..14fe395054389f267d8b8d54007f8e2e9d751fd1 100644 --- a/src/optimizer/test/CMakeLists.txt +++ b/src/optimizer/test/CMakeLists.txt @@ -11,7 +11,6 @@ set(OPTIMIZER_TEST_LIB $<TARGET_OBJECTS:common_expression_obj> $<TARGET_OBJECTS:common_function_manager_obj> $<TARGET_OBJECTS:common_time_obj> - $<TARGET_OBJECTS:common_time_function_obj> $<TARGET_OBJECTS:common_meta_thrift_obj> $<TARGET_OBJECTS:common_meta_client_obj> $<TARGET_OBJECTS:common_meta_obj> diff --git a/src/parser/test/CMakeLists.txt b/src/parser/test/CMakeLists.txt index 5c3776cfd8884268d3edb8579a949caa7c50339e..7d64edd4e4d6fc1a747e7936964d32b5287f621e 100644 --- a/src/parser/test/CMakeLists.txt +++ b/src/parser/test/CMakeLists.txt @@ -5,7 +5,6 @@ set(PARSER_TEST_LIBS $<TARGET_OBJECTS:parser_obj> - $<TARGET_OBJECTS:common_time_function_obj> $<TARGET_OBJECTS:common_expression_obj> $<TARGET_OBJECTS:common_encryption_obj> $<TARGET_OBJECTS:common_network_obj> diff --git a/src/planner/test/CMakeLists.txt b/src/planner/test/CMakeLists.txt index aeda6f7fe4444aed800305255b1eb84b38459c44..89f08e33948554b31554457049c72e89bc5156c6 100644 --- a/src/planner/test/CMakeLists.txt +++ b/src/planner/test/CMakeLists.txt @@ -8,7 +8,6 @@ nebula_add_test( SOURCES ExecutionPlanTest.cpp OBJECTS - $<TARGET_OBJECTS:common_time_function_obj> $<TARGET_OBJECTS:common_conf_obj> $<TARGET_OBJECTS:common_expression_obj> $<TARGET_OBJECTS:common_http_client_obj> diff --git a/src/util/SchemaUtil.cpp b/src/util/SchemaUtil.cpp index 40f59a7d2908f2fae9064f54079454873a9e675b..18a85c085d0faa7cbfda56b19f1927197c1fbc0c 100644 --- a/src/util/SchemaUtil.cpp +++ b/src/util/SchemaUtil.cpp @@ -5,7 +5,6 @@ */ #include "common/base/Base.h" -#include "common/function/TimeFunction.h" #include "util/SchemaUtil.h" #include "context/QueryExpressionContext.h" diff --git a/src/util/test/CMakeLists.txt b/src/util/test/CMakeLists.txt index ac1b024ca2dcd6f5d02cf9c6686506a11351de96..98ae172999e2b11fe3346c2d35af48c2a4a6587f 100644 --- a/src/util/test/CMakeLists.txt +++ b/src/util/test/CMakeLists.txt @@ -11,7 +11,6 @@ nebula_add_test( $<TARGET_OBJECTS:common_expression_obj> $<TARGET_OBJECTS:common_function_manager_obj> $<TARGET_OBJECTS:common_time_obj> - $<TARGET_OBJECTS:common_time_function_obj> $<TARGET_OBJECTS:common_meta_thrift_obj> $<TARGET_OBJECTS:common_meta_client_obj> $<TARGET_OBJECTS:common_meta_obj> diff --git a/src/validator/test/CMakeLists.txt b/src/validator/test/CMakeLists.txt index cb410652516bb3fa6a1c210622429064e7864cce..82b2fca2d0243f572557f056d7993ea11c1e13c3 100644 --- a/src/validator/test/CMakeLists.txt +++ b/src/validator/test/CMakeLists.txt @@ -20,7 +20,6 @@ set(VALIDATOR_TEST_LIBS $<TARGET_OBJECTS:idgenerator_obj> $<TARGET_OBJECTS:context_obj> $<TARGET_OBJECTS:graph_auth_obj> - $<TARGET_OBJECTS:common_time_function_obj> $<TARGET_OBJECTS:common_expression_obj> $<TARGET_OBJECTS:common_network_obj> $<TARGET_OBJECTS:common_fs_obj> diff --git a/src/visitor/test/CMakeLists.txt b/src/visitor/test/CMakeLists.txt index 7c8e71f6ef17026285968fadc7a8e0b6b222e203..583e5a4d2b1db848ab63f0aa59759c37eb4ce532 100644 --- a/src/visitor/test/CMakeLists.txt +++ b/src/visitor/test/CMakeLists.txt @@ -22,7 +22,6 @@ nebula_add_test( $<TARGET_OBJECTS:idgenerator_obj> $<TARGET_OBJECTS:context_obj> $<TARGET_OBJECTS:graph_auth_obj> - $<TARGET_OBJECTS:common_time_function_obj> $<TARGET_OBJECTS:common_expression_obj> $<TARGET_OBJECTS:common_network_obj> $<TARGET_OBJECTS:common_fs_obj> diff --git a/tests/maintain/test_index.py b/tests/maintain/test_index.py index 82defe4296c0aab4eaf0c303c802793aa44f6e75..b22698f9566d2b455b802949e014617aa73df8ba 100644 --- a/tests/maintain/test_index.py +++ b/tests/maintain/test_index.py @@ -32,22 +32,22 @@ class TestIndex(NebulaTestSuite): self.check_resp_succeeded(resp) time.sleep(self.delay) - resp = self.client.execute("INSERT VERTEX tag_1(col1, col2, col3, col4) VALUES '101':('Tom', 18, 35.4, '2010-09-01 08:00:00')") + resp = self.client.execute("INSERT VERTEX tag_1(col1, col2, col3, col4) VALUES '101':('Tom', 18, 35.4, `timestamp`('2010-09-01T08:00:00'))") self.check_resp_succeeded(resp) - resp = self.client.execute("INSERT VERTEX tag_1(col1, col2, col3, col4) VALUES '102':('Jerry', 22, 38.4, '2011-09-01 08:00:00')") + resp = self.client.execute("INSERT VERTEX tag_1(col1, col2, col3, col4) VALUES '102':('Jerry', 22, 38.4, `timestamp`('2011-09-01T08:00:00'))") self.check_resp_succeeded(resp) - resp = self.client.execute("INSERT VERTEX tag_1(col1, col2, col3, col4) VALUES '103':('Bob', 19, 36.4, '2010-09-01 12:00:00')") + resp = self.client.execute("INSERT VERTEX tag_1(col1, col2, col3, col4) VALUES '103':('Bob', 19, 36.4, `timestamp`('2010-09-01T12:00:00'))") self.check_resp_succeeded(resp) - resp = self.client.execute("INSERT EDGE edge_1(col1, col2, col3, col4) VALUES '101'->'102':('Red', 81, 45.3, '2010-09-01 08:00:00')") + resp = self.client.execute("INSERT EDGE edge_1(col1, col2, col3, col4) VALUES '101'->'102':('Red', 81, 45.3, `timestamp`('2010-09-01T08:00:00'))") self.check_resp_succeeded(resp) - resp = self.client.execute("INSERT EDGE edge_1(col1, col2, col3, col4) VALUES '102'->'103':('Yellow', 22, 423.8, '2011-09-01 08:00:00')") + resp = self.client.execute("INSERT EDGE edge_1(col1, col2, col3, col4) VALUES '102'->'103':('Yellow', 22, 423.8, `timestamp`('2011-09-01T08:00:00'))") self.check_resp_succeeded(resp) - resp = self.client.execute("INSERT EDGE edge_1(col1, col2, col3, col4) VALUES '103'->'101':('Blue', 91, 43.1, '2010-09-01 12:00:00')") + resp = self.client.execute("INSERT EDGE edge_1(col1, col2, col3, col4) VALUES '103'->'101':('Blue', 91, 43.1, `timestamp`('2010-09-01T12:00:00'))") self.check_resp_succeeded(resp) @classmethod diff --git a/tests/mutate/test_insert_1.py b/tests/mutate/test_insert_1.py index 0aa6cb05ed3444a68c55cdf85a599a37024e3caf..3852027650dbaf579d9da26f095ca439ae9be92e 100644 --- a/tests/mutate/test_insert_1.py +++ b/tests/mutate/test_insert_1.py @@ -33,7 +33,7 @@ class TestInsert1(NebulaTestSuite): 'BMI double DEFAULT 18.5, ' 'department string DEFAULT "engineering",' 'birthday timestamp DEFAULT ' - '"2020-01-10 10:00:00")') + '`timestamp`("2020-01-10T10:00:00"))') self.check_resp_succeeded(resp) resp = self.execute('CREATE TAG student(grade string, number int)') @@ -128,7 +128,7 @@ class TestInsert1(NebulaTestSuite): # insert vertex with timestamp succeeded, timestamp not supported, TODO resp = self.execute('INSERT VERTEX school(name, create_time) VALUES ' - '"sun_school":("sun_school", "2010-01-01 10:00:00")') + '"sun_school":("sun_school", `timestamp`("2010-01-01T10:00:00"))') self.check_resp_succeeded(resp) # insert vertex with timestamp succeeded uuid @@ -160,7 +160,7 @@ class TestInsert1(NebulaTestSuite): # insert edge with timestamp succeed resp = self.execute('INSERT EDGE study(start_time, end_time) ' 'VALUES "Laura"->"sun_school":' - '("2019-01-01 10:00:00", now()+3600*24*365*3)') + '(`timestamp`("2019-01-01T10:00:00"), now()+3600*24*365*3)') self.check_resp_succeeded(resp) # insert edge with timestamp succeed by uuid, does not support @@ -188,7 +188,7 @@ class TestInsert1(NebulaTestSuite): # fetch sun_school resp = self.execute('FETCH PROP ON school "sun_school"') self.check_resp_succeeded(resp) - expect_result = [["sun_school", "sun_school", 1262311200]] + expect_result = [["sun_school", "sun_school", 1262340000]] self.check_result(resp, expect_result) # fetch sun_school by uuid @@ -488,8 +488,8 @@ class TestInsert1(NebulaTestSuite): '$$.personWithDefault.birthday, $$.personWithDefault.department,' '$$.studentWithDefault.grade, $$.studentWithDefault.number') self.check_resp_succeeded(resp) - expect_result = [[80, 'Laura', 1578621600, 'engineering', 'one', 20190901008], - [80, 'Amber', 1578621600, 'engineering', 'one', 20180901003]] + expect_result = [[80, 'Laura', 1578650400, 'engineering', 'one', 20190901008], + [80, 'Amber', 1578650400, 'engineering', 'one', 20180901003]] self.check_out_of_order_result(resp, expect_result) def test_multi_version(self): diff --git a/tests/tck/features/index/Index.feature b/tests/tck/features/index/Index.feature index d803fc2881357836ee384d209352a1d12508d10a..2f47d82fdf5b76f04f5c2be90ad772709494f884 100644 --- a/tests/tck/features/index/Index.feature +++ b/tests/tck/features/index/Index.feature @@ -62,10 +62,10 @@ Feature: IndexTest_Vid_String When executing query: """ INSERT VERTEX tag_1(col1, col2, col3, col4) VALUES - "Tim": ("Tim", 18, 11.11, "2000-10-10 10:00:00"), - "Tony": ("Tony", 18, 11.11, "2000-10-10 10:00:00"), - "May": ("May", 18, 11.11, "2000-10-10 10:00:00"), - "Tom": ("Tom", 18, 11.11, "2000-10-10 10:00:00") + "Tim": ("Tim", 18, 11.11, `timestamp`("2000-10-10T10:00:00")), + "Tony": ("Tony", 18, 11.11, `timestamp`("2000-10-10T10:00:00")), + "May": ("May", 18, 11.11, `timestamp`("2000-10-10T10:00:00")), + "Tom": ("Tom", 18, 11.11, `timestamp`("2000-10-10T10:00:00)") """ And wait 6 seconds Then the execution should be successful @@ -207,10 +207,10 @@ Feature: IndexTest_Vid_String When executing query: """ INSERT EDGE edge_1(col1, col2, col3, col4) VALUES - "Tim" -> "May": ("Good", 18, 11.11, "2000-10-10 10:00:00"), - "Tim" -> "Tony": ("Good", 18, 11.11, "2000-10-10 10:00:00"), - "Tony" -> "May": ("Like", 18, 11.11, "2000-10-10 10:00:00"), - "May" -> "Tim": ("Like", 18, 11.11, "2000-10-10 10:00:00") + "Tim" -> "May": ("Good", 18, 11.11, `timestamp`("2000-10-10T10:00:00")), + "Tim" -> "Tony": ("Good", 18, 11.11, `timestamp`("2000-10-10T10:00:00")), + "Tony" -> "May": ("Like", 18, 11.11, `timestamp`("2000-10-10T10:00:00")), + "May" -> "Tim": ("Like", 18, 11.11, `timestamp`("2000-10-10T10:00:00")) """ And wait 6 seconds Then the execution should be successful @@ -512,7 +512,7 @@ Feature: IndexTest_Vid_String When executing query: """ INSERT VERTEX tag_1(col1, col2, col3, col4) VALUES - "100": (true, 18, 1.1, "2000-10-10 10:00:00") + "100": (true, 18, 1.1, `timestamp`("2000-10-10T10:00:00")) """ Then the execution should be successful When executing query: @@ -530,7 +530,7 @@ Feature: IndexTest_Vid_String When executing query: """ INSERT VERTEX tag_1(col1, col2, col3, col4, col5) VALUES - "100":(true, 18, 1.1, "2000-10-10 10:00:00", 5) + "100":(true, 18, 1.1, `timestamp`("2000-10-10T10:00:00"), 5) """ And wait 6 seconds Then the execution should be successful diff --git a/tests/tck/features/mutate/InsertWithTimeType.feature b/tests/tck/features/mutate/InsertWithTimeType.feature index 1ab12e1e45cce6c96654a3df2b7535ea67a7bdd5..eb57ffe25ac14374b8e9b317a28345753716be88 100644 --- a/tests/tck/features/mutate/InsertWithTimeType.feature +++ b/tests/tck/features/mutate/InsertWithTimeType.feature @@ -20,7 +20,7 @@ Feature: Insert with time-dependent types """ INSERT VERTEX TAG_TIMESTAMP(a) VALUES "TEST_VERTEX":("2000.0.0 10:0:0") """ - Then a ExecutionError should be raised at runtime:Storage Error: Invalid field value: may be the filed is not NULL or without default value or wrong schema. + Then a ExecutionError should be raised at runtime:Storage Error: The data type does not meet the requirements. Use the correct type of data. When executing query: """ INSERT VERTEX TAG_TIMESTAMP(a) VALUES "TEST_VERTEX":(NULL)