[jira] [Updated] (PHOENIX-2125) ORDER BY on full PK on salted table does not work
[ https://issues.apache.org/jira/browse/PHOENIX-2125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Samarth Jain updated PHOENIX-2125: -- Fix Version/s: 4.5.0 > ORDER BY on full PK on salted table does not work > - > > Key: PHOENIX-2125 > URL: https://issues.apache.org/jira/browse/PHOENIX-2125 > Project: Phoenix > Issue Type: Bug >Affects Versions: 4.5.0 >Reporter: Brian Esserlieu >Assignee: Samarth Jain > Fix For: 4.5.0 > > Attachments: PHOENIX-2125.patch > > > Ordering by the full PK on a salted table does not work > REPRO: > --create a salted table with 2 pk fields > CREATE TABLE IF NOT EXISTS TEST_TABLE ( > PK1 CHAR(15) NOT NULL, > PK2 CHAR(15) NOT NULL > CONSTRAINT PK PRIMARY KEY > ( > PK1, > PK2 > ) > ) SALT_BUCKETS=16; > --insert data > UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR1-oiwnefin'); > UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR2-qoosdfpin'); > UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR3*)&&)*(@)'); > UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR4 .'); > --do a quick query to verify the data in field PK2 is not completely in order > --(salting + round robin should hopefully have thrown at least 2 rows out of > order) > SELECT * FROM TEST_TABLE > --running this query, you can see that the rows are now properly ordered > SELECT * FROM TEST_TABLE ORDER BY PK2 > --this query is logically identical to the previous SELECT statement with > ordering, > -- but as you can see it's actually identical to the first SELECT statement > (without ordering) > SELECT * FROM TEST_TABLE ORDER BY PK1, PK2 > --clean up if you like > DROP TABLE IF EXISTS TEST_TABLE CASCADE; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PHOENIX-2125) ORDER BY on full PK on salted table does not work
[ https://issues.apache.org/jira/browse/PHOENIX-2125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Samarth Jain updated PHOENIX-2125: -- Attachment: PHOENIX-2125.patch > ORDER BY on full PK on salted table does not work > - > > Key: PHOENIX-2125 > URL: https://issues.apache.org/jira/browse/PHOENIX-2125 > Project: Phoenix > Issue Type: Bug >Affects Versions: 4.5.0 >Reporter: Brian Esserlieu >Assignee: Samarth Jain > Attachments: PHOENIX-2125.patch > > > Ordering by the full PK on a salted table does not work > REPRO: > --create a salted table with 2 pk fields > CREATE TABLE IF NOT EXISTS TEST_TABLE ( > PK1 CHAR(15) NOT NULL, > PK2 CHAR(15) NOT NULL > CONSTRAINT PK PRIMARY KEY > ( > PK1, > PK2 > ) > ) SALT_BUCKETS=16; > --insert data > UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR1-oiwnefin'); > UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR2-qoosdfpin'); > UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR3*)&&)*(@)'); > UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR4 .'); > --do a quick query to verify the data in field PK2 is not completely in order > --(salting + round robin should hopefully have thrown at least 2 rows out of > order) > SELECT * FROM TEST_TABLE > --running this query, you can see that the rows are now properly ordered > SELECT * FROM TEST_TABLE ORDER BY PK2 > --this query is logically identical to the previous SELECT statement with > ordering, > -- but as you can see it's actually identical to the first SELECT statement > (without ordering) > SELECT * FROM TEST_TABLE ORDER BY PK1, PK2 > --clean up if you like > DROP TABLE IF EXISTS TEST_TABLE CASCADE; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PHOENIX-2125) ORDER BY on full PK on salted table does not work
[ https://issues.apache.org/jira/browse/PHOENIX-2125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Samarth Jain updated PHOENIX-2125: -- Attachment: (was: PHOENIX-2125.patch) > ORDER BY on full PK on salted table does not work > - > > Key: PHOENIX-2125 > URL: https://issues.apache.org/jira/browse/PHOENIX-2125 > Project: Phoenix > Issue Type: Bug >Affects Versions: 4.5.0 >Reporter: Brian Esserlieu >Assignee: Samarth Jain > Attachments: PHOENIX-2125.patch > > > Ordering by the full PK on a salted table does not work > REPRO: > --create a salted table with 2 pk fields > CREATE TABLE IF NOT EXISTS TEST_TABLE ( > PK1 CHAR(15) NOT NULL, > PK2 CHAR(15) NOT NULL > CONSTRAINT PK PRIMARY KEY > ( > PK1, > PK2 > ) > ) SALT_BUCKETS=16; > --insert data > UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR1-oiwnefin'); > UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR2-qoosdfpin'); > UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR3*)&&)*(@)'); > UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR4 .'); > --do a quick query to verify the data in field PK2 is not completely in order > --(salting + round robin should hopefully have thrown at least 2 rows out of > order) > SELECT * FROM TEST_TABLE > --running this query, you can see that the rows are now properly ordered > SELECT * FROM TEST_TABLE ORDER BY PK2 > --this query is logically identical to the previous SELECT statement with > ordering, > -- but as you can see it's actually identical to the first SELECT statement > (without ordering) > SELECT * FROM TEST_TABLE ORDER BY PK1, PK2 > --clean up if you like > DROP TABLE IF EXISTS TEST_TABLE CASCADE; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PHOENIX-2125) ORDER BY on full PK on salted table does not work
[ https://issues.apache.org/jira/browse/PHOENIX-2125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Samarth Jain updated PHOENIX-2125: -- Attachment: PHOENIX-2125.patch [~jamestaylor] - please review. This patch brings back the checks we had earlier for deciding which iterator to pick. The bug was causing the round robin iterator to be picked for a salted table even when the query had an order by on the row key. I also had to add @Ignore annotation for the test in ArraysToStringFunctionTest causing it is failing for me. I will file a seprate JIRA for that. > ORDER BY on full PK on salted table does not work > - > > Key: PHOENIX-2125 > URL: https://issues.apache.org/jira/browse/PHOENIX-2125 > Project: Phoenix > Issue Type: Bug >Affects Versions: 4.5.0 >Reporter: Brian Esserlieu >Assignee: Samarth Jain > Attachments: PHOENIX-2125.patch > > > Ordering by the full PK on a salted table does not work > REPRO: > --create a salted table with 2 pk fields > CREATE TABLE IF NOT EXISTS TEST_TABLE ( > PK1 CHAR(15) NOT NULL, > PK2 CHAR(15) NOT NULL > CONSTRAINT PK PRIMARY KEY > ( > PK1, > PK2 > ) > ) SALT_BUCKETS=16; > --insert data > UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR1-oiwnefin'); > UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR2-qoosdfpin'); > UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR3*)&&)*(@)'); > UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR4 .'); > --do a quick query to verify the data in field PK2 is not completely in order > --(salting + round robin should hopefully have thrown at least 2 rows out of > order) > SELECT * FROM TEST_TABLE > --running this query, you can see that the rows are now properly ordered > SELECT * FROM TEST_TABLE ORDER BY PK2 > --this query is logically identical to the previous SELECT statement with > ordering, > -- but as you can see it's actually identical to the first SELECT statement > (without ordering) > SELECT * FROM TEST_TABLE ORDER BY PK1, PK2 > --clean up if you like > DROP TABLE IF EXISTS TEST_TABLE CASCADE; -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PHOENIX-2125) ORDER BY on full PK on salted table does not work
[ https://issues.apache.org/jira/browse/PHOENIX-2125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brian Esserlieu updated PHOENIX-2125: - Description: Ordering by the full PK on a salted table does not work REPRO: --create a salted table with 2 pk fields CREATE TABLE IF NOT EXISTS TEST_TABLE ( PK1 CHAR(15) NOT NULL, PK2 CHAR(15) NOT NULL CONSTRAINT PK PRIMARY KEY ( PK1, PK2 ) ) SALT_BUCKETS=16; --insert data UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR1-oiwnefin'); UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR2-qoosdfpin'); UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR3*)&&)*(@)'); UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR4 .'); --do a quick query to verify the data in field PK2 is not completely in order --(salting + round robin should hopefully have thrown at least 2 rows out of order) SELECT * FROM TEST_TABLE --running this query, you can see that the rows are now properly ordered SELECT * FROM TEST_TABLE ORDER BY PK2 --this query is logically identical to the previous SELECT statement with ordering, -- but as you can see it's actually identical to the first SELECT statement (without ordering) SELECT * FROM TEST_TABLE ORDER BY PK1, PK2 --clean up if you like DROP TABLE IF EXISTS TEST_TABLE CASCADE; was: Ordering by the full PK on a salted table does not work REPRO: --create a salted table with 2 pk fields CREATE TABLE IF NOT EXISTS TEST_TABLE ( PK1 CHAR(15) NOT NULL, PK2 CHAR(15) NOT NULL CONSTRAINT PK PRIMARY KEY ( PK1, PK2 ) ) SALT_BUCKETS=16; --insert data UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR1-oiwnefin'); UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR2-qoosdfpin'); UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR3*)&&)*(@)'); UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR4 .'); --do a quick query to verify the data in field PK2 is not completely in order -- (salting + round robin should hopefully have thrown at least 2 rows out of order) SELECT * FROM TEST_TABLE --running this query, you can see that the rows are now properly ordered SELECT * FROM TEST_TABLE ORDER BY PK2 --this query is logically identical to the previous SELECT statement with ordering, -- but as you can see it's actually identical to the first SELECT statement (without ordering) SELECT * FROM TEST_TABLE ORDER BY PK1, PK2 --clean up if you like DROP TABLE IF EXISTS TEST_TABLE CASCADE; > ORDER BY on full PK on salted table does not work > - > > Key: PHOENIX-2125 > URL: https://issues.apache.org/jira/browse/PHOENIX-2125 > Project: Phoenix > Issue Type: Bug >Affects Versions: 4.5.0 >Reporter: Brian Esserlieu > > Ordering by the full PK on a salted table does not work > REPRO: > --create a salted table with 2 pk fields > CREATE TABLE IF NOT EXISTS TEST_TABLE ( > PK1 CHAR(15) NOT NULL, > PK2 CHAR(15) NOT NULL > CONSTRAINT PK PRIMARY KEY > ( > PK1, > PK2 > ) > ) SALT_BUCKETS=16; > --insert data > UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR1-oiwnefin'); > UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR2-qoosdfpin'); > UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR3*)&&)*(@)'); > UPSERT INTO TEST_TABLE (PK1, PK2) VALUES ('FOO','BAR4 .'); > --do a quick query to verify the data in field PK2 is not completely in order > --(salting + round robin should hopefully have thrown at least 2 rows out of > order) > SELECT * FROM TEST_TABLE > --running this query, you can see that the rows are now properly ordered > SELECT * FROM TEST_TABLE ORDER BY PK2 > --this query is logically identical to the previous SELECT statement with > ordering, > -- but as you can see it's actually identical to the first SELECT statement > (without ordering) > SELECT * FROM TEST_TABLE ORDER BY PK1, PK2 > --clean up if you like > DROP TABLE IF EXISTS TEST_TABLE CASCADE; -- This message was sent by Atlassian JIRA (v6.3.4#6332)