diff --git a/benchmark/src/main/java/com.google.cloud.bigquery/ConnImplBenchmark.java b/benchmark/src/main/java/com.google.cloud.bigquery/ConnImplBenchmark.java index 670e31ff6..eb239463f 100644 --- a/benchmark/src/main/java/com.google.cloud.bigquery/ConnImplBenchmark.java +++ b/benchmark/src/main/java/com.google.cloud.bigquery/ConnImplBenchmark.java @@ -56,9 +56,14 @@ public class ConnImplBenchmark { public void setUp() throws IOException { java.util.logging.Logger.getGlobal().setLevel(Level.ALL); - connectionSettingsReadAPIEnabled = ConnectionSettings.newBuilder().setUseReadAPI(true).build(); - connectionSettingsReadAPIDisabled = - ConnectionSettings.newBuilder().setUseReadAPI(false).build(); + connectionSettingsReadAPIEnabled = ConnectionSettings.newBuilder() + .setUseReadAPI(true) + .setMaxResults(500L) + .setJobTimeoutMs(Long.MAX_VALUE) + .build(); + connectionSettingsReadAPIDisabled = ConnectionSettings.newBuilder() + .setUseReadAPI(false) + .build(); } @Benchmark @@ -153,8 +158,8 @@ private long getResultHash(BigQueryResult bigQueryResultSet) throws SQLException System.out.println("\n Running"); while (rs.next()) { hash += computeHash(rs, "vendor_id", ResultSet::getString); - hash += computeHash(rs, "pickup_datetime", ResultSet::getString); - hash += computeHash(rs, "dropoff_datetime", ResultSet::getString); + hash += computeHash(rs, "pickup_datetime", ResultSet::getLong); + hash += computeHash(rs, "dropoff_datetime", ResultSet::getLong); hash += computeHash(rs, "passenger_count", ResultSet::getLong); hash += computeHash(rs, "trip_distance", ResultSet::getDouble); hash += computeHash(rs, "rate_code", ResultSet::getString);