Skip to content
Snippets Groups Projects
Unverified Commit 998cb7d1 authored by kyle.cao's avatar kyle.cao Committed by GitHub
Browse files

tck support insert NULL (#793)


small change

Co-authored-by: default avatarYee <2520865+yixinglu@users.noreply.github.com>
parent e1752f34
No related branches found
No related tags found
No related merge requests found
......@@ -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):
......
......@@ -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
......@@ -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
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment