[ 
https://issues.apache.org/jira/browse/HAWQ-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oleksandr Diachenko resolved HAWQ-1461.
---------------------------------------
    Resolution: Fixed

> Improve partition parameters validation for PXF-JDBC plugin
> -----------------------------------------------------------
>
>                 Key: HAWQ-1461
>                 URL: https://issues.apache.org/jira/browse/HAWQ-1461
>             Project: Apache HAWQ
>          Issue Type: Improvement
>          Components: PXF
>            Reporter: Oleksandr Diachenko
>            Assignee: Lav Jain
>             Fix For: 2.3.0.0-incubating
>
>
> h3. User didn't pass interval type:
> {code}
> CREATE EXTERNAL TABLE pxf_jdbc_multiple_fragments_by_date (t1    text, t2    
> text, num1  int, dub1  double precision, dec1  numeric, tm timestamp, r real, 
> bg bigint, b boolean, tn smallint, sml smallint, dt date, vc1 varchar(5), c1 
> char(3), bin bytea) LOCATION 
> (E'pxf://127.0.0.1:51200/hawq_types?PROFILE=Jdbc&JDBC_DRIVER=org.postgresql.Driver&DB_URL=jdbc:postgresql:pxfautomation//localhost:5432&PARTITION_BY=dt:date&RANGE=2015-03-06:2015-03-20&INTERVAL=1&USER=adiachenko')
>  FORMAT 'CUSTOM' (formatter='pxfwritable_import');
> {code}
> Actual behavior:
> {code}
> select * from pxf_jdbc_multiple_fragments_by_date;
> ERROR:  remote component error (500) from '127.0.0.1:51200':  type  Exception 
> report   message       description   The server encountered an internal error 
> that prevented it from fulfilling this request.    exception   
> java.lang.NullPointerException (libchurl.c:897)
> {code}
> h3. User didn't pass interval:
> {code}
> CREATE EXTERNAL TABLE pxf_jdbc_multiple_fragments_by_date (t1    text, t2    
> text, num1  int, dub1  double precision, dec1  numeric, tm timestamp, r real, 
> bg bigint, b boolean, tn smallint, sml smallint, dt date, vc1 varchar(5), c1 
> char(3), bin bytea) LOCATION 
> (E'pxf://127.0.0.1:51200/hawq_types?PROFILE=Jdbc&JDBC_DRIVER=org.postgresql.Driver&DB_URL=jdbc:postgresql:pxfautomation//localhost:5432&PARTITION_BY=dt:date&RANGE=2015-03-06:2015-03-20&USER=adiachenko')
>  FORMAT 'CUSTOM' (formatter='pxfwritable_import');
> {code}
> Actual behavior:
> {code}
> ERROR:  remote component error (500) from '127.0.0.1:51200':  type  Exception 
> report   message       description   The server encountered an internal error 
> that prevented it from fulfilling this request.    exception   
> java.lang.NullPointerException (libchurl.c:897)
> {code}
> h3. User didn't pass the upper boundary of a range:
> {code}
> CREATE EXTERNAL TABLE pxf_jdbc_multiple_fragments_by_date (t1    text, t2    
> text, num1  int, dub1  double precision, dec1  numeric, tm timestamp, r real, 
> bg bigint, b boolean, tn smallint, sml smallint, dt date, vc1 varchar(5), c1 
> char(3), bin bytea) LOCATION 
> (E'pxf://127.0.0.1:51200/hawq_types?PROFILE=Jdbc&JDBC_DRIVER=org.postgresql.Driver&DB_URL=jdbc:postgresql:pxfautomation//localhost:5432&PARTITION_BY=dt:date&RANGE=2015-03-06:&INTERVAL=1:DAY&USER=adiachenko')
>  FORMAT 'CUSTOM' (formatter='pxfwritable_import');
> {code}
> Actual behavior:
> {code}
> select * from pxf_jdbc_multiple_fragments_by_date;
> ERROR:  remote component error (500) from '127.0.0.1:51200':  type  Exception 
> report   message   java.lang.Exception: 
> java.lang.ArrayIndexOutOfBoundsException: 1    description   The server 
> encountered an internal error that prevented it from fulfilling this request. 
>    exception   javax.servlet.ServletException: java.lang.Exception: 
> java.lang.ArrayIndexOutOfBoundsException: 1 (libchurl.c:897)
> {code}
> h3. User didn't pass range:
> {code}
> CREATE EXTERNAL TABLE pxf_jdbc_multiple_fragments_by_date (t1    text, t2    
> text, num1  int, dub1  double precision, dec1  numeric, tm timestamp, r real, 
> bg bigint, b boolean, tn smallint, sml smallint, dt date, vc1 varchar(5), c1 
> char(3), bin bytea) LOCATION 
> (E'pxf://127.0.0.1:51200/hawq_types?PROFILE=Jdbc&JDBC_DRIVER=org.postgresql.Driver&DB_URL=jdbc:postgresql:pxfautomation//localhost:5432&PARTITION_BY=dt:date&INTERVAL=1:DAY&USER=adiachenko')
>  FORMAT 'CUSTOM' (formatter='pxfwritable_import');
> {code}
> Actual behavior:
> {code}
> select * from pxf_jdbc_multiple_fragments_by_date;
> ERROR:  remote component error (500) from '127.0.0.1:51200':  type  Exception 
> report   message   java.lang.Exception: java.lang.NullPointerException    
> description   The server encountered an internal error that prevented it from 
> fulfilling this request.    exception   javax.servlet.ServletException: 
> java.lang.Exception: java.lang.NullPointerException (libchurl.c:897)
> {code}
> Expected behavior fro all cases: user-friendly meaningful message, hinting to 
> a user which parameter is missing/incorrect.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to