Skip to content

Commit 1d51971

Browse files
committed
If hive returns errors, the values can be undef
1 parent 0bf6f57 commit 1d51971

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/Thrift/API/HiveClient2.pm

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,12 @@ sub execute {
325325

326326
my $idx = 0;
327327
push @$result,
328-
[ map { $row->{colVals}[ $idx++ ]{$_}->value() } @{ $column_keys->{$rv} } ];
328+
[
329+
map { $_->value }
330+
grep { defined $_ }
331+
map { $row->{colVals}[ $idx++ ]{$_} }
332+
@{ $column_keys->{$rv} }
333+
];
329334
}
330335
}
331336
return wantarray ? ( $result, $has_more_rows ) : ( @$result ? $result : undef );

0 commit comments

Comments
 (0)