Github user paul-rogers commented on a diff in the pull request:
https://github.com/apache/drill/pull/1090#discussion_r164021818
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/record/selection/SelectionVector4.java
---
@@ -31,8 +31,9 @@
private int length;
public SelectionVector4(ByteBuf vector, int recordCount, int
batchRecordCount) throws SchemaChangeException {
- if (recordCount > Integer.MAX_VALUE /4) {
- throw new SchemaChangeException(String.format("Currently, Drill can
only support allocations up to 2gb in size. You requested an allocation of %d
bytes.", recordCount * 4));
+ if (recordCount > Integer.MAX_VALUE / 4) {
+ throw new SchemaChangeException(String.format("Currently, Drill can
only support allocations up to 2gb in size. " +
+ "You requested an allocation of %d bytes.", recordCount * 4));
--- End diff --
Sounds like two issues.
First, while I pointed out opportunities for improvement in the code to be
consistent with work elsewhere, the code as it is has worked for the last two
years.
Second, if it helps to move this PR ahead for @ilooner, I can back out the
formatting changes to this file so that it drops out of the PR. That said, our
general policy has been to include code cleanup within other commits rather
than incurring the cost and delay of doing two commits for each bit of work
(one for code cleanup, another for substantive changes.)
Besides this issue, anything else needed?
---