You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could you please explain if I run the query:
DB::connection('clickhouse')->select(raw('select count(*) as summary from table'));
I get the result like this
array:1 [
0 => array:1 [
"summary" => "4309900"
]
]
Why "summary" get "4309900" as string, not a number ?
The text was updated successfully, but these errors were encountered:
It's the way clickhouse sends data in JSON format. You could repeat your query with the format section added in clickhouse-client, and you'll see the same result.
To be fair, clickhouse now sends additional meta information with the types for the returned values (not sure it was so before), and we could implement casting of these values. But this feature is currently not implemented in the library, and no one thought about it.
Could you please explain if I run the query:
DB::connection('clickhouse')->select(raw('select count(*) as summary from table'));
I get the result like this
array:1 [
0 => array:1 [
"summary" => "4309900"
]
]
Why "summary" get "4309900" as string, not a number ?
The text was updated successfully, but these errors were encountered: