Skip to content

Commit

Permalink
fix map creation
Browse files Browse the repository at this point in the history
  • Loading branch information
ray6080 committed Sep 29, 2023
1 parent 53d91db commit 01c5e92
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/include/storage/store/compression.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class Uncompressed : public CompressionAlg {

static inline uint64_t numValues(uint64_t dataSize, const common::LogicalType& logicalType) {
auto numBytesPerValue = getDataTypeSizeInChunk(logicalType);
return numBytesPerValue == 0 ? 0 : dataSize / numBytesPerValue;
return numBytesPerValue == 0 ? UINT64_MAX : dataSize / numBytesPerValue;
}

inline CompressionMetadata getCompressionMetadata(
Expand Down
12 changes: 12 additions & 0 deletions test/test_files/tinysnb/update_node/create.test
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,15 @@
-STATEMENT MATCH (a:emptyTable) RETURN a.*
---- 1
2|[1,5,6]

-CASE CreateMap
-STATEMENT CREATE NODE TABLE test(name STRING, m MAP(STRING,STRING), PRIMARY KEY(name));
---- ok
-STATEMENT CREATE (t:test {name:"foo"});
---- ok
-STATEMENT CREATE (t:test {name:"foobar"});
---- ok
-STATEMENT MATCH (t:test) RETURN t.*;
---- 2
foo|
foobar|

0 comments on commit 01c5e92

Please sign in to comment.