You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by mattyb149 <gi...@git.apache.org> on 2018/11/27 23:36:10 UTC

[GitHub] nifi pull request #3184: NIFI-5845: Add support for OTHER and SQLXML JDBC ty...

GitHub user mattyb149 opened a pull request:

    https://github.com/apache/nifi/pull/3184

    NIFI-5845: Add support for OTHER and SQLXML JDBC types to SQL/Hive processors

    Thank you for submitting a contribution to Apache NiFi.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [x] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [x] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [x] Has your PR been rebased against the latest commit within the target branch (typically master)?
    
    - [x] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [x] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
    - [ ] Have you written or updated unit tests to verify your changes?
    - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? 
    - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
    - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
    - [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?
    
    ### For documentation related changes:
    - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mattyb149/nifi NIFI-5845

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/3184.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 #3184
    
----
commit a8009f9a0010b99703713a38263006a7a9e5f5d5
Author: Matthew Burgess <ma...@...>
Date:   2018-11-27T23:35:29Z

    NIFI-5845: Add support for OTHER and SQLXML JDBC types to SQL/Hive processors

----


---

[GitHub] nifi issue #3184: NIFI-5845: Add support for OTHER and SQLXML JDBC types to ...

Posted by ijokarumawak <gi...@git.apache.org>.
Github user ijokarumawak commented on the issue:

    https://github.com/apache/nifi/pull/3184
  
    LGTM +1. Merging. Thanks @mattyb149!


---

[GitHub] nifi pull request #3184: NIFI-5845: Add support for OTHER and SQLXML JDBC ty...

Posted by mattyb149 <gi...@git.apache.org>.
Github user mattyb149 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/3184#discussion_r237101820
  
    --- Diff: nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/src/main/java/org/apache/nifi/util/hive/HiveJdbcCommon.java ---
    @@ -402,6 +409,9 @@ public static long convertToCsvStream(final ResultSet rs, final OutputStream out
                                 rowValues.add("");
                             }
                             break;
    +                    case SQLXML:
    +                        rowValues.add(StringEscapeUtils.escapeCsv(((java.sql.SQLXML) value).getString()));
    --- End diff --
    
    Yep missed that (nulls are handled earlier in the Avro code, but individually in the CSV code), will add both, good catch! I had tested with nulls but only for Avro output.


---

[GitHub] nifi pull request #3184: NIFI-5845: Add support for OTHER and SQLXML JDBC ty...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/nifi/pull/3184


---

[GitHub] nifi pull request #3184: NIFI-5845: Add support for OTHER and SQLXML JDBC ty...

Posted by ijokarumawak <gi...@git.apache.org>.
Github user ijokarumawak commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/3184#discussion_r236940096
  
    --- Diff: nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/main/java/org/apache/nifi/util/hive/HiveJdbcCommon.java ---
    @@ -402,6 +409,9 @@ public static long convertToCsvStream(final ResultSet rs, final OutputStream out
                                 rowValues.add("");
                             }
                             break;
    +                    case SQLXML:
    +                        rowValues.add(StringEscapeUtils.escapeCsv(((SQLXML) value).getString()));
    --- End diff --
    
    Shouldn't we take care of null `value` here?


---

[GitHub] nifi pull request #3184: NIFI-5845: Add support for OTHER and SQLXML JDBC ty...

Posted by ijokarumawak <gi...@git.apache.org>.
Github user ijokarumawak commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/3184#discussion_r236940080
  
    --- Diff: nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/src/main/java/org/apache/nifi/util/hive/HiveJdbcCommon.java ---
    @@ -402,6 +409,9 @@ public static long convertToCsvStream(final ResultSet rs, final OutputStream out
                                 rowValues.add("");
                             }
                             break;
    +                    case SQLXML:
    +                        rowValues.add(StringEscapeUtils.escapeCsv(((java.sql.SQLXML) value).getString()));
    --- End diff --
    
    Shouldn't we take care of null `value` here, too?


---