[jira] [Assigned] (PHOENIX-6596) Schema extraction double quotes expressions, resulting in un-executabe create statements

2021-12-09 Thread Istvan Toth (Jira)


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

Istvan Toth reassigned PHOENIX-6596:


Assignee: Richárd Antal

> Schema extraction double quotes expressions, resulting in un-executabe create 
> statements
> 
>
> Key: PHOENIX-6596
> URL: https://issues.apache.org/jira/browse/PHOENIX-6596
> Project: Phoenix
>  Issue Type: Bug
>  Components: core
>Affects Versions: 4.17.0, 5.2.0, 4.16.2, 5.1.3
>Reporter: Istvan Toth
>Assignee: Richárd Antal
>Priority: Major
>
> {noformat}
> create table data (id varchar primary key, number integer,currency 
> decimal(6,2),
> lista varchar[]);
> create index data_index on data (currency*number) INCLUDE (LISTA);
> show create table data_index;
> +-+
> |  CREATE STATEMENT   
> |
> +-+
> | CREATE INDEX DATA_INDEX ON DATA("(CURRENCY * NUMBER)", ID) INCLUDE (LISTA)  
> |
> +-+
> {noformat}
> The create statement double quotes the expression, and cannot be executed 
> directly.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Updated] (PHOENIX-4296) Dead loop in HBase reverse scan when amount of scan data is greater than SCAN_RESULT_CHUNK_SIZE

2021-12-09 Thread Chao Wang (Jira)


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

Chao Wang updated PHOENIX-4296:
---
Description: 
This problem seems to only occur with reverse scan not forward scan. When 
amount of scan data is greater than SCAN_RESULT_CHUNK_SIZE(default 2999), Class 
ChunkedResultIteratorFactory will multiple calls function getResultIterator. 
But in function getResultIterator it always readjusts startRow, in fact, if in 
reverse scan we should readjust stopRow. For example
{code:java}
if (ScanUtil.isReversed(scan)) {
scan.setStopRow(ByteUtil.copyKeyBytesIfNecessary(lastKey));
} else {
scan.setStartRow(ByteUtil.copyKeyBytesIfNecessary(lastKey));
}
{code}

  was:
This problem seems to only occur with reverse scan not forward scan. When 
amount of scan data is greater than SCAN_RESULT_CHUNK_SIZE(default 2999), Class 
ChunkedResultIteratorFactory will multiple calls function getResultIterator. 
But in function getResultIterator it always readjusts startRow, in fact, if in 
reverse scan we should readjust stopRow. For example 
{code:java}
if (ScanUtil.isReversed(scan)) {
scan.setStopRow(ByteUtil.copyKeyBytesIfNecessary(lastKey));
} else {
scan.setStartRow(ByteUtil.copyKeyBytesIfNecessary(lastKey));
}
{code}



> Dead loop in HBase reverse scan when amount of scan data is greater than 
> SCAN_RESULT_CHUNK_SIZE
> ---
>
> Key: PHOENIX-4296
> URL: https://issues.apache.org/jira/browse/PHOENIX-4296
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.6.0
>Reporter: rukawakang
>Assignee: Chen Feng
>Priority: Major
> Fix For: 4.15.0, 5.1.0, 4.14.2
>
> Attachments: PHOENIX-4296-4.x-HBase-1.2-v2.patch, 
> PHOENIX-4296-4.x-HBase-1.2-v3.patch, PHOENIX-4296-4.x-HBase-1.2-v4.patch, 
> PHOENIX-4296-4.x-HBase-1.2.patch, PHOENIX-4296.patch
>
>
> This problem seems to only occur with reverse scan not forward scan. When 
> amount of scan data is greater than SCAN_RESULT_CHUNK_SIZE(default 2999), 
> Class ChunkedResultIteratorFactory will multiple calls function 
> getResultIterator. But in function getResultIterator it always readjusts 
> startRow, in fact, if in reverse scan we should readjust stopRow. For example
> {code:java}
> if (ScanUtil.isReversed(scan)) {
> scan.setStopRow(ByteUtil.copyKeyBytesIfNecessary(lastKey));
> } else {
> scan.setStartRow(ByteUtil.copyKeyBytesIfNecessary(lastKey));
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)