Skip to content

Commit b4dda26

Browse files
committed
Map Nullable test
1 parent 9354fa4 commit b4dda26

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

test/Main.hs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,14 @@ mapTestCases =
771771
mapExpected = Data.HashMap.Strict.fromList [("present", Just 42), ("also", Just (99 :: Word32))]
772772
}
773773
),
774+
-- Map(String, Nullable(UInt32)) - map with actual NULL in value
775+
( "Map(String, Nullable(UInt32)) with NULL",
776+
MapTestCase
777+
{ mapQuery = "SELECT CAST(map('present', 42, 'missing', NULL) AS Map(String, Nullable(UInt32)))",
778+
mapResult = Database.ClickHouse.Result.map Database.ClickHouse.Result.string (Database.ClickHouse.Result.nullable Database.ClickHouse.Result.uint32),
779+
mapExpected = Data.HashMap.Strict.fromList [("present", Just (42 :: Word32)), ("missing", Nothing)]
780+
}
781+
),
774782
-- Map with tuple keys
775783
( "Map(Tuple(String, UInt32), Int64)",
776784
MapTestCase

0 commit comments

Comments
 (0)