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

use setLong instead of setInt #428

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ private void writeFilterTypes(final Config config) {
}
final String sql = "INSERT IGNORE INTO `filtertype` (`expectedElements`, `targetFpp`, `pattern`) VALUES (?, ?, ?)";
try (final PreparedStatement stmt = connection.prepareStatement(sql)) {
stmt.setInt(1, entry.getKey().intValue()); // filtertype.expectedElements
stmt.setLong(1, entry.getKey()); // filtertype.expectedElements
stmt.setDouble(2, entry.getValue()); // filtertype.targetFpp
stmt.setString(3, pattern); // filtertype.pattern
stmt.executeUpdate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ public void saveFilter(final Boolean overwrite) {
);
filter.writeTo(baos);
InputStream is = new ByteArrayInputStream(baos.toByteArray());
stmt.setInt(1, Integer.parseInt(partitionID)); // bloomfilter.partition_id
stmt.setInt(2, (int) selectedExpectedNumOfItems); // filtertype.expectedElements
stmt.setLong(1, Long.parseLong(partitionID)); // bloomfilter.partition_id
stmt.setLong(2, selectedExpectedNumOfItems); // filtertype.expectedElements
stmt.setDouble(3, selectedFpp); // filtertype.targetFpp
stmt.setString(4, pattern); // filtertype.pattern
stmt.setBlob(5, is); // bloomfilter.filter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,6 @@ private Row generatedRow(SortedMap<Long, Double> filterMap, List<String> tokens)
Assertions.assertDoesNotThrow(() -> {
bf.writeTo(baos);
});
return RowFactory.create("1", baos.toByteArray());
return RowFactory.create("9999999999", baos.toByteArray());
}
}