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
So this is what's actually stored in the database:
Query id: 2c4bffc3-42ce-4aca-8739-0276271532de ┌─name───────────────┐ │ decimal_table_test │ └────────────────────┘ 1 row in set. Elapsed: 0.003 sec. f0c582c28b28 :) SELECT COUNT(*) FROM decimal_table_test SELECT COUNT(*) FROM decimal_table_test Query id: b90d9653-038a-447d-abeb-1b851f00b575 ┌─count()─┐ │ 1000 │ └─────────┘ 1 row in set. Elapsed: 0.004 sec.
This is what I'm getting back: 16718206241729413120
This is the code we're using to get that:
public static int countRows(ClickHouseHelperClient chc, String tableName) { String queryCount = String.format("SELECT COUNT(*) FROM `%s`", tableName); try { Records records = chc.getClient().queryRecords(queryCount).get(10, TimeUnit.SECONDS); // Note we probrbly need asInteger() here String value = records.iterator().next().getString(1); return Integer.parseInt(value); } catch (InterruptedException e) { throw new RuntimeException(e); } catch (ExecutionException e) { throw new RuntimeException(e); } catch (Exception e) { throw new RuntimeException(e); } }
The text was updated successfully, but these errors were encountered:
16718206241729413120 is 1000 but in 64-bit but the wrong endianness (0xe803000000000000 vs 0x00000000000003e8) in case that helps.
Sorry, something went wrong.
Paultagoras
Successfully merging a pull request may close this issue.
So this is what's actually stored in the database:
This is what I'm getting back: 16718206241729413120
This is the code we're using to get that:
The text was updated successfully, but these errors were encountered: