Return-Path: X-Original-To: apmail-nifi-commits-archive@minotaur.apache.org Delivered-To: apmail-nifi-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 72D1A187FD for ; Thu, 1 Oct 2015 07:34:04 +0000 (UTC) Received: (qmail 3034 invoked by uid 500); 1 Oct 2015 07:34:04 -0000 Delivered-To: apmail-nifi-commits-archive@nifi.apache.org Received: (qmail 3000 invoked by uid 500); 1 Oct 2015 07:34:04 -0000 Mailing-List: contact commits-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list commits@nifi.apache.org Received: (qmail 2990 invoked by uid 99); 1 Oct 2015 07:34:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Oct 2015 07:34:04 +0000 Date: Thu, 1 Oct 2015 07:34:04 +0000 (UTC) From: "Toivo Adams (JIRA)" To: commits@nifi.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (NIFI-1011) ExecuteSQL does not support Binary, VarBinary or LongVarBinary data types. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/NIFI-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14939443#comment-14939443 ] Toivo Adams commented on NIFI-1011: ----------------------------------- >From nifi-users mailing list 19 september From Mark Payne Subject Re: ExecuteSQL Processor / ArrayIndexOutOfBounds Exception Date Sat, 19 Sep 2015 00:23:28 GMT Toivo, I think for VARBINARY, LONGVARBINARY, ARRAY, BLOB, and CLOB, I would use an Avro Bytes type. Basically, anything that could be serialized into a byte array i'd use a bytes type. Otherwise, I'd probably just either fail or skip that column. Not sure what else we can really do with this, at this point. I have an instance of MySQL that I should be able to try this against at some point in the next few days. Thanks -Mark > On Sep 18, 2015, at 11:39 AM, Toivo Adams wrote: > > Hi Jonathan, > > It should not be tinyint, because such type is present in mapping code. > I assume MySQL tinyint corresponds to JDBC java.sql.Types > public final static int TINYINT = -6; > > I don't have MySQL so can't test directly. > > Your table definition looks OK, nothing unusual and exotic. > So hard to predict which type is culprit. > > But ExecuteSQL needs some modifications anyway > because currently it does not recognize some rarely used types. > > For example VARBINARY, LONGVARBINARY, OTHER, JAVA_OBJECT, ARRAY, BLOB, CLOB, etc. > > How ExecuteSQL should handle type's which can't directly converted to Avro types? > > 1. Always try to convert to String type? (we already convert some types to String) > 2. Throw error? > 3. what else...? > ExecuteSQL does not support Binary, VarBinary or LongVarBinary data types. > -------------------------------------------------------------------------- > > Key: NIFI-1011 > URL: https://issues.apache.org/jira/browse/NIFI-1011 > Project: Apache NiFi > Issue Type: Improvement > Components: Extensions > Affects Versions: 0.3.0 > Environment: All > Reporter: Scott > > When trying to get a VarBinary or Binary column there is an ArrayIndexOutOfRangeException thrown. This is because in / nifi-nar-bundles / nifi-standard-bundle / nifi-standard-processors / src / main / java / org / apache / nifi / processors / standard / util / JdbcCommon.java the data types are not supported. > I suggest adding them as Base64 encoded strings. -- This message was sent by Atlassian JIRA (v6.3.4#6332)