[ 
https://issues.apache.org/jira/browse/DRILL-7305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16879740#comment-16879740
 ] 

Paul Rogers commented on DRILL-7305:
------------------------------------

As it turns out, the [Union 
All|https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/union/UnionAllRecordBatch.java#L92]
 operator generates an empty schema-only batch as its first step.

This puts us in an awkward position: one the one hand, the new scan operator 
will back out the schema-only batch feature because some operators do not 
support an empty batch. But, meanwhile, the Union All operator creates such 
batches.

It may be that working around the empty-batch issues is, at best, a short-term 
hack. Work must be done to test each operator to ensure it handles empty 
batches so that the Union All operator output is properly handled.

> Multiple operators do not handle empty batches
> ----------------------------------------------
>
>                 Key: DRILL-7305
>                 URL: https://issues.apache.org/jira/browse/DRILL-7305
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.16.0
>            Reporter: Paul Rogers
>            Priority: Major
>
> While testing the new "EVF" framework, it was found that multiple operators 
> incorrectly handle empty batches. The EVF framework is set up to return a 
> "fast schema" empty batch with only schema as its first batch. It turns out 
> that many operators fail with problems such as:
> * Failure to set the value counts in the output container
> * Fail to initialize the offset vector position 0 to 0 for variable-width or 
> repeated vectors
> And so on.
> Partial fixes are in the JSON reader PR.
> For now, the easiest work-around is to disable the "fast schema" path in the 
> EVF: DRILL-7306.
> To discover the remaining issues, enable the 
> {{ScanOrchestratorBuilder.enableSchemaBatch}} option and run unit tests. You 
> can use the {{VectorChecker}} and {{VectorAccessorUtilities.verify()}} 
> methods to check state. Insert a call to {{verify()}} in each "next" method: 
> verify the incoming and outgoing batches. The checker only verifies a few 
> vector types; but these are enough to show many problems.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to