Github user jinfengni commented on a diff in the pull request:
https://github.com/apache/drill/pull/546#discussion_r71760001
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/flatten/FlattenRecordBatch.java
---
@@ -267,10 +276,21 @@ private TransferPair
getFlattenFieldTransferPair(FieldReference reference) {
if (flattenField instanceof RepeatedMapVector) {
tp =
((RepeatedMapVector)flattenField).getTransferPairToSingleMap(reference.getAsNamePart().getName(),
oContext.getAllocator());
} else {
- final ValueVector vvIn =
RepeatedValueVector.class.cast(flattenField).getDataVector();
- // vvIn may be null because of fast schema return for repeated list
vectors
- if (vvIn != null) {
- tp = vvIn.getTransferPair(reference.getAsNamePart().getName(),
oContext.getAllocator());
+ try {
+ final ValueVector vvIn =
RepeatedValueVector.class.cast(flattenField).getDataVector();
+ // vvIn may be null because of fast schema return for repeated
list vectors
+ if (vvIn != null) {
+ tp = vvIn.getTransferPair(reference.getAsNamePart().getName(),
oContext.getAllocator());
+ }
+ } catch(ClassCastException ex) {
--- End diff --
We can apply similar changes above here ( catch ClassCastException ->
instancOf check), also, logger same message.
---
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.
---