NIFI-2622: Added support for complex types in SelectHiveQL

This closes #922.

Signed-off-by: Bryan Bende <bbende@apache.org>
This commit is contained in:
Matt Burgess 2016-08-23 11:54:09 -04:00 committed by Bryan Bende
parent 0303805c01
commit 5d1a4f343f
No known key found for this signature in database
GPG Key ID: A0DDA9ED50711C39
1 changed files with 4 additions and 0 deletions

View File

@ -55,6 +55,7 @@ import static java.sql.Types.DECIMAL;
import static java.sql.Types.DOUBLE; import static java.sql.Types.DOUBLE;
import static java.sql.Types.FLOAT; import static java.sql.Types.FLOAT;
import static java.sql.Types.INTEGER; import static java.sql.Types.INTEGER;
import static java.sql.Types.JAVA_OBJECT;
import static java.sql.Types.LONGNVARCHAR; import static java.sql.Types.LONGNVARCHAR;
import static java.sql.Types.LONGVARBINARY; import static java.sql.Types.LONGVARBINARY;
import static java.sql.Types.LONGVARCHAR; import static java.sql.Types.LONGVARCHAR;
@ -64,6 +65,7 @@ import static java.sql.Types.NVARCHAR;
import static java.sql.Types.REAL; import static java.sql.Types.REAL;
import static java.sql.Types.ROWID; import static java.sql.Types.ROWID;
import static java.sql.Types.SMALLINT; import static java.sql.Types.SMALLINT;
import static java.sql.Types.STRUCT;
import static java.sql.Types.TIME; import static java.sql.Types.TIME;
import static java.sql.Types.TIMESTAMP; import static java.sql.Types.TIMESTAMP;
import static java.sql.Types.TINYINT; import static java.sql.Types.TINYINT;
@ -211,6 +213,8 @@ public class HiveJdbcCommon {
case NVARCHAR: case NVARCHAR:
case VARCHAR: case VARCHAR:
case ARRAY: case ARRAY:
case STRUCT:
case JAVA_OBJECT:
builder.name(columnName).type().unionOf().nullBuilder().endNull().and().stringType().endUnion().noDefault(); builder.name(columnName).type().unionOf().nullBuilder().endNull().and().stringType().endUnion().noDefault();
break; break;