[
https://issues.apache.org/jira/browse/NIFI-2623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15432876#comment-15432876
]
ASF GitHub Bot commented on NIFI-2623:
--------------------------------------
GitHub user mattyb149 opened a pull request:
https://github.com/apache/nifi/pull/920
NIFI-2623: Fixed support for binary types in SelectHiveQL
This code was originally copied from JdbcCommon, where arrays are treated
as binary (byte array, e.g.) and getBytes() is called on the ResultSet.
In Hive, getBytes() is not supported but binary objects are already byte
arrays or ByteBuffers, so they just need to be put into the Avro record as-is.
Arrays were removed from the binary type processing because they are a
first-class (albeit complex) data type in Hive. As of this PR they will be
handled as Strings, but
[NIFI-2622](https://issues.apache.org/jira/browse/NIFI-2622) describes and
prescribes the changes needed to correctly handle arrays.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mattyb149/nifi NIFI-2623
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/nifi/pull/920.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #920
----
commit 83aac5bb098a59b9a9eb971d521296b2eea801ee
Author: Matt Burgess <[email protected]>
Date: 2016-08-23T14:17:14Z
NIFI-2623: Fixed support for binary types in SelectHiveQL
----
> SelectHiveQL with Avro output doesn't handle binary types
> ---------------------------------------------------------
>
> Key: NIFI-2623
> URL: https://issues.apache.org/jira/browse/NIFI-2623
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Reporter: Matt Burgess
> Assignee: Matt Burgess
> Fix For: 1.1.0
>
>
> SelectHiveQL, when specifying Avro output, and having columns of binary
> types, throws an error when run.
> The error is a SQLException with text "Method not supported". This is coming
> from the Hive driver because HiveJdbcCommon is calling getBytes() on the
> ResultSet, and that method has not been implemented in the driver (HIVE-7134).
> It may be possible to use getObject() and convert it into a byte array or
> ByteBuffer (if it is not already) for storage into an Avro record.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)