See bottom for the only stacktrace I can get at, once I hit 
org.apache.calcite.avatica.AvaticaSqlException I can no longer step down the 
backtrace as it's just a loop.

To do a Unit test I would presumably have to be able to compile hbase,  that's 
a fairly protracted process and then a fix would have to ripple up all the way 
to AWS EMR version, which I'm guessing would be months away.

I'm not ducking the work, I would be interested in doing whatever I can to help 
the fix process. I'm just reading through the build instructions and panicking 
slightly. This would be my first open source contribution so I'm sure there 
will be bumps in the road.

Cheers

S


Caused by: org.apache.calcite.avatica.AvaticaSqlException: Error -1 (00000) : 
Error while executing SQL "
some sql goes here": Remote driver error: RuntimeException: 
java.sql.SQLException: java.lang.reflect.InvocationTargetException -> 
SQLException: java.lang.reflect.InvocationTargetException -> 
InvocationTargetException: (null exception message) -> NullPointerException: 
(null exception message)
at org.apache.calcite.avatica.Helper.createException(Helper.java:54)
at org.apache.calcite.avatica.Helper.createException(Helper.java:41)
at 
org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:163)
at 
org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:227)
at 
org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:439)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:376)
... 11 more
________________________________
From: Josh Elser <els...@apache.org>
Sent: 04 August 2020 10:54 AM
To: user@phoenix.apache.org <user@phoenix.apache.org>
Subject: Re: Unable to use some functions on DECIMAL columns

Any stacktrace? An error message on its own isn't too helpful (as it
could come from any number of places).

We have lots of unit tests in the project. Ideally, a unit test which
illustrates the error is the best way for someone to start poking at the
problem. Figuring out if it's a problem unique to the thin-client or if
it affects both the thin-client and thick-client is important.

On 7/31/20 9:10 PM, Simon Mottram wrote:
> Hi Josh
>
> Thanks very much for the reply, I did share the error at the top of the
> email
>
> SQL Error [00000]: Error -1 (00000) : Error while executing SQL "ESELECT
> PERCENTILE_DISC (0.5) WITHIN GROUP (ORDER BY DECIMALCOLUMN ASC) FROM
> TEST.TESTEXCEPTIONS": Remote driver error:
> ArrayIndexOutOfBoundsException: (null exception message)
>
> There's a few SQL statements to reliably reproduce the error, I thought
> that would be enough but I'm very open to providing any assistance I
> can.  What further info would be helpful?
>
> Cheers
>
> S
> ------------------------------------------------------------------------
> *From:* Josh Elser <els...@apache.org>
> *Sent:* 01 August 2020 2:26 AM
> *To:* user@phoenix.apache.org <user@phoenix.apache.org>
> *Subject:* Re: Unable to use some functions on DECIMAL columns
> Simon,
>
> If you have clear bug report, please open up a Jira issue for it. Keep
> in mind that as much information as you can provide to indicate the
> problem you see, the better. Assume that whoever might read your Jira
> issue is coming from zero-context. Right now, you haven't shared any
> error, so you're expecting a bit from someone to both help you by first
> reproducing the code you've shared, analyze if an error is expected, and
> then fix it.
>
> Ideally, you can submit a patch to try to fix the issues you're seeing ;)
>
> On 7/29/20 10:18 PM, Simon Mottram wrote:
>>
>> If you try the queries marked with BUG below, you get an exception
>>
>> SQL Error [00000]: Error -1 (00000) : Error while executing SQL "ESELECT
>> PERCENTILE_DISC (0.5) WITHIN GROUP (ORDER BY DECIMALCOLUMN ASC) FROM
>> TEST.TESTEXCEPTIONS": Remote driver error:
>> ArrayIndexOutOfBoundsException: (null exception message)
>>
>> As far as I can tell I am using the functions correctly.
>>
>> Best Regards
>>
>> Simon
>>
>> To reproduce:
>>
>> Using HBase
>> HBASE_VERSION=2.0.0
>> HBASE_MINOR_VERSION=2.0
>> PHOENIX_VERSION=5.0.0
>>
>> Connecting using thin client: phoenix-5.0.0-HBase-2.0-thin-client.jar
>>
>> NOTE: We can't use thick client as I haven't resolved issues connecting
>> my API which runs inside docker.  That's another story.
>>
>> CREATE TABLE IF NOT EXISTS TEST.TESTEXCEPTIONS ( KEYCOL VARCHAR NOT NULL
>> PRIMARY KEY, INTEGERCOLUMN INTEGER , DECIMALCOLUMN DECIMAL);
>>
>> UPSERT INTO TEST.TESTEXCEPTIONS(KEYCOL, INTEGERCOLUMN, DECIMALCOLUMN)
>> VALUES('A', 1, 1.1);
>> UPSERT INTO TEST.TESTEXCEPTIONS(KEYCOL, INTEGERCOLUMN, DECIMALCOLUMN)
>> VALUES('B', 2, 2.2);
>> UPSERT INTO TEST.TESTEXCEPTIONS(KEYCOL, INTEGERCOLUMN, DECIMALCOLUMN)
>> VALUES('C', 3, 3.3);
>>
>> -- PERCENTILE_DISC
>> -- Integer columns works
>> SELECT PERCENTILE_DISC (0.5) WITHIN GROUP (ORDER BY INTEGERCOLUMN ASC)
>> FROM TEST.TESTEXCEPTIONS;
>> -- BUG: Decimal columns throws NPE
>> SELECT PERCENTILE_DISC (0.5) WITHIN GROUP (ORDER BY DECIMALCOLUMN ASC)
>> FROM TEST.TESTEXCEPTIONS;
>>
>> -- STDDEV_POP
>> -- Integer columns works
>> SELECT STDDEV_POP(INTEGERCOLUMN) FROM TEST.TESTEXCEPTIONS;
>>
>> -- BUG:  Decimal columns throws NPE
>> SELECT STDDEV_POP(DECIMALCOLUMN) FROM TEST.TESTEXCEPTIONS;
>>
>> -- STDDEV_SAMP
>> -- Integer columns works
>> SELECT STDDEV_SAMP(INTEGERCOLUMN) FROM TEST.TESTEXCEPTIONS;
>>
>> -- BUG:  Decimal columns throws NPE
>> SELECT STDDEV_SAMP(DECIMALCOLUMN) FROM TEST.TESTEXCEPTIONS;
>>
>>
>> -- PERCENTILE_CONT
>> -- Integer columns works
>> SELECT PERCENTILE_CONT (0.5) WITHIN GROUP (ORDER BY INTEGERCOLUMN ASC)
>> FROM TEST.TESTEXCEPTIONS;
>> -- Decimal columns works
>> SELECT PERCENTILE_CONT (0.5) WITHIN GROUP (ORDER BY DECIMALCOLUMN ASC)
>> FROM TEST.TESTEXCEPTIONS;

Reply via email to