diff --git a/tests/common/csv_import.py b/tests/common/csv_import.py index d1676cd1b4c62d9b8e24bcb1aa70136eb6c3bd2a..bc2965a33164b22c2096b6722920150ffd2f8da0 100644 --- a/tests/common/csv_import.py +++ b/tests/common/csv_import.py @@ -111,6 +111,8 @@ class CSVImporter: return f'{self._insert_stmt} {src_vid}->{dst_vid}@{rank}:({",".join(props)});' def value(self, ptype: str, col): + if col == "__NULL__" or col == "NULL" or col == "null" or col == "Null": + return "NULL" return f'"{col}"' if ptype == 'string' else f'{col}' def vid_str(self, vid: VID, col: str): diff --git a/tests/data/nba/player.csv b/tests/data/nba/player.csv index ba00e2d993b41a0b01d4fa557e81906765ddddc9..522a6ed4f90e8ec7d83316fad6a0de5e8c95424d 100644 --- a/tests/data/nba/player.csv +++ b/tests/data/nba/player.csv @@ -51,3 +51,7 @@ Grant Hill,Grant Hill,46 Shaquile O'Neal,Shaquile O'Neal,47 JaVale McGee,JaVale McGee,31 Dwight Howard,Dwight Howard,33 +Null1,null,-1 +Null2,Null,-2 +Null3,NULL,-3 +Null4,__NULL__,-4 diff --git a/tests/tck/features/match/Base.feature b/tests/tck/features/match/Base.feature index 2536d43697898ffd3a8934a4a4aebba6e9354e3b..28f924198f4eac1bda3019c2bc63b2daf5b69b0b 100644 --- a/tests/tck/features/match/Base.feature +++ b/tests/tck/features/match/Base.feature @@ -15,6 +15,16 @@ Feature: Basic match Then the result should be, in any order, with relax comparison: | v | | ("Yao Ming") | + When executing query: + """ + MATCH (v:player) WHERE v.age < 0 RETURN v + """ + Then the result should be, in any order, with relax comparison: + | v | + | ("Null1" :player{age: -1, name: NULL}) | + | ("Null2" :player{age: -2, name: NULL}) | + | ("Null3" :player{age: -3, name: NULL}) | + | ("Null4" :player{age: -4, name: NULL}) | When executing query: """ MATCH (v:player) WHERE v.name == "Yao Ming" RETURN v.age AS Age