Open howiezhao opened 1 year ago
when the key is int and it is greater than 10, the serialize will occur error.
> x= { [11]="a"} return (require "cjson.safe").encode(x)
nil Cannot serialise table: excessively sparse array
> x= { [10]="a"} return (require "cjson.safe").encode(x)
[null,null,null,null,null,null,null,null,null,"a"]
On my ARM machine (M1 MacBook Pro), when I call the
execute
(such asSELECT * FROM test;
) function, it returns me anunserializable table
. On x86 machines, it can return a serializable table.After my investigation, if there is a column in my Cassandra table schema that is of
map<timestamp, text>
ormap<timestamp, int>
type, it will not be serialized on ARM, but it will be normal on x86.I found that on an x86 machine, it can convert a number key to a string type, but on an arm machine, it cannot, which may be the reason why the table cannot be serialized.
How can I find out the real reason? Any suggestions? grateful.