Skip to content
New issue

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

client:execute function returns unserializable table #151

Open
howiezhao opened this issue Apr 11, 2023 · 1 comment
Open

client:execute function returns unserializable table #151

howiezhao opened this issue Apr 11, 2023 · 1 comment

Comments

@howiezhao
Copy link

howiezhao commented Apr 11, 2023

On my ARM machine (M1 MacBook Pro), when I call the execute (such as SELECT * FROM test;) function, it returns me an unserializable 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> or map<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.

@ximouzhao
Copy link

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"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants