Github user jinfengni commented on a diff in the pull request:
https://github.com/apache/drill/pull/584#discussion_r84831079
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/validate/IteratorValidatorBatchIterator.java
---
@@ -301,7 +301,7 @@ public IterOutcome next() {
"Incoming batch [#%d, %s] has an empty schema. This is
not allowed.",
instNum, batchTypeName));
}
- if (incoming.getRecordCount() > MAX_BATCH_SIZE) {
+ if (incoming.getRecordCount() >= MAX_BATCH_SIZE) {
--- End diff --
Drill requires that batch with no selection vector(SV), and batch with SV2
is bounded by 65536. This requirement is valid across the entire Drill code
base. What this IteratorVAlidator tries to enforce is to make sure every
incoming batch meet this requirement, when assertion is enabled. However, it's
each operator's responsibility to enforce this. For instance, as you saw, each
reader in Drill should produce a batch no larger than 65536. If you develop a
new storage plugin with a new reader, then the new reader should enforce this
rule as well.
Therefore, in your situation where you develop a new reader, the right
approach is that you need make sure reader produces batch no larger than this
threshold.
The original code IteratorValidatorBatchIterator.java should be fine. For
the repo I tried, I feel the fix should be in LimitRecordBatch.java. As you
indicated earlier, the index "i" is defined as char, which is not right.
Would you like to modify your patch ?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---