From 009b5870ef750c0a33f464b539ff6c56c4ee6b66 Mon Sep 17 00:00:00 2001 From: Benjamin Winger Date: Thu, 14 Dec 2023 14:02:31 -0500 Subject: [PATCH] Enable map type in rel table See #2184 --- dataset/tinysnb/eKnows.csv | 28 ++++++------- dataset/tinysnb/schema.cypher | 2 +- src/binder/bind/bind_ddl.cpp | 8 ++-- test/c_api/value_test.cpp | 2 +- test/runner/e2e_copy_transaction_test.cpp | 5 ++- test/test_files/copy/copy_partial_column.test | 22 +++++----- .../exceptions/binder/binder_error.test | 2 +- .../exceptions/copy/auto_commit.test | 2 +- test/test_files/issue/issue.test | 13 ++++-- test/test_files/tinysnb/agg/distinct_agg.test | 4 +- test/test_files/tinysnb/agg/hash.test | 7 ++-- test/test_files/tinysnb/agg/simple.test | 2 +- test/test_files/tinysnb/call/call.test | 10 +++-- test/test_files/tinysnb/path/path.test | 22 +++++----- .../tinysnb/projection/single_label.test | 4 +- .../update_rel/create_read_tinysnb.test | 6 +-- tools/nodejs_api/test/test_data_type.js | 1 + tools/python_api/test/ground_truth.py | 42 ++++++++++++------- tools/python_api/test/test_datatype.py | 2 +- tools/python_api/test/test_df.py | 2 + tools/python_api/test/test_torch_geometric.py | 6 ++- 21 files changed, 110 insertions(+), 82 deletions(-) diff --git a/dataset/tinysnb/eKnows.csv b/dataset/tinysnb/eKnows.csv index 06cdac47fe7..471e63a0c2d 100644 --- a/dataset/tinysnb/eKnows.csv +++ b/dataset/tinysnb/eKnows.csv @@ -1,14 +1,14 @@ -0,2,2021-06-30,1986-10-21 21:08:31.521,10 years 5 months 13 hours 24 us,"[rnme,m8sihsdnf2990nfiwf]","{locations:['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100, 200]}}",1 -0,3,2021-06-30,1946-08-25 19:07:22,20 years 30 days 48 hours,"[njnojppo9u0jkmf,fjiojioh9h9h89hph]","{}",2020-10-10 -0,5,2021-06-30,2012-12-11 20:07:22,10 days,"[ioji232,jifhe8w99u43434]","{locations:['shanghai'], transfer: {day: 1990-09-10, amount: [10]}}","nice weather" -2,0,2021-06-30,1946-08-25 19:07:22,10 years 5 months 13 hours 24 us,"[2huh9y89fsfw23,23nsihufhw723]","{locations:['paris'], transfer: {day: 2000-01-01, amount: [20, 5000]}}",4 -2,3,1950-05-14,1946-08-25 19:07:22,23 minutes,"[fwehu9h9832wewew,23u9h989sdfsss]","{locations:['paris'], transfer: {day: 2011-05-01, amount: [2000, 5340]}}","cool stuff found" -2,5,1950-05-14,2012-12-11 20:07:22,20 years 30 days 48 hours,"[fwh9y81232uisuiehuf,ewnuihxy8dyf232]","{locations:['vancouver'], transfer: {day: 2020-01-01, amount: [120, 50]}}","matthew perry" -3,0,2021-06-30,2002-07-31 11:42:53.12342,30 hours 40 days,"[fnioh8323aeweae34d,osd89e2ejshuih12]","{locations:['london','toronto'], transfer: {day: 2012-11-21, amount: [223, 5230]}}",10 -3,2,1950-05-14,2007-02-12 12:11:42.123,28 minutes 30 milliseconds,"[fwh983-sdjisdfji,ioh89y32r2huir]","{locations:['paris','beijing'], transfer: {day: 2011-03-11, amount: [2323, 50]}}",1 -3,5,2000-01-01,1998-10-02 13:09:22.423,300 milliseconds,"[psh989823oaaioe,nuiuah1nosndfisf]","{locations:[], transfer: {day: 1980-11-21, amount: [20, 5]}}",2 -5,0,2021-06-30,1936-11-02 11:02:01,480us,"[fwewe]","{locations:['shanghai','nanjing'], transfer: {day: 1998-11-12, amount: [22, 53240]}}",15 -5,2,1950-05-14,1982-11-11 13:12:05.123,23 minutes,"[fewh9182912e3,h9y8y89soidfsf,nuhudf78w78efw,hioshe0f9023sdsd]","{locations:['paris'], transfer: {day: 2000-01-01, amount: [20, 5000]}}","happy new year" -5,3,2000-01-01,1999-04-21 15:12:11.42,48 hours 52 milliseconds,"[23h9sdslnfowhu2932,shuhf98922323sf]","{locations:['paris'], transfer: {day: 2000-01-01, amount: [20, 5000]}}",4 -7,8,1905-12-12,2025-01-01 11:22:33.52,47 minutes 58 seconds,"[ahu2333333333333,12weeeeeeeeeeeeeeeeee]","{locations:['toronto','thisisalongcityname'], transfer: {day: 1930-11-22, amount: [18, 323]}}",8 -7,9,1905-12-12,2020-03-01 12:11:41.6552,47 minutes 58 seconds,"[peweeeeeeeeeeeeeeeee,kowje9w0eweeeeeeeee]","{locations:['waterloo'], transfer: {day: 2000-01-01, amount: [1000, 5000]}}",10 +0,2,2021-06-30,1986-10-21 21:08:31.521,10 years 5 months 13 hours 24 us,"[rnme,m8sihsdnf2990nfiwf]","{locations:['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100, 200]}}",1,{a=b} +0,3,2021-06-30,1946-08-25 19:07:22,20 years 30 days 48 hours,"[njnojppo9u0jkmf,fjiojioh9h9h89hph]","{}",2020-10-10,"{c=d, e=f, 1=2}" +0,5,2021-06-30,2012-12-11 20:07:22,10 days,"[ioji232,jifhe8w99u43434]","{locations:['shanghai'], transfer: {day: 1990-09-10, amount: [10]}}","nice weather", +2,0,2021-06-30,1946-08-25 19:07:22,10 years 5 months 13 hours 24 us,"[2huh9y89fsfw23,23nsihufhw723]","{locations:['paris'], transfer: {day: 2000-01-01, amount: [20, 5000]}}",4, +2,3,1950-05-14,1946-08-25 19:07:22,23 minutes,"[fwehu9h9832wewew,23u9h989sdfsss]","{locations:['paris'], transfer: {day: 2011-05-01, amount: [2000, 5340]}}","cool stuff found", +2,5,1950-05-14,2012-12-11 20:07:22,20 years 30 days 48 hours,"[fwh9y81232uisuiehuf,ewnuihxy8dyf232]","{locations:['vancouver'], transfer: {day: 2020-01-01, amount: [120, 50]}}","matthew perry", +3,0,2021-06-30,2002-07-31 11:42:53.12342,30 hours 40 days,"[fnioh8323aeweae34d,osd89e2ejshuih12]","{locations:['london','toronto'], transfer: {day: 2012-11-21, amount: [223, 5230]}}",10, +3,2,1950-05-14,2007-02-12 12:11:42.123,28 minutes 30 milliseconds,"[fwh983-sdjisdfji,ioh89y32r2huir]","{locations:['paris','beijing'], transfer: {day: 2011-03-11, amount: [2323, 50]}}",1, +3,5,2000-01-01,1998-10-02 13:09:22.423,300 milliseconds,"[psh989823oaaioe,nuiuah1nosndfisf]","{locations:[], transfer: {day: 1980-11-21, amount: [20, 5]}}",2, +5,0,2021-06-30,1936-11-02 11:02:01,480us,"[fwewe]","{locations:['shanghai','nanjing'], transfer: {day: 1998-11-12, amount: [22, 53240]}}",15, +5,2,1950-05-14,1982-11-11 13:12:05.123,23 minutes,"[fewh9182912e3,h9y8y89soidfsf,nuhudf78w78efw,hioshe0f9023sdsd]","{locations:['paris'], transfer: {day: 2000-01-01, amount: [20, 5000]}}","happy new year", +5,3,2000-01-01,1999-04-21 15:12:11.42,48 hours 52 milliseconds,"[23h9sdslnfowhu2932,shuhf98922323sf]","{locations:['paris'], transfer: {day: 2000-01-01, amount: [20, 5000]}}",4, +7,8,1905-12-12,2025-01-01 11:22:33.52,47 minutes 58 seconds,"[ahu2333333333333,12weeeeeeeeeeeeeeeeee]","{locations:['toronto','thisisalongcityname'], transfer: {day: 1930-11-22, amount: [18, 323]}}",8, +7,9,1905-12-12,2020-03-01 12:11:41.6552,47 minutes 58 seconds,"[peweeeeeeeeeeeeeeeee,kowje9w0eweeeeeeeee]","{locations:['waterloo'], transfer: {day: 2000-01-01, amount: [1000, 5000]}}",10, diff --git a/dataset/tinysnb/schema.cypher b/dataset/tinysnb/schema.cypher index c6d92da3daa..edc4608f233 100644 --- a/dataset/tinysnb/schema.cypher +++ b/dataset/tinysnb/schema.cypher @@ -1,7 +1,7 @@ create node table person (ID INt64, fName StRING, gender INT64, isStudent BoOLEAN, isWorker BOOLEAN, age INT64, eyeSight DOUBLE, birthdate DATE, registerTime TIMESTAMP, lastJobDuration interval, workedHours INT64[], usedNames STRING[], courseScoresPerTerm INT64[][], grades INT64[4], height float, PRIMARY KEY (ID)); create node table organisation (ID INT64, name STRING, orgCode INT64, mark DOUBLE, score INT64, history STRING, licenseValidInterval INTERVAL, rating DOUBLE, state STRUCT(revenue INT16, location STRING[], stock STRUCT(price INT64[], volume INT64)), info UNION(price FLOAT, movein DATE, note STRING),PRIMARY KEY (ID)); create node table movies (name STRING, length INT32, note STRING, description STRUCT(rating DOUBLE, stars INT8, views INT64, release TIMESTAMP, release_ns TIMESTAMP_NS, release_ms TIMESTAMP_MS, release_sec TIMESTAMP_SEC, release_tz TIMESTAMP_TZ, film DATE, u8 UINT8, u16 UINT16, u32 UINT32, u64 UINT64, hugedata INT128), content BYTEA, audience MAP(STRING, INT64), grade union(credit boolean, grade1 double, grade2 int64), PRIMARY KEY (name)); -create rel table knows (FROM person TO person, date DATE, meetTime TIMESTAMP, validInterval INTERVAL, comments STRING[], summary STRUCT(locations STRING[], transfer STRUCT(day DATE, amount INT64[])), notes UNION(firstmet DATE, type INT16, comment STRING), MANY_MANY); +create rel table knows (FROM person TO person, date DATE, meetTime TIMESTAMP, validInterval INTERVAL, comments STRING[], summary STRUCT(locations STRING[], transfer STRUCT(day DATE, amount INT64[])), notes UNION(firstmet DATE, type INT16, comment STRING), blah MAP(STRING, STRING), MANY_MANY); create rel table studyAt (FROM person TO organisation, year INT64, places STRING[], length INT16, level INT8, code UINT64, temprature UINT32, ulength UINT16, ulevel UINT8, hugedata INT128, MANY_ONE); create rel table workAt (FROM person TO organisation, year INT64, grading DOUBLE[2], rating float, MANY_ONE); create rel table meets (FROM person TO person, location FLOAT[2], times INT, data BYTEA, MANY_ONE); diff --git a/src/binder/bind/bind_ddl.cpp b/src/binder/bind/bind_ddl.cpp index 88322b6c552..d3cbfcccaae 100644 --- a/src/binder/bind/bind_ddl.cpp +++ b/src/binder/bind/bind_ddl.cpp @@ -110,14 +110,12 @@ std::unique_ptr Binder::bindCreateNodeTableInfo(const Crea std::unique_ptr Binder::bindCreateRelTableInfo(const CreateTableInfo* info) { auto boundProperties = bindProperties(info->propertyNameDataTypes); + auto extraInfo = (ExtraCreateRelTableInfo*)info->extraInfo.get(); for (auto& boundProperty : boundProperties) { - if (boundProperty->getDataType()->getLogicalTypeID() == LogicalTypeID::SERIAL || - boundProperty->getDataType()->getLogicalTypeID() == LogicalTypeID::MAP) { - throw BinderException(stringFormat("{} property is not supported in rel table.", - boundProperty->getDataType()->toString())); + if (boundProperty->getDataType()->getLogicalTypeID() == LogicalTypeID::SERIAL) { + throw BinderException("SERIAL properties are not supported in rel tables."); } } - auto extraInfo = (ExtraCreateRelTableInfo*)info->extraInfo.get(); auto srcMultiplicity = RelMultiplicityUtils::getFwd(extraInfo->relMultiplicity); auto dstMultiplicity = RelMultiplicityUtils::getBwd(extraInfo->relMultiplicity); auto srcTableID = bindTableID(extraInfo->srcTableName); diff --git a/test/c_api/value_test.cpp b/test/c_api/value_test.cpp index 2508062ed77..e1b43e4e5a6 100644 --- a/test/c_api/value_test.cpp +++ b/test/c_api/value_test.cpp @@ -777,7 +777,7 @@ TEST_F(CApiValueTest, GetRelVal) { auto relLabelStr = kuzu_value_get_string(relLabel); ASSERT_STREQ(relLabelStr, "knows"); auto propertiesSize = kuzu_rel_val_get_property_size(rel); - ASSERT_EQ(propertiesSize, 6); + ASSERT_EQ(propertiesSize, 7); free(relLabelStr); kuzu_value_destroy(relLabel); kuzu_value_destroy(relSrcIDVal); diff --git a/test/runner/e2e_copy_transaction_test.cpp b/test/runner/e2e_copy_transaction_test.cpp index 0bcd15383dd..f79051956cc 100644 --- a/test/runner/e2e_copy_transaction_test.cpp +++ b/test/runner/e2e_copy_transaction_test.cpp @@ -65,6 +65,9 @@ class TinySnbCopyCSVTransactionTest : public EmptyDBTest { void copyNodeCSVCommitAndRecoveryTest(TransactionTestType transactionTestType) { conn->query(createPersonTableCMD); auto preparedStatement = conn->prepare(copyPersonTableCMD); + if (!preparedStatement->success) { + ASSERT_TRUE(false) << preparedStatement->errMsg; + } auto mapper = PlanMapper( *getStorageManager(*database), getMemoryManager(*database), getCatalog(*database)); auto physicalPlan = @@ -171,7 +174,7 @@ class TinySnbCopyCSVTransactionTest : public EmptyDBTest { "create rel table knows (FROM person TO person, date DATE, meetTime TIMESTAMP, " "validInterval INTERVAL, comments STRING[], summary STRUCT(locations STRING[], transfer " "STRUCT(day DATE, amount INT64[])), notes UNION(firstmet DATE, type INT16, comment " - "STRING), MANY_MANY);"; + "STRING), someMap MAP(STRING, STRING), MANY_MANY);"; std::string copyKnowsTableCMD = "COPY knows FROM \"" + TestHelper::appendKuzuRootPath("dataset/tinysnb/eKnows.csv\""); std::unique_ptr profiler; diff --git a/test/test_files/copy/copy_partial_column.test b/test/test_files/copy/copy_partial_column.test index b1d4ac7eff8..88379c324ad 100644 --- a/test/test_files/copy/copy_partial_column.test +++ b/test/test_files/copy/copy_partial_column.test @@ -14,33 +14,33 @@ ---- ok -STATEMENT CREATE REL TABLE knows1 (FROM person TO person, nullDouble DOUBLE, date DATE, meetTime TIMESTAMP, validInterval INTERVAL, comments STRING[], summary STRUCT(locations STRING[], - transfer STRUCT(day DATE, amount INT64[])), notes UNION(firstmet DATE, type INT16, comment STRING), MANY_MANY); + transfer STRUCT(day DATE, amount INT64[])), notes UNION(firstmet DATE, type INT16, comment STRING), someMap MAP(STRING, STRING), MANY_MANY); ---- ok --STATEMENT COPY knows1 (date, meetTime, validInterval, comments, summary, notes) FROM "${KUZU_ROOT_DIRECTORY}/dataset/tinysnb/eKnows.csv" ; +-STATEMENT COPY knows1 (date, meetTime, validInterval, comments, summary, notes, someMap) FROM "${KUZU_ROOT_DIRECTORY}/dataset/tinysnb/eKnows.csv" ; ---- ok -STATEMENT MATCH (p:person)-[e:knows1]->(:person) WHERE p.ID = 2 RETURN e.*; ---- 3 -|1950-05-14|1946-08-25 19:07:22|00:23:00|[fwehu9h9832wewew,23u9h989sdfsss]|{locations: ['paris'], transfer: {day: 2011-05-01, amount: [2000,5340]}}|cool stuff found -|1950-05-14|2012-12-11 20:07:22|20 years 30 days 48:00:00|[fwh9y81232uisuiehuf,ewnuihxy8dyf232]|{locations: ['vancouver'], transfer: {day: 2020-01-01, amount: [120,50]}}|matthew perry -|2021-06-30|1946-08-25 19:07:22|10 years 5 months 13:00:00.000024|[2huh9y89fsfw23,23nsihufhw723]|{locations: ['paris'], transfer: {day: 2000-01-01, amount: [20,5000]}}|4 +|1950-05-14|1946-08-25 19:07:22|00:23:00|[fwehu9h9832wewew,23u9h989sdfsss]|{locations: ['paris'], transfer: {day: 2011-05-01, amount: [2000,5340]}}|cool stuff found| +|1950-05-14|2012-12-11 20:07:22|20 years 30 days 48:00:00|[fwh9y81232uisuiehuf,ewnuihxy8dyf232]|{locations: ['vancouver'], transfer: {day: 2020-01-01, amount: [120,50]}}|matthew perry| +|2021-06-30|1946-08-25 19:07:22|10 years 5 months 13:00:00.000024|[2huh9y89fsfw23,23nsihufhw723]|{locations: ['paris'], transfer: {day: 2000-01-01, amount: [20,5000]}}|4| -STATEMENT CREATE REL TABLE knows2 (FROM person TO person,notes UNION(firstmet DATE, type INT16, comment STRING), meetTime TIMESTAMP,nullDouble DOUBLE, date DATE, validInterval INTERVAL, comments STRING[], - summary STRUCT(locations STRING[], transfer STRUCT(day DATE, amount INT64[])), MANY_MANY); + summary STRUCT(locations STRING[], transfer STRUCT(day DATE, amount INT64[])), someMap MAP(STRING, STRING), MANY_MANY); ---- ok --STATEMENT COPY knows2 (date, meetTime, validInterval, comments, summary, notes) FROM "${KUZU_ROOT_DIRECTORY}/dataset/tinysnb/eKnows.csv" ; +-STATEMENT COPY knows2 (date, meetTime, validInterval, comments, summary, notes, someMap) FROM "${KUZU_ROOT_DIRECTORY}/dataset/tinysnb/eKnows.csv" ; ---- ok -STATEMENT MATCH (p:person)-[e:knows2]->(:person) WHERE p.ID = 2 RETURN e.*; ---- 3 -4|1946-08-25 19:07:22||2021-06-30|10 years 5 months 13:00:00.000024|[2huh9y89fsfw23,23nsihufhw723]|{locations: ['paris'], transfer: {day: 2000-01-01, amount: [20,5000]}} -cool stuff found|1946-08-25 19:07:22||1950-05-14|00:23:00|[fwehu9h9832wewew,23u9h989sdfsss]|{locations: ['paris'], transfer: {day: 2011-05-01, amount: [2000,5340]}} -matthew perry|2012-12-11 20:07:22||1950-05-14|20 years 30 days 48:00:00|[fwh9y81232uisuiehuf,ewnuihxy8dyf232]|{locations: ['vancouver'], transfer: {day: 2020-01-01, amount: [120,50]}} +4|1946-08-25 19:07:22||2021-06-30|10 years 5 months 13:00:00.000024|[2huh9y89fsfw23,23nsihufhw723]|{locations: ['paris'], transfer: {day: 2000-01-01, amount: [20,5000]}}| +cool stuff found|1946-08-25 19:07:22||1950-05-14|00:23:00|[fwehu9h9832wewew,23u9h989sdfsss]|{locations: ['paris'], transfer: {day: 2011-05-01, amount: [2000,5340]}}| +matthew perry|2012-12-11 20:07:22||1950-05-14|20 years 30 days 48:00:00|[fwh9y81232uisuiehuf,ewnuihxy8dyf232]|{locations: ['vancouver'], transfer: {day: 2020-01-01, amount: [120,50]}}| -STATEMENT CREATE REL TABLE knows3 (FROM person TO person, a INT16, notes UNION(firstmet DATE, type INT16, comment STRING), meetTime TIMESTAMP,nullDouble DOUBLE, date DATE, validInterval INTERVAL, comments STRING[], summary STRUCT(locations STRING[], transfer STRUCT(day DATE, amount INT64[])), MANY_MANY); ---- ok -STATEMENT COPY knows3 (meetTime, date, validInterval, comments, summary) FROM "${KUZU_ROOT_DIRECTORY}/dataset/tinysnb/eKnows.csv" ; ---- error -Binder exception: Number of columns mismatch. Expected 7 but got 8. +Binder exception: Number of columns mismatch. Expected 7 but got 9. -STATEMENT COPY knows3 (meetTime, date, validInterval, comments, summary, dummy) FROM "${KUZU_ROOT_DIRECTORY}/dataset/tinysnb/eKnows.csv" ; ---- error Binder exception: Table knows3 does not contain column dummy. diff --git a/test/test_files/exceptions/binder/binder_error.test b/test/test_files/exceptions/binder/binder_error.test index 4b2d1fd27c3..80e63d4f3be 100644 --- a/test/test_files/exceptions/binder/binder_error.test +++ b/test/test_files/exceptions/binder/binder_error.test @@ -522,7 +522,7 @@ Binder exception: Serial property in node table must be the primary key. -LOG SerialInRelTable -STATEMENT CREATE REL TABLE test(FROM person TO person, seq SERIAL) ---- error -Binder exception: SERIAL property is not supported in rel table. +Binder exception: SERIAL properties are not supported in rel tables. -LOG MatchBuiltIn -STATEMENT MATCH (a:person) RETURN a.age + 'hh' diff --git a/test/test_files/exceptions/copy/auto_commit.test b/test/test_files/exceptions/copy/auto_commit.test index ed0ccd85aa1..49dd34bb722 100644 --- a/test/test_files/exceptions/copy/auto_commit.test +++ b/test/test_files/exceptions/copy/auto_commit.test @@ -18,7 +18,7 @@ DDL, Copy, createMacro statements can only run in the AUTO_COMMIT mode. Please c -STATEMENT COPY person FROM "${KUZU_ROOT_DIRECTORY}/dataset/tinysnb/vPerson.csv" (HEADER=TRUE, DELIM=',') ---- 1 8 number of tuples has been copied to table: person. --STATEMENT create rel table knows (FROM person TO person, date DATE, meetTime TIMESTAMP, validInterval INTERVAL, comments STRING[], summary STRUCT(locations STRING[], transfer STRUCT(day DATE, amount INT64[])), notes UNION(firstmet DATE, type INT16, comment STRING), MANY_MANY) +-STATEMENT create rel table knows (FROM person TO person, date DATE, meetTime TIMESTAMP, validInterval INTERVAL, comments STRING[], summary STRUCT(locations STRING[], transfer STRUCT(day DATE, amount INT64[])), notes UNION(firstmet DATE, type INT16, comment STRING), someMap MAP(STRING, STRING), MANY_MANY) ---- ok -STATEMENT COPY knows FROM "${KUZU_ROOT_DIRECTORY}/dataset/tinysnb/eKnows.csv" ---- 1 diff --git a/test/test_files/issue/issue.test b/test/test_files/issue/issue.test index c764392b3ed..618281b0eb3 100644 --- a/test/test_files/issue/issue.test +++ b/test/test_files/issue/issue.test @@ -69,11 +69,16 @@ -STATEMENT CREATE NODE TABLE T2(name STRING, myprops MAP(STRING,STRING), PRIMARY KEY(name)); ---- ok -STATEMENT CREATE REL TABLE KIND_OF3(FROM T TO T, myprops MAP(STRING,STRING)); +---- ok +-STATEMENT CREATE REL TABLE KIND_OF4(FROM T TO T, myprops SERIAL); ---- error -Binder exception: MAP(STRING: STRING) property is not supported in rel table. --STATEMENT CREATE REL TABLE KIND_OF3(FROM T TO T, myprops SERIAL); ----- error -Binder exception: SERIAL property is not supported in rel table. +Binder exception: SERIAL properties are not supported in rel tables. +-STATEMENT CREATE (:T {name: "Foo"}); +---- ok +-STATEMENT CREATE (:T {name: "Bar"}); +---- ok +-STATEMENT MATCH (t1:T), (t2:T) where t1.name = 'Foo' AND t2.name = "Bar" CREATE (t1)-[:KIND_OF3 {myprops: map(['1', '2'], ['a', 'b'])}]->(t2); +---- ok -CASE 2293 -STATEMENT CREATE NODE TABLE T(id INT64, PRIMARY KEY(id)); diff --git a/test/test_files/tinysnb/agg/distinct_agg.test b/test/test_files/tinysnb/agg/distinct_agg.test index 09ed3a7787c..a9bf43f9020 100644 --- a/test/test_files/tinysnb/agg/distinct_agg.test +++ b/test/test_files/tinysnb/agg/distinct_agg.test @@ -51,8 +51,8 @@ -STATEMENT MATCH (p:person)-[:knows]->(b:person)-[e:knows]->(c:person)-[:knows]->(:person) RETURN DISTINCT e; ---- 12 -(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf], summary: {locations: ['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100,200]}}, notes: 1}->(0:1) -(0:0)-{_LABEL: knows, _ID: 3:1, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 20 years 30 days 48:00:00, comments: [njnojppo9u0jkmf,fjiojioh9h9h89hph], summary: {locations: , transfer: }, notes: 2020-10-10}->(0:2) +(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf], summary: {locations: ['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100,200]}}, notes: 1, someMap: {a=b}}->(0:1) +(0:0)-{_LABEL: knows, _ID: 3:1, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 20 years 30 days 48:00:00, comments: [njnojppo9u0jkmf,fjiojioh9h9h89hph], summary: {locations: , transfer: }, notes: 2020-10-10, someMap: {c=d, e=f, 1=2}}->(0:2) (0:0)-{_LABEL: knows, _ID: 3:2, date: 2021-06-30, meetTime: 2012-12-11 20:07:22, validInterval: 10 days, comments: [ioji232,jifhe8w99u43434], summary: {locations: ['shanghai'], transfer: {day: 1990-09-10, amount: [10]}}, notes: nice weather}->(0:3) (0:1)-{_LABEL: knows, _ID: 3:3, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 10 years 5 months 13:00:00.000024, comments: [2huh9y89fsfw23,23nsihufhw723], summary: {locations: ['paris'], transfer: {day: 2000-01-01, amount: [20,5000]}}, notes: 4}->(0:0) (0:1)-{_LABEL: knows, _ID: 3:4, date: 1950-05-14, meetTime: 1946-08-25 19:07:22, validInterval: 00:23:00, comments: [fwehu9h9832wewew,23u9h989sdfsss], summary: {locations: ['paris'], transfer: {day: 2011-05-01, amount: [2000,5340]}}, notes: cool stuff found}->(0:2) diff --git a/test/test_files/tinysnb/agg/hash.test b/test/test_files/tinysnb/agg/hash.test index c9a930df561..7ee95281af1 100644 --- a/test/test_files/tinysnb/agg/hash.test +++ b/test/test_files/tinysnb/agg/hash.test @@ -8,8 +8,8 @@ -STATEMENT MATCH (a:person)-[r:knows]->(b:person) WHERE a.ID=0 RETURN r, COUNT(*) -ENUMERATE ---- 3 -(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf], summary: {locations: ['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100,200]}}, notes: 1}->(0:1)|1 -(0:0)-{_LABEL: knows, _ID: 3:1, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 20 years 30 days 48:00:00, comments: [njnojppo9u0jkmf,fjiojioh9h9h89hph], summary: {locations: , transfer: }, notes: 2020-10-10}->(0:2)|1 +(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf], summary: {locations: ['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100,200]}}, notes: 1, someMap: {a=b}}->(0:1)|1 +(0:0)-{_LABEL: knows, _ID: 3:1, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 20 years 30 days 48:00:00, comments: [njnojppo9u0jkmf,fjiojioh9h9h89hph], summary: {locations: , transfer: }, notes: 2020-10-10, someMap: {c=d, e=f, 1=2}}->(0:2)|1 (0:0)-{_LABEL: knows, _ID: 3:2, date: 2021-06-30, meetTime: 2012-12-11 20:07:22, validInterval: 10 days, comments: [ioji232,jifhe8w99u43434], summary: {locations: ['shanghai'], transfer: {day: 1990-09-10, amount: [10]}}, notes: nice weather}->(0:3)|1 -STATEMENT MATCH (a:person)-[:knows]->(b:person) RETURN a, COUNT(*) @@ -258,7 +258,7 @@ Elizabeth|[25,40] -LOG HashCollectOnRelTest -STATEMENT MATCH (p:person)-[e:knows]->(p1:person) WHERE offset(ID(e)) = 1 or offset(ID(e)) = 4 RETURN p.gender, collect(e) ---- 2 -1|[(0:0)-{_LABEL: knows, _ID: 3:1, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 20 years 30 days 48:00:00, comments: [njnojppo9u0jkmf,fjiojioh9h9h89hph], summary: {locations: , transfer: }, notes: 2020-10-10}->(0:2)] +1|[(0:0)-{_LABEL: knows, _ID: 3:1, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 20 years 30 days 48:00:00, comments: [njnojppo9u0jkmf,fjiojioh9h9h89hph], summary: {locations: , transfer: }, notes: 2020-10-10, someMap: {c=d, e=f, 1=2}}->(0:2)] 2|[(0:1)-{_LABEL: knows, _ID: 3:4, date: 1950-05-14, meetTime: 1946-08-25 19:07:22, validInterval: 00:23:00, comments: [fwehu9h9832wewew,23u9h989sdfsss], summary: {locations: ['paris'], transfer: {day: 2011-05-01, amount: [2000,5340]}}, notes: cool stuff found}->(0:2)] -LOG HashAggCountBlob @@ -342,4 +342,3 @@ True|\xAB\xCD {_ID: 0:1, _LABEL: person, ID: 2, fName: Bob, gender: 2, isStudent: True, isWorker: False, age: 30, eyeSight: 5.100000, birthdate: 1900-01-01, registerTime: 2008-11-03 15:25:30.000526, lastJobDuration: 10 years 5 months 13:00:00.000024, workedHours: [12,8], usedNames: [Bobby], courseScoresPerTerm: [[8,9],[9,10]], grades: [98,42,93,88], height: 0.990000}|9 {_ID: 0:2, _LABEL: person, ID: 3, fName: Carol, gender: 1, isStudent: False, isWorker: True, age: 45, eyeSight: 5.000000, birthdate: 1940-06-22, registerTime: 1911-08-20 02:32:21, lastJobDuration: 48:24:11, workedHours: [4,5], usedNames: [Carmen,Fred], courseScoresPerTerm: [[8,10]], grades: [91,75,21,95], height: 1.000000}|9 {_ID: 0:3, _LABEL: person, ID: 5, fName: Dan, gender: 2, isStudent: False, isWorker: True, age: 20, eyeSight: 4.800000, birthdate: 1950-07-23, registerTime: 2031-11-30 12:25:30, lastJobDuration: 10 years 5 months 13:00:00.000024, workedHours: [1,9], usedNames: [Wolfeschlegelstein,Daniel], courseScoresPerTerm: [[7,4],[8,8],[9]], grades: [76,88,99,89], height: 1.300000}|9 - diff --git a/test/test_files/tinysnb/agg/simple.test b/test/test_files/tinysnb/agg/simple.test index 81ac63d4638..d034ebd340d 100644 --- a/test/test_files/tinysnb/agg/simple.test +++ b/test/test_files/tinysnb/agg/simple.test @@ -205,7 +205,7 @@ False -STATEMENT MATCH (p:person)-[e:knows]->(p1:person) WHERE p.ID = 0 AND p1.ID = 2 WITH collect(e) as relation RETURN relation; -PARALLELISM 6 ---- 1 -[(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf], summary: {locations: ['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100,200]}}, notes: 1}->(0:1)] +[(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf], summary: {locations: ['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100,200]}}, notes: 1, someMap: {a=b}}->(0:1)] -LOG SimpleAggMinTimestampTest -STATEMENT MATCH (a:person) RETURN MIN(a.registerTime) diff --git a/test/test_files/tinysnb/call/call.test b/test/test_files/tinysnb/call/call.test index e216161be1a..91b6f7ebac4 100644 --- a/test/test_files/tinysnb/call/call.test +++ b/test/test_files/tinysnb/call/call.test @@ -84,13 +84,14 @@ Can't execute a write query inside a read-only transaction. -LOG RelTableInfo -STATEMENT CALL table_info('knows') RETURN * ----- 6 +---- 7 1|date|DATE 2|meetTime|TIMESTAMP 3|validInterval|INTERVAL 4|comments|STRING[] 5|summary|STRUCT(locations:STRING[], transfer:STRUCT(day:DATE, amount:INT64[])) 6|notes|UNION(firstmet:DATE, type:INT16, comment:STRING) +7|someMap|MAP(STRING: STRING) -LOG ReturnNodeName -STATEMENT CALL table_info('person') WHERE name <> 'ID' RETURN name @@ -112,21 +113,24 @@ height -LOG ReturnRelName -STATEMENT MATCH (m:movies) CALL table_info('knows') return id(m), type ----- 18 +---- 21 2:0|DATE 2:0|INTERVAL +2:0|MAP(STRING: STRING) 2:0|STRING[] 2:0|TIMESTAMP 2:0|STRUCT(locations:STRING[], transfer:STRUCT(day:DATE, amount:INT64[])) 2:0|UNION(firstmet:DATE, type:INT16, comment:STRING) 2:1|DATE 2:1|INTERVAL +2:1|MAP(STRING: STRING) 2:1|STRING[] 2:1|TIMESTAMP 2:1|STRUCT(locations:STRING[], transfer:STRUCT(day:DATE, amount:INT64[])) 2:1|UNION(firstmet:DATE, type:INT16, comment:STRING) 2:2|DATE 2:2|INTERVAL +2:2|MAP(STRING: STRING) 2:2|STRING[] 2:2|TIMESTAMP 2:2|STRUCT(locations:STRING[], transfer:STRUCT(day:DATE, amount:INT64[])) @@ -190,7 +194,7 @@ Binder exception: Parameters in table function must be a literal expression. 35 -STATEMENT CALL storage_info('knows') RETURN COUNT(*) ---- 1 -72 +78 -STATEMENT CALL storage_info('workAt') RETURN COUNT(*) ---- 1 18 diff --git a/test/test_files/tinysnb/path/path.test b/test/test_files/tinysnb/path/path.test index fb1a3cdcb87..1c06fc26db1 100644 --- a/test/test_files/tinysnb/path/path.test +++ b/test/test_files/tinysnb/path/path.test @@ -8,7 +8,7 @@ -LOG Path1 -STATEMENT MATCH p = (a:person)-[e:knows]->(b:person) WHERE a.ID = 0 AND b.fName = 'Bob' RETURN p ---- 1 -{_NODES: [{_ID: 0:0, _LABEL: person, ID: 0, fName: Alice, gender: 1, isStudent: True, isWorker: False, age: 35, eyeSight: 5.000000, birthdate: 1900-01-01, registerTime: 2011-08-20 11:25:30, lastJobDuration: 3 years 2 days 13:02:00, workedHours: [10,5], usedNames: [Aida], courseScoresPerTerm: [[10,8],[6,7,8]], grades: [96,54,86,92], height: 1.731000},{_ID: 0:1, _LABEL: person, ID: 2, fName: Bob, gender: 2, isStudent: True, isWorker: False, age: 30, eyeSight: 5.100000, birthdate: 1900-01-01, registerTime: 2008-11-03 15:25:30.000526, lastJobDuration: 10 years 5 months 13:00:00.000024, workedHours: [12,8], usedNames: [Bobby], courseScoresPerTerm: [[8,9],[9,10]], grades: [98,42,93,88], height: 0.990000}], _RELS: [(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf], summary: {locations: ['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100,200]}}, notes: 1}->(0:1)]} +{_NODES: [{_ID: 0:0, _LABEL: person, ID: 0, fName: Alice, gender: 1, isStudent: True, isWorker: False, age: 35, eyeSight: 5.000000, birthdate: 1900-01-01, registerTime: 2011-08-20 11:25:30, lastJobDuration: 3 years 2 days 13:02:00, workedHours: [10,5], usedNames: [Aida], courseScoresPerTerm: [[10,8],[6,7,8]], grades: [96,54,86,92], height: 1.731000},{_ID: 0:1, _LABEL: person, ID: 2, fName: Bob, gender: 2, isStudent: True, isWorker: False, age: 30, eyeSight: 5.100000, birthdate: 1900-01-01, registerTime: 2008-11-03 15:25:30.000526, lastJobDuration: 10 years 5 months 13:00:00.000024, workedHours: [12,8], usedNames: [Bobby], courseScoresPerTerm: [[8,9],[9,10]], grades: [98,42,93,88], height: 0.990000}], _RELS: [(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf], summary: {locations: ['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100,200]}}, notes: 1, someMap: {a=b}}->(0:1)]} -LOG Path2 -STATEMENT MATCH p = (a:person)-[e:studyAt]->(b:organisation) WHERE a.ID = 0 RETURN p @@ -31,14 +31,14 @@ -LOG Path5 -STATEMENT MATCH p = (a:person)-[e:knows*1..2]->(b:person) WHERE a.ID = 0 RETURN rels(p) ---- 12 -[(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf], summary: {locations: ['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100,200]}}, notes: 1}->(0:1),(0:1)-{_LABEL: knows, _ID: 3:3, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 10 years 5 months 13:00:00.000024, comments: [2huh9y89fsfw23,23nsihufhw723], summary: {locations: ['paris'], transfer: {day: 2000-01-01, amount: [20,5000]}}, notes: 4}->(0:0)] -[(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf], summary: {locations: ['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100,200]}}, notes: 1}->(0:1),(0:1)-{_LABEL: knows, _ID: 3:4, date: 1950-05-14, meetTime: 1946-08-25 19:07:22, validInterval: 00:23:00, comments: [fwehu9h9832wewew,23u9h989sdfsss], summary: {locations: ['paris'], transfer: {day: 2011-05-01, amount: [2000,5340]}}, notes: cool stuff found}->(0:2)] -[(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf], summary: {locations: ['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100,200]}}, notes: 1}->(0:1),(0:1)-{_LABEL: knows, _ID: 3:5, date: 1950-05-14, meetTime: 2012-12-11 20:07:22, validInterval: 20 years 30 days 48:00:00, comments: [fwh9y81232uisuiehuf,ewnuihxy8dyf232], summary: {locations: ['vancouver'], transfer: {day: 2020-01-01, amount: [120,50]}}, notes: matthew perry}->(0:3)] -[(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf], summary: {locations: ['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100,200]}}, notes: 1}->(0:1)] -[(0:0)-{_LABEL: knows, _ID: 3:1, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 20 years 30 days 48:00:00, comments: [njnojppo9u0jkmf,fjiojioh9h9h89hph], summary: {locations: , transfer: }, notes: 2020-10-10}->(0:2),(0:2)-{_LABEL: knows, _ID: 3:6, date: 2021-06-30, meetTime: 2002-07-31 11:42:53.12342, validInterval: 40 days 30:00:00, comments: [fnioh8323aeweae34d,osd89e2ejshuih12], summary: {locations: ['london','toronto'], transfer: {day: 2012-11-21, amount: [223,5230]}}, notes: 10}->(0:0)] -[(0:0)-{_LABEL: knows, _ID: 3:1, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 20 years 30 days 48:00:00, comments: [njnojppo9u0jkmf,fjiojioh9h9h89hph], summary: {locations: , transfer: }, notes: 2020-10-10}->(0:2),(0:2)-{_LABEL: knows, _ID: 3:7, date: 1950-05-14, meetTime: 2007-02-12 12:11:42.123, validInterval: 00:28:00.03, comments: [fwh983-sdjisdfji,ioh89y32r2huir], summary: {locations: ['paris','beijing'], transfer: {day: 2011-03-11, amount: [2323,50]}}, notes: 1}->(0:1)] -[(0:0)-{_LABEL: knows, _ID: 3:1, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 20 years 30 days 48:00:00, comments: [njnojppo9u0jkmf,fjiojioh9h9h89hph], summary: {locations: , transfer: }, notes: 2020-10-10}->(0:2),(0:2)-{_LABEL: knows, _ID: 3:8, date: 2000-01-01, meetTime: 1998-10-02 13:09:22.423, validInterval: 00:00:00.3, comments: [psh989823oaaioe,nuiuah1nosndfisf], summary: {locations: [], transfer: {day: 1980-11-21, amount: [20,5]}}, notes: 2}->(0:3)] -[(0:0)-{_LABEL: knows, _ID: 3:1, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 20 years 30 days 48:00:00, comments: [njnojppo9u0jkmf,fjiojioh9h9h89hph], summary: {locations: , transfer: }, notes: 2020-10-10}->(0:2)] +[(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf], summary: {locations: ['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100,200]}}, notes: 1, someMap: {a=b}}->(0:1),(0:1)-{_LABEL: knows, _ID: 3:3, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 10 years 5 months 13:00:00.000024, comments: [2huh9y89fsfw23,23nsihufhw723], summary: {locations: ['paris'], transfer: {day: 2000-01-01, amount: [20,5000]}}, notes: 4}->(0:0)] +[(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf], summary: {locations: ['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100,200]}}, notes: 1, someMap: {a=b}}->(0:1),(0:1)-{_LABEL: knows, _ID: 3:4, date: 1950-05-14, meetTime: 1946-08-25 19:07:22, validInterval: 00:23:00, comments: [fwehu9h9832wewew,23u9h989sdfsss], summary: {locations: ['paris'], transfer: {day: 2011-05-01, amount: [2000,5340]}}, notes: cool stuff found}->(0:2)] +[(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf], summary: {locations: ['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100,200]}}, notes: 1, someMap: {a=b}}->(0:1),(0:1)-{_LABEL: knows, _ID: 3:5, date: 1950-05-14, meetTime: 2012-12-11 20:07:22, validInterval: 20 years 30 days 48:00:00, comments: [fwh9y81232uisuiehuf,ewnuihxy8dyf232], summary: {locations: ['vancouver'], transfer: {day: 2020-01-01, amount: [120,50]}}, notes: matthew perry}->(0:3)] +[(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf], summary: {locations: ['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100,200]}}, notes: 1, someMap: {a=b}}->(0:1)] +[(0:0)-{_LABEL: knows, _ID: 3:1, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 20 years 30 days 48:00:00, comments: [njnojppo9u0jkmf,fjiojioh9h9h89hph], summary: {locations: , transfer: }, notes: 2020-10-10, someMap: {c=d, e=f, 1=2}}->(0:2),(0:2)-{_LABEL: knows, _ID: 3:6, date: 2021-06-30, meetTime: 2002-07-31 11:42:53.12342, validInterval: 40 days 30:00:00, comments: [fnioh8323aeweae34d,osd89e2ejshuih12], summary: {locations: ['london','toronto'], transfer: {day: 2012-11-21, amount: [223,5230]}}, notes: 10}->(0:0)] +[(0:0)-{_LABEL: knows, _ID: 3:1, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 20 years 30 days 48:00:00, comments: [njnojppo9u0jkmf,fjiojioh9h9h89hph], summary: {locations: , transfer: }, notes: 2020-10-10, someMap: {c=d, e=f, 1=2}}->(0:2),(0:2)-{_LABEL: knows, _ID: 3:7, date: 1950-05-14, meetTime: 2007-02-12 12:11:42.123, validInterval: 00:28:00.03, comments: [fwh983-sdjisdfji,ioh89y32r2huir], summary: {locations: ['paris','beijing'], transfer: {day: 2011-03-11, amount: [2323,50]}}, notes: 1}->(0:1)] +[(0:0)-{_LABEL: knows, _ID: 3:1, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 20 years 30 days 48:00:00, comments: [njnojppo9u0jkmf,fjiojioh9h9h89hph], summary: {locations: , transfer: }, notes: 2020-10-10, someMap: {c=d, e=f, 1=2}}->(0:2),(0:2)-{_LABEL: knows, _ID: 3:8, date: 2000-01-01, meetTime: 1998-10-02 13:09:22.423, validInterval: 00:00:00.3, comments: [psh989823oaaioe,nuiuah1nosndfisf], summary: {locations: [], transfer: {day: 1980-11-21, amount: [20,5]}}, notes: 2}->(0:3)] +[(0:0)-{_LABEL: knows, _ID: 3:1, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 20 years 30 days 48:00:00, comments: [njnojppo9u0jkmf,fjiojioh9h9h89hph], summary: {locations: , transfer: }, notes: 2020-10-10, someMap: {c=d, e=f, 1=2}}->(0:2)] [(0:0)-{_LABEL: knows, _ID: 3:2, date: 2021-06-30, meetTime: 2012-12-11 20:07:22, validInterval: 10 days, comments: [ioji232,jifhe8w99u43434], summary: {locations: ['shanghai'], transfer: {day: 1990-09-10, amount: [10]}}, notes: nice weather}->(0:3),(0:3)-{_LABEL: knows, _ID: 3:10, date: 1950-05-14, meetTime: 1982-11-11 13:12:05.123, validInterval: 00:23:00, comments: [fewh9182912e3,h9y8y89soidfsf,nuhudf78w78efw,hioshe0f9023sdsd], summary: {locations: ['paris'], transfer: {day: 2000-01-01, amount: [20,5000]}}, notes: happy new year}->(0:1)] [(0:0)-{_LABEL: knows, _ID: 3:2, date: 2021-06-30, meetTime: 2012-12-11 20:07:22, validInterval: 10 days, comments: [ioji232,jifhe8w99u43434], summary: {locations: ['shanghai'], transfer: {day: 1990-09-10, amount: [10]}}, notes: nice weather}->(0:3),(0:3)-{_LABEL: knows, _ID: 3:11, date: 2000-01-01, meetTime: 1999-04-21 15:12:11.42, validInterval: 48:00:00.052, comments: [23h9sdslnfowhu2932,shuhf98922323sf], summary: {locations: ['paris'], transfer: {day: 2000-01-01, amount: [20,5000]}}, notes: 4}->(0:2)] [(0:0)-{_LABEL: knows, _ID: 3:2, date: 2021-06-30, meetTime: 2012-12-11 20:07:22, validInterval: 10 days, comments: [ioji232,jifhe8w99u43434], summary: {locations: ['shanghai'], transfer: {day: 1990-09-10, amount: [10]}}, notes: nice weather}->(0:3),(0:3)-{_LABEL: knows, _ID: 3:9, date: 2021-06-30, meetTime: 1936-11-02 11:02:01, validInterval: 00:00:00.00048, comments: [fwewe], summary: {locations: ['shanghai','nanjing'], transfer: {day: 1998-11-12, amount: [22,53240]}}, notes: 15}->(0:0)] @@ -47,8 +47,8 @@ -LOG Path6 -STATEMENT MATCH p = (a:person)-[e*2..2]->(b:organisation) WHERE a.ID = 0 RETURN rels(p) ---- 5 -[(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf], summary: {locations: ['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100,200]}}, notes: 1}->(0:1),(0:1)-{_LABEL: studyAt, _ID: 4:1, year: 2020, places: [anew,jsdnwusklklklwewsd], length: 55, level: 120, code: 6689, temprature: 1, ulength: 90, ulevel: 220, hugedata: -1844674407370955161511}->(1:0)] -[(0:0)-{_LABEL: knows, _ID: 3:1, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 20 years 30 days 48:00:00, comments: [njnojppo9u0jkmf,fjiojioh9h9h89hph], summary: {locations: , transfer: }, notes: 2020-10-10}->(0:2),(0:2)-{_LABEL: workAt, _ID: 5:0, year: 2015, grading: [3.800000,2.500000], rating: 8.200000}->(1:1)] +[(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf], summary: {locations: ['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100,200]}}, notes: 1, someMap: {a=b}}->(0:1),(0:1)-{_LABEL: studyAt, _ID: 4:1, year: 2020, places: [anew,jsdnwusklklklwewsd], length: 55, level: 120, code: 6689, temprature: 1, ulength: 90, ulevel: 220, hugedata: -1844674407370955161511}->(1:0)] +[(0:0)-{_LABEL: knows, _ID: 3:1, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 20 years 30 days 48:00:00, comments: [njnojppo9u0jkmf,fjiojioh9h9h89hph], summary: {locations: , transfer: }, notes: 2020-10-10, someMap: {c=d, e=f, 1=2}}->(0:2),(0:2)-{_LABEL: workAt, _ID: 5:0, year: 2015, grading: [3.800000,2.500000], rating: 8.200000}->(1:1)] [(0:0)-{_LABEL: knows, _ID: 3:2, date: 2021-06-30, meetTime: 2012-12-11 20:07:22, validInterval: 10 days, comments: [ioji232,jifhe8w99u43434], summary: {locations: ['shanghai'], transfer: {day: 1990-09-10, amount: [10]}}, notes: nice weather}->(0:3),(0:3)-{_LABEL: workAt, _ID: 5:1, year: 2010, grading: [2.100000,4.400000], rating: 7.600000}->(1:2)] [(0:0)-{_LABEL: marries, _ID: 7:0, usedAddress: [toronto], address: [4,5]}->(0:1),(0:1)-{_LABEL: studyAt, _ID: 4:1, year: 2020, places: [anew,jsdnwusklklklwewsd], length: 55, level: 120, code: 6689, temprature: 1, ulength: 90, ulevel: 220, hugedata: -1844674407370955161511}->(1:0)] [(0:0)-{_LABEL: meets, _ID: 6:0, location: [7.820000,3.540000], times: 5, data: \xAA\xBB\xCC\xDD}->(0:1),(0:1)-{_LABEL: studyAt, _ID: 4:1, year: 2020, places: [anew,jsdnwusklklklwewsd], length: 55, level: 120, code: 6689, temprature: 1, ulength: 90, ulevel: 220, hugedata: -1844674407370955161511}->(1:0)] diff --git a/test/test_files/tinysnb/projection/single_label.test b/test/test_files/tinysnb/projection/single_label.test index a522321936f..cea2522546f 100644 --- a/test/test_files/tinysnb/projection/single_label.test +++ b/test/test_files/tinysnb/projection/single_label.test @@ -60,8 +60,8 @@ False|| -LOG ReturnRelStarTest -STATEMENT MATCH (a:person)-[e:knows]->(b:person) WHERE a.ID =7 RETURN e.*; ---- 2 -1905-12-12|2020-03-01 12:11:41.6552|00:47:58|[peweeeeeeeeeeeeeeeee,kowje9w0eweeeeeeeee]|{locations: ['waterloo'], transfer: {day: 2000-01-01, amount: [1000,5000]}}|10 -1905-12-12|2025-01-01 11:22:33.52|00:47:58|[ahu2333333333333,12weeeeeeeeeeeeeeeeee]|{locations: ['toronto','thisisalongcityname'], transfer: {day: 1930-11-22, amount: [18,323]}}|8 +1905-12-12|2020-03-01 12:11:41.6552|00:47:58|[peweeeeeeeeeeeeeeeee,kowje9w0eweeeeeeeee]|{locations: ['waterloo'], transfer: {day: 2000-01-01, amount: [1000,5000]}}|10| +1905-12-12|2025-01-01 11:22:33.52|00:47:58|[ahu2333333333333,12weeeeeeeeeeeeeeeeee]|{locations: ['toronto','thisisalongcityname'], transfer: {day: 1930-11-22, amount: [18,323]}}|8| -LOG PersonNodesTestNull -STATEMENT MATCH (a:person) RETURN a.ID, a.fName STARTS WITH NULL, a.isWorker, a.isWorker AND null diff --git a/test/test_files/update_rel/create_read_tinysnb.test b/test/test_files/update_rel/create_read_tinysnb.test index 091834f6f19..d4945418c49 100644 --- a/test/test_files/update_rel/create_read_tinysnb.test +++ b/test/test_files/update_rel/create_read_tinysnb.test @@ -11,7 +11,7 @@ (0:0)-{_LABEL: knows, _ID: 0:15, date: 2023-04-04}->(0:1) -STATEMENT MATCH (a:person)-[e:knows]->(b:person) WHERE a.ID = 0 AND b.ID = 2 RETURN e; ---- 3 -(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf], summary: {locations: ['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100,200]}}, notes: 1}->(0:1) +(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf], summary: {locations: ['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100,200]}}, notes: 1, someMap: {a=b}}->(0:1) (0:0)-{_LABEL: knows, _ID: 3:14, date: 2023-03-03}->(0:1) (0:0)-{_LABEL: knows, _ID: 3:15, date: 2023-04-04}->(0:1) @@ -23,8 +23,8 @@ (0:0)-{_LABEL: knows, _ID: 0:16, date: 2023-04-04}->(0:3) -STATEMENT MATCH (a:person)-[e:knows]->(b:person) WHERE a.ID = 0 RETURN e; ---- 6 -(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf], summary: {locations: ['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100,200]}}, notes: 1}->(0:1) -(0:0)-{_LABEL: knows, _ID: 3:1, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 20 years 30 days 48:00:00, comments: [njnojppo9u0jkmf,fjiojioh9h9h89hph], summary: {locations: , transfer: }, notes: 2020-10-10}->(0:2) +(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf], summary: {locations: ['toronto','waterloo'], transfer: {day: 2021-01-02, amount: [100,200]}}, notes: 1, someMap: {a=b}}->(0:1) +(0:0)-{_LABEL: knows, _ID: 3:1, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 20 years 30 days 48:00:00, comments: [njnojppo9u0jkmf,fjiojioh9h9h89hph], summary: {locations: , transfer: }, notes: 2020-10-10, someMap: {c=d, e=f, 1=2}}->(0:2) (0:0)-{_LABEL: knows, _ID: 3:2, date: 2021-06-30, meetTime: 2012-12-11 20:07:22, validInterval: 10 days, comments: [ioji232,jifhe8w99u43434], summary: {locations: ['shanghai'], transfer: {day: 1990-09-10, amount: [10]}}, notes: nice weather}->(0:3) (0:0)-{_LABEL: knows, _ID: 3:14, date: 2023-04-04}->(0:1) (0:0)-{_LABEL: knows, _ID: 3:15, date: 2023-04-04}->(0:2) diff --git a/tools/nodejs_api/test/test_data_type.js b/tools/nodejs_api/test/test_data_type.js index 9a75a44dbf8..62e121de753 100644 --- a/tools/nodejs_api/test/test_data_type.js +++ b/tools/nodejs_api/test/test_data_type.js @@ -474,6 +474,7 @@ describe("RECURSIVE_REL", function () { data: null, usedAddress: null, address: null, + someMap: null, note: null, notes: null, summary: null, diff --git a/tools/python_api/test/ground_truth.py b/tools/python_api/test/ground_truth.py index 1a0f7d130bd..0bb5a6517a1 100644 --- a/tools/python_api/test/ground_truth.py +++ b/tools/python_api/test/ground_truth.py @@ -168,67 +168,77 @@ 'comments': ['rnme', 'm8sihsdnf2990nfiwf'], 'summary': {'locations': ["'toronto'", "'waterloo'"], 'transfer': {'day': datetime.date(2021, 1, 2), 'amount': [100, 200]}}, - 'notes': 1}, + 'notes': 1, + 'someMap': {'a': 'b'}}, (0, 3): {'date': datetime.date(2021, 6, 30), 'meetTime': datetime.datetime(1946, 8, 25, 19, 7, 22), 'validInterval': datetime.timedelta(days=7232), 'comments': ['njnojppo9u0jkmf', 'fjiojioh9h9h89hph'], 'summary': {'locations': None, 'transfer': None}, - 'notes': datetime.date(2020, 10, 10)}, + 'notes': datetime.date(2020, 10, 10), + 'someMap': {'c': 'd', 'e': 'f', '1': '2'}}, (0, 5): {'date': datetime.date(2021, 6, 30), 'meetTime': datetime.datetime(2012, 12, 11, 20, 7, 22), 'validInterval': datetime.timedelta(days=10), 'comments': ['ioji232', 'jifhe8w99u43434'], 'summary': {'locations': ["'shanghai'"], 'transfer': {'day': datetime.date(1990, 9, 10), 'amount': [10]}}, - 'notes': 'nice weather'}, + 'notes': 'nice weather', + 'someMap': None}, (2, 0): {'date': datetime.date(2021, 6, 30), 'meetTime': datetime.datetime(1946, 8, 25, 19, 7, 22), 'validInterval': datetime.timedelta(days=3750, seconds=46800, microseconds=24), 'comments': ['2huh9y89fsfw23', '23nsihufhw723'], 'summary': {'locations': ["'paris'"], 'transfer': {'day': datetime.date(2000, 1, 1), 'amount': [20, 5000]}}, - 'notes': 4}, + 'notes': 4, + 'someMap': None}, (2, 3): {'date': datetime.date(1950, 5, 14), 'meetTime': datetime.datetime(1946, 8, 25, 19, 7, 22), 'validInterval': datetime.timedelta(seconds=1380), 'comments': ['fwehu9h9832wewew', '23u9h989sdfsss'], 'summary': {'locations': ["'paris'"], 'transfer': {'day': datetime.date(2011, 5, 1), 'amount': [2000, 5340]}}, - 'notes': 'cool stuff found'}, + 'notes': 'cool stuff found', + 'someMap': None}, (2, 5): {'date': datetime.date(1950, 5, 14), 'meetTime': datetime.datetime(2012, 12, 11, 20, 7, 22), 'validInterval': datetime.timedelta(days=7232), 'comments': ['fwh9y81232uisuiehuf', 'ewnuihxy8dyf232'], 'summary': {'locations': ["'vancouver'"], 'transfer': {'day': datetime.date(2020, 1, 1), 'amount': [120, 50]}}, - 'notes': 'matthew perry'}, + 'notes': 'matthew perry', + 'someMap': None}, (3, 0): {'date': datetime.date(2021, 6, 30), 'meetTime': datetime.datetime(2002, 7, 31, 11, 42, 53, 123420), 'validInterval': datetime.timedelta(days=41, seconds=21600), 'comments': ['fnioh8323aeweae34d', 'osd89e2ejshuih12'], 'summary': {'locations': ["'london'", "'toronto'"], 'transfer': {'day': datetime.date(2012, 11, 21), 'amount': [223, 5230]}}, - 'notes': 10}, + 'notes': 10, + 'someMap': None}, (3, 2): {'date': datetime.date(1950, 5, 14), 'meetTime': datetime.datetime(2007, 2, 12, 12, 11, 42, 123000), 'validInterval': datetime.timedelta(seconds=1680, microseconds=30000), 'comments': ['fwh983-sdjisdfji', 'ioh89y32r2huir'], 'summary': {'locations': ["'paris'", "'beijing'"], 'transfer': {'day': datetime.date(2011, 3, 11), 'amount': [2323, 50]}}, - 'notes': 1}, + 'notes': 1, + 'someMap': None}, (3, 5): {'date': datetime.date(2000, 1, 1), 'meetTime': datetime.datetime(1998, 10, 2, 13, 9, 22, 423000), 'validInterval': datetime.timedelta(microseconds=300000), 'comments': ['psh989823oaaioe', 'nuiuah1nosndfisf'], 'summary': {'locations': [], 'transfer': {'day': datetime.date(1980, 11, 21), 'amount': [20, 5]}}, - 'notes': 2}, + 'notes': 2, + 'someMap': None}, (5, 0): {'date': datetime.date(2021, 6, 30), 'meetTime': datetime.datetime(1936, 11, 2, 11, 2, 1), 'validInterval': datetime.timedelta(microseconds=480), 'comments': ['fwewe'], 'summary': {'locations': ["'shanghai'", "'nanjing'"], 'transfer': {'day': datetime.date(1998, 11, 12), 'amount': [22, 53240]}}, - 'notes': 15}, + 'notes': 15, + 'someMap': None}, (5, 2): {'date': datetime.date(1950, 5, 14), 'meetTime': datetime.datetime(1982, 11, 11, 13, 12, 5, 123000), 'validInterval': datetime.timedelta(seconds=1380), @@ -238,28 +248,32 @@ 'hioshe0f9023sdsd'], 'summary': {'locations': ["'paris'"], 'transfer': {'day': datetime.date(2000, 1, 1), 'amount': [20, 5000]}}, - 'notes': 'happy new year'}, + 'notes': 'happy new year', + 'someMap': None}, (5, 3): {'date': datetime.date(2000, 1, 1), 'meetTime': datetime.datetime(1999, 4, 21, 15, 12, 11, 420000), 'validInterval': datetime.timedelta(days=2, microseconds=52000), 'comments': ['23h9sdslnfowhu2932', 'shuhf98922323sf'], 'summary': {'locations': ["'paris'"], 'transfer': {'day': datetime.date(2000, 1, 1), 'amount': [20, 5000]}}, - 'notes': 4}, + 'notes': 4, + 'someMap': None}, (7, 8): {'date': datetime.date(1905, 12, 12), 'meetTime': datetime.datetime(2025, 1, 1, 11, 22, 33, 520000), 'validInterval': datetime.timedelta(seconds=2878), 'comments': ['ahu2333333333333', '12weeeeeeeeeeeeeeeeee'], 'summary': {'locations': ["'toronto'", "'thisisalongcityname'"], 'transfer': {'day': datetime.date(1930, 11, 22), 'amount': [18, 323]}}, - 'notes': 8}, + 'notes': 8, + 'someMap': None}, (7, 9): {'date': datetime.date(1905, 12, 12), 'meetTime': datetime.datetime(2020, 3, 1, 12, 11, 41, 655200), 'validInterval': datetime.timedelta(seconds=2878), 'comments': ['peweeeeeeeeeeeeeeeee', 'kowje9w0eweeeeeeeee'], 'summary': {'locations': ["'waterloo'"], 'transfer': {'day': datetime.date(2000, 1, 1), 'amount': [1000, 5000]}}, - 'notes': 10} + 'notes': 10, + 'someMap': None} } TINY_SNB_WORKS_AT_GROUND_TRUTH = { diff --git a/tools/python_api/test/test_datatype.py b/tools/python_api/test/test_datatype.py index 6b96ecca5c4..5d4a014adf2 100644 --- a/tools/python_api/test/test_datatype.py +++ b/tools/python_api/test/test_datatype.py @@ -304,7 +304,7 @@ def test_recursive_rel(establish_connection): 'length': 5, 'level': 5, 'code': 9223372036854775808, 'temprature':32800, 'ulength':33768, 'ulevel': 250, 'hugedata': 1844674407370955161811111111, 'grading': None, 'rating': None, 'location': None, 'times': None, 'data': None, - 'usedAddress': None, 'address': None, 'note': None, 'notes': None, 'summary': None} + 'usedAddress': None, 'address': None, 'note': None, 'notes': None, 'someMap': None, 'summary': None} assert (rel == excepted_rel) assert not result.has_next() result.close() diff --git a/tools/python_api/test/test_df.py b/tools/python_api/test/test_df.py index 43e3e91166e..b00d90ea617 100644 --- a/tools/python_api/test/test_df.py +++ b/tools/python_api/test/test_df.py @@ -308,6 +308,7 @@ def test_df_get_recursive_join(establish_connection): 'summary': {'locations': ["'toronto'", "'waterloo'"], 'transfer': {'amount': [100, 200], 'day': datetime.date(2021, 1, 2)}}, + 'someMap': {'a': 'b'}, 'validInterval': datetime.timedelta(days=3750, seconds=46800, microseconds=24)}, {'_dst': {'offset': 0, 'table': 0}, '_label': 'knows', @@ -319,4 +320,5 @@ def test_df_get_recursive_join(establish_connection): 'summary': {'locations': ["'toronto'", "'waterloo'"], 'transfer': {'amount': [100, 200], 'day': datetime.date(2021, 1, 2)}}, + 'someMap': {'a': 'b'}, 'validInterval': datetime.timedelta(days=3750, seconds=46800, microseconds=24)}]} diff --git a/tools/python_api/test/test_torch_geometric.py b/tools/python_api/test/test_torch_geometric.py index b39abed8f60..c87c664e5f6 100644 --- a/tools/python_api/test/test_torch_geometric.py +++ b/tools/python_api/test/test_torch_geometric.py @@ -188,7 +188,7 @@ def test_to_torch_geometric_homogeneous_graph(establish_connection): assert src != dst assert pos_to_idx[dst] in ground_truth.TINY_SNB_KNOWS_GROUND_TRUTH[pos_to_idx[src]] - assert len(edge_properties) == 7 + assert len(edge_properties) == 8 assert 'date' in edge_properties assert 'meetTime' in edge_properties assert 'validInterval' in edge_properties @@ -214,6 +214,8 @@ def test_to_torch_geometric_homogeneous_graph(establish_connection): orginal_src, orginal_dst)]['summary'] == edge_properties['summary'][i] assert ground_truth.TINY_SNB_KNOWS_PROPERTIES_GROUND_TRUTH[( orginal_src, orginal_dst)]['notes'] == edge_properties['notes'][i] + assert ground_truth.TINY_SNB_KNOWS_PROPERTIES_GROUND_TRUTH[( + orginal_src, orginal_dst)]['someMap'] == edge_properties['someMap'][i] def test_to_torch_geometric_heterogeneous_graph(establish_connection): @@ -316,7 +318,7 @@ def test_to_torch_geometric_heterogeneous_graph(establish_connection): assert src != dst assert pos_to_idx['person'][dst] in ground_truth.TINY_SNB_KNOWS_GROUND_TRUTH[pos_to_idx['person'][src]] - assert len(edge_properties['person', 'person']) == 7 + assert len(edge_properties['person', 'person']) == 8 assert 'date' in edge_properties['person', 'person'] assert 'meetTime' in edge_properties['person', 'person'] assert 'validInterval' in edge_properties['person', 'person']