We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I was testing out the map type with the following configuration:
CREATE TABLE map_text_boolean_table ( id INT64 NOT NULL, val JSON ) PRIMARY KEY(id); CREATE TABLE map_text_text_table ( id INT64 NOT NULL, val JSON ) PRIMARY KEY(id); CREATE TABLE map_text_timestamp_table ( id INT64 NOT NULL, val JSON ) PRIMARY KEY(id); -- map_text_boolean_table INSERT INTO TableConfigurations (KeySpaceName, TableName, ColumnName, ColumnType, IsPrimaryKey, PK_Precedence) VALUES ('testkeyspace', 'map_text_boolean_table', 'id', 'int', TRUE, 1); INSERT INTO TableConfigurations (KeySpaceName, TableName, ColumnName, ColumnType, IsPrimaryKey, PK_Precedence) VALUES ('testkeyspace', 'map_text_boolean_table', 'val', 'map<text, boolean>', FALSE, 0); -- map_text_text_table INSERT INTO TableConfigurations (KeySpaceName, TableName, ColumnName, ColumnType, IsPrimaryKey, PK_Precedence) VALUES ('testkeyspace', 'map_text_text_table', 'id', 'int', TRUE, 1); INSERT INTO TableConfigurations (KeySpaceName, TableName, ColumnName, ColumnType, IsPrimaryKey, PK_Precedence) VALUES ('testkeyspace', 'map_text_text_table', 'val', 'map<text, text>', FALSE, 0); -- map_text_timestamp_table INSERT INTO TableConfigurations (KeySpaceName, TableName, ColumnName, ColumnType, IsPrimaryKey, PK_Precedence) VALUES ('testkeyspace', 'map_text_timestamp_table', 'id', 'int', TRUE, 1); INSERT INTO TableConfigurations (KeySpaceName, TableName, ColumnName, ColumnType, IsPrimaryKey, PK_Precedence) VALUES ('testkeyspace', 'map_text_timestamp_table', 'val', 'map<text, timestamp>', FALSE, 0);
I ran into the following issues:
map<text, boolean> : corrupted value
cqlsh:testkeyspace> INSERT INTO map_text_boolean_table (id, val) VALUES (1, {'key1': TRUE, 'key2': FALSE}); cqlsh:testkeyspace> SELECT * FROM map_text_boolean_table; id | val ----+----------------- 1 | {'key1': False} (1 rows)
map<text, text> : read failure, spanner val seems corrupted {"key1":"value1,key2:value2"}
{"key1":"value1,key2:value2"}
cqlsh:testkeyspace> INSERT INTO map_text_text_table (id, val) VALUES (1, {'key1': 'value1', 'key2': 'value2'}); cqlsh:testkeyspace> select * from map_text_text_table; InvalidRequest: Error from server: code=2200 [Invalid query] message="error while encoding data - error deserializing JSON to map[string]string: invalid character '<' looking for beginning of value, 1, {fields: [name:"id" type:{code:INT64} name:"val" type:{code:JSON}], values: [string_value:"2" null_value:NULL_VALUE]} "
map<text, timestamp> : read failure, spanner val seems correct {"key1":"2025-02-06T10:00:00Z"}
{"key1":"2025-02-06T10:00:00Z"}
INSERT INTO map_text_timestamp_table (id, val) VALUES (1, {'key1': '2025-02-06T10:00:00Z'}); cqlsh:testkeyspace> SELECT * FROM map_text_timestamp_table; InvalidRequest: Error from server: code=2200 [Invalid query] message="error while encoding data - error deserializing JSON to map[string]time.Time: invalid character '<' looking for beginning of value, 1, {fields: [name:"id" type:{code:INT64} name:"val" type:{code:JSON}], values: [string_value:"2" null_value:NULL_VALUE]} "
The text was updated successfully, but these errors were encountered:
Update: These types work correctly for prepared statements. These only seem to be occuring on CQLSH
Sorry, something went wrong.
No branches or pull requests
I was testing out the map type with the following configuration:
I ran into the following issues:
map<text, boolean> : corrupted value
map<text, text> : read failure, spanner val seems corrupted
{"key1":"value1,key2:value2"}
map<text, timestamp> : read failure, spanner val seems correct
{"key1":"2025-02-06T10:00:00Z"}
The text was updated successfully, but these errors were encountered: