You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by al...@apache.org on 2016/10/21 19:58:48 UTC
[03/27] nifi git commit: NIFI-2897: Fixed SelectHiveQL for CSV output
of complex types
NIFI-2897: Fixed SelectHiveQL for CSV output of complex types
This closes #1132
Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/b52b8398
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/b52b8398
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/b52b8398
Branch: refs/heads/appveyor-improvement
Commit: b52b8398957dcb60b93ea5f697f45d3e0e212082
Parents: 88d1251
Author: Matt Burgess <ma...@apache.org>
Authored: Thu Oct 13 13:27:49 2016 -0400
Committer: Oleg Zhurakousky <ol...@suitcase.io>
Committed: Fri Oct 14 12:35:38 2016 -0400
----------------------------------------------------------------------
.../java/org/apache/nifi/util/hive/HiveJdbcCommon.java | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi/blob/b52b8398/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/main/java/org/apache/nifi/util/hive/HiveJdbcCommon.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/main/java/org/apache/nifi/util/hive/HiveJdbcCommon.java b/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/main/java/org/apache/nifi/util/hive/HiveJdbcCommon.java
index d4b2945..689baf9 100644
--- a/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/main/java/org/apache/nifi/util/hive/HiveJdbcCommon.java
+++ b/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/main/java/org/apache/nifi/util/hive/HiveJdbcCommon.java
@@ -339,6 +339,16 @@ public class HiveJdbcCommon {
rowValues.add("");
}
break;
+ case ARRAY:
+ case STRUCT:
+ case JAVA_OBJECT:
+ String complexValueString = rs.getString(i);
+ if (complexValueString != null) {
+ rowValues.add(StringEscapeUtils.escapeCsv(complexValueString));
+ } else {
+ rowValues.add("");
+ }
+ break;
default:
if (value != null) {
rowValues.add(value.toString());