Skip to content

Commit

Permalink
Update ClickHouseTestHelpers.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Paultagoras committed Feb 4, 2025
1 parent 0e1c47b commit 7532f2d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public static OperationMetrics optimizeTable(ClickHouseHelperClient chc, String
}

public static int countRows(ClickHouseHelperClient chc, String tableName) {
String queryCount = String.format("SELECT COUNT(*) FROM `%s`", tableName);
String queryCount = String.format("SELECT COUNT(*) FROM `%s` SETTINGS select_sequential_consistency = 1", tableName);

try {
optimizeTable(chc, tableName);
Expand Down Expand Up @@ -212,7 +212,7 @@ public static int sumRows(ClickHouseHelperClient chc, String tableName, String c
}

public static int countRowsWithEmojis(ClickHouseHelperClient chc, String tableName) {
String queryCount = "SELECT COUNT(*) FROM `" + tableName + "` WHERE str LIKE '%\uD83D\uDE00%'";
String queryCount = "SELECT COUNT(*) FROM `" + tableName + "` WHERE str LIKE '%\uD83D\uDE00%' SETTINGS select_sequential_consistency = 1";
try {
Records records = chc.getClient().queryRecords(queryCount).get(CLOUD_TIMEOUT_VALUE, CLOUD_TIMEOUT_UNIT);
String value = records.iterator().next().getString(1);
Expand Down

0 comments on commit 7532f2d

Please sign in to comment.