You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Chandrasekar (JIRA)" <ji...@apache.org> on 2019/04/10 14:38:00 UTC

[jira] [Updated] (PHOENIX-5236) Multiple dynamic columns in WHERE clause is not working

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

Chandrasekar updated PHOENIX-5236:
----------------------------------
    Description: 
When the query uses multiple dynamic columns in the WHERE clause it's failing. Consider the following example:

 
CREATE TABLE CITY (ID INTEGER, NAME VARCHAR CONSTRAINT PK PRIMARY KEY (ID))

And the following upserts:

UPSERT INTO CITY (ID, NAME, POPULATION INTEGER, DISTRICT VARCHAR) VALUES (1, 'XYZ', 1000, 'XYZ')
UPSERT INTO CITY (ID, NAME, POPULATION INTEGER) VALUES (2, 'ABC', 2000)

 
And now when the following query is executed:

SELECT ID, NAME FROM CITY (POPULATION INTEGER, DISTRICT VARCHAR) WHERE  DISTRICT IS NULL AND POPULATION > 1000

It throws the following exception:

org.apache.phoenix.schema.PTable$QualifierEncodingScheme$InvalidQualifierBytesException: Invalid number of qualifier bytes. Expected length: 2. Actual: 8

 Even comparing different dynamic columns is not working. For example in the same table, following upsert is executed:
UPSERT INTO CITY (ID, NAME, CURRENT_POPULATION INTEGER) VALUES (2, 'ABC', 2000)

And when the following query is executed:
SELECT ID, NAME FROM CITY (POPULATION INTEGER, CURRENT_POPULATION INTEGER) WHERE POPULATION != CURRENT_POPULATION

It again throws the same error (
org.apache.phoenix.schema.PTable$QualifierEncodingScheme$InvalidQualifierBytesException: Invalid number of qualifier bytes. Expected length: 2. Actual: 10)

Does phoenix allows querying by conditions on multiple dynamic columns? The phoenix version used is 4.14.0 and HBase version is 1.4.8.

  was:
When the query uses multiple dynamic columns in the WHERE clause it's failing. Consider the following example:

 
CREATE TABLE CITY (ID INTEGER, NAME VARCHAR CONSTRAINT PK PRIMARY KEY (ID))

And the following upserts:

UPSERT INTO CITY (ID, NAME, POPULATION INTEGER, DISTRICT VARCHAR) VALUES (1, 'XYZ', 1000, 'XYZ')
UPSERT INTO CITY (ID, NAME, POPULATION INTEGER) VALUES (2, 'ABC', 2000)

 
And now when the following query is executed:

SELECT ID, NAME FROM CITY (POPULATION INTEGER, DISTRICT VARCHAR) WHERE  DISTRICT IS NULL AND POPULATION > 1000

It throws the following exception:

org.apache.phoenix.schema.PTable$QualifierEncodingScheme$InvalidQualifierBytesException: Invalid number of qualifier bytes. Expected length: 2. Actual: 8

 

Does phoenix allows querying by conditions on multiple dynamic columns? The phoenix version used is 4.14.0 and HBase version is 1.4.8.


> Multiple dynamic columns in WHERE clause is not working
> -------------------------------------------------------
>
>                 Key: PHOENIX-5236
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5236
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.14.0
>            Reporter: Chandrasekar
>            Priority: Major
>
> When the query uses multiple dynamic columns in the WHERE clause it's failing. Consider the following example:
>  
> CREATE TABLE CITY (ID INTEGER, NAME VARCHAR CONSTRAINT PK PRIMARY KEY (ID))
> And the following upserts:
> UPSERT INTO CITY (ID, NAME, POPULATION INTEGER, DISTRICT VARCHAR) VALUES (1, 'XYZ', 1000, 'XYZ')
> UPSERT INTO CITY (ID, NAME, POPULATION INTEGER) VALUES (2, 'ABC', 2000)
>  
> And now when the following query is executed:
> SELECT ID, NAME FROM CITY (POPULATION INTEGER, DISTRICT VARCHAR) WHERE  DISTRICT IS NULL AND POPULATION > 1000
> It throws the following exception:
> org.apache.phoenix.schema.PTable$QualifierEncodingScheme$InvalidQualifierBytesException: Invalid number of qualifier bytes. Expected length: 2. Actual: 8
>  Even comparing different dynamic columns is not working. For example in the same table, following upsert is executed:
> UPSERT INTO CITY (ID, NAME, CURRENT_POPULATION INTEGER) VALUES (2, 'ABC', 2000)
> And when the following query is executed:
> SELECT ID, NAME FROM CITY (POPULATION INTEGER, CURRENT_POPULATION INTEGER) WHERE POPULATION != CURRENT_POPULATION
> It again throws the same error (
> org.apache.phoenix.schema.PTable$QualifierEncodingScheme$InvalidQualifierBytesException: Invalid number of qualifier bytes. Expected length: 2. Actual: 10)
> Does phoenix allows querying by conditions on multiple dynamic columns? The phoenix version used is 4.14.0 and HBase version is 1.4.8.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)