[jira] [Updated] (PHOENIX-3371) Aggregate Function is broken if secondary index exists
[ https://issues.apache.org/jira/browse/PHOENIX-3371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James Taylor updated PHOENIX-3371: -- Attachment: PHOENIX-3371_v2.patch Added more delete tests and cleaned up test a bit. Still not able to repro. Will close as Not Reproducible if I don't hear back by the end of the week. > Aggregate Function is broken if secondary index exists > -- > > Key: PHOENIX-3371 > URL: https://issues.apache.org/jira/browse/PHOENIX-3371 > Project: Phoenix > Issue Type: Bug >Affects Versions: 4.8.1 >Reporter: Jiping Zhou > Attachments: PHOENIX-3371.patch, PHOENIX-3371_v2.patch > > > 1. Create a global table > CREATE TABLE IF NOT EXISTS PLATFORM_ENTITY.GLOBAL_TABLE ( > ORGANIZATION_ID CHAR(15) NOT NULL, > KEY_PREFIX CHAR(3) NOT NULL, > CREATED_DATE DATE, > CREATED_BY CHAR(15), > CONSTRAINT PK PRIMARY KEY ( > ORGANIZATION_ID, > KEY_PREFIX > ) > ) VERSIONS=1, IMMUTABLE_ROWS=true, MULTI_TENANT=true; > 2. Create a global view on base global table with where clause > CREATE VIEW IF NOT EXISTS PLATFORM_ENTITY.GLOBAL_VIEW ( > INT1 BIGINT NOT NULL, > DOUBLE1 DECIMAL(12, 3), > IS_BOOLEAN BOOLEAN, > TEXT1 VARCHAR, > CONSTRAINT PKVIEW PRIMARY KEY > ( > INT1 > ) > ) > AS SELECT * FROM PLATFORM_ENTITY.GLOBAL_TABLE WHERE KEY_PREFIX = '123'; > 3. Create gloabl index on the global view > CREATE INDEX IF NOT EXISTS GLOBAL_INDEX > ON PLATFORM_ENTITY.GLOBAL_VIEW (TEXT1 DESC, INT1) > INCLUDE (CREATED_BY, DOUBLE1, IS_BOOLEAN, CREATED_DATE); > 4. Create tenant specific view on top of global view > CREATE VIEW IF NOT EXISTS PLATFORM_ENTITY.TENANT_VIEW > AS SELECT * FROM PLATFORM_ENTITY.GLOBAL_VIEW; > 5. Insert 10 record in tenant view > 6. Remove any record in tenant view > 7. Query in tenant view > SELECT * FROM PLATFORM_ENTITY.TENANT_VIEW; > 9 records are returned > SELECT COUNT(*) FROM PLATFORM_ENTITY.TENANT_VIEW; > 10 was returned. > I guess the issue was secondary index is not updated when delete or update > happens. And the aggregate function is using the secondary index. The problem > does not happen in 4.8.0-1.0.4 > It is a regression -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PHOENIX-3376) Physical table for indexes on views isn't use same schema as table
[ https://issues.apache.org/jira/browse/PHOENIX-3376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15570514#comment-15570514 ] James Taylor commented on PHOENIX-3376: --- [~an...@apache.org] - do you think you could take a look? We have to be a bit careful about backward compatibility. Perhaps we can keep the existing behavior when namespaces is off, but use the correct one when it's on? > Physical table for indexes on views isn't use same schema as table > -- > > Key: PHOENIX-3376 > URL: https://issues.apache.org/jira/browse/PHOENIX-3376 > Project: Phoenix > Issue Type: Bug >Reporter: James Taylor > Fix For: 4.9.0 > > > See this code in ConnectionQueryServicesImpl: > {code} > private void ensureViewIndexTableCreated(byte[] physicalTableName, > MaptableProps, > List >> families, byte[][] > splits, long timestamp, > boolean isNamespaceMapped) throws SQLException { > byte[] physicalIndexName = > MetaDataUtil.getViewIndexPhysicalName(physicalTableName); > {code} > We should get rid of the {{MetaDataUtil.getViewIndexPhysicalName()}} function > and use the appropriate one. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PHOENIX-3376) Physical table for indexes on views isn't use same schema as table
[ https://issues.apache.org/jira/browse/PHOENIX-3376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James Taylor updated PHOENIX-3376: -- Fix Version/s: 4.9.0 > Physical table for indexes on views isn't use same schema as table > -- > > Key: PHOENIX-3376 > URL: https://issues.apache.org/jira/browse/PHOENIX-3376 > Project: Phoenix > Issue Type: Bug >Reporter: James Taylor > Fix For: 4.9.0 > > > See this code in ConnectionQueryServicesImpl: > {code} > private void ensureViewIndexTableCreated(byte[] physicalTableName, > MaptableProps, > List >> families, byte[][] > splits, long timestamp, > boolean isNamespaceMapped) throws SQLException { > byte[] physicalIndexName = > MetaDataUtil.getViewIndexPhysicalName(physicalTableName); > {code} > We should get rid of the {{MetaDataUtil.getViewIndexPhysicalName()}} function > and use the appropriate one. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (PHOENIX-3376) Physical table for indexes on views isn't use same schema as table
James Taylor created PHOENIX-3376: - Summary: Physical table for indexes on views isn't use same schema as table Key: PHOENIX-3376 URL: https://issues.apache.org/jira/browse/PHOENIX-3376 Project: Phoenix Issue Type: Bug Reporter: James Taylor See this code in ConnectionQueryServicesImpl: {code} private void ensureViewIndexTableCreated(byte[] physicalTableName, MaptableProps, List >> families, byte[][] splits, long timestamp, boolean isNamespaceMapped) throws SQLException { byte[] physicalIndexName = MetaDataUtil.getViewIndexPhysicalName(physicalTableName); {code} We should get rid of the {{MetaDataUtil.getViewIndexPhysicalName()}} function and use the appropriate one. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
Re: How to I update the website?
Makes sense! Thanks for the clarification! :) On 13/10/2016 11:22 AM, Mujtaba Chohan wrote: Website publish location is on svn therefore we kept the source there as well. On Wed, Oct 12, 2016 at 5:17 PM, F21wrote: Is there any reason why it's not available using git? Would prefer using git as I can just send it as a PR on github. On 13/10/2016 11:16 AM, Mujtaba Chohan wrote: As mentioned at http://phoenix.apache.org/building_website.html, it's on svn. svn checkout https://svn.apache.org/repos/asf/phoenix On Wed, Oct 12, 2016 at 5:12 PM, F21 wrote: I noticed some errors in the docs on the website. According to the documentation, the files are in /src/site/markdown: http://phoenix.apache.org/building_website.html However, there is no src/site/markdown in the git repo on Github or the ASF repo. What's the current method for updating the website? Cheers, Francis
Re: How to I update the website?
Website publish location is on svn therefore we kept the source there as well. On Wed, Oct 12, 2016 at 5:17 PM, F21wrote: > Is there any reason why it's not available using git? Would prefer using > git as I can just send it as a PR on github. > > > > On 13/10/2016 11:16 AM, Mujtaba Chohan wrote: > >> As mentioned at http://phoenix.apache.org/building_website.html, it's on >> svn. >> >> svn checkout https://svn.apache.org/repos/asf/phoenix >> >> >> On Wed, Oct 12, 2016 at 5:12 PM, F21 wrote: >> >> I noticed some errors in the docs on the website. According to the >>> documentation, the files are in /src/site/markdown: >>> http://phoenix.apache.org/building_website.html >>> >>> However, there is no src/site/markdown in the git repo on Github or the >>> ASF repo. What's the current method for updating the website? >>> >>> Cheers, >>> >>> Francis >>> >>> >>> >
Re: How to I update the website?
Is there any reason why it's not available using git? Would prefer using git as I can just send it as a PR on github. On 13/10/2016 11:16 AM, Mujtaba Chohan wrote: As mentioned at http://phoenix.apache.org/building_website.html, it's on svn. svn checkout https://svn.apache.org/repos/asf/phoenix On Wed, Oct 12, 2016 at 5:12 PM, F21wrote: I noticed some errors in the docs on the website. According to the documentation, the files are in /src/site/markdown: http://phoenix.apache.org/building_website.html However, there is no src/site/markdown in the git repo on Github or the ASF repo. What's the current method for updating the website? Cheers, Francis
Re: How to I update the website?
As mentioned at http://phoenix.apache.org/building_website.html, it's on svn. svn checkout https://svn.apache.org/repos/asf/phoenix On Wed, Oct 12, 2016 at 5:12 PM, F21wrote: > I noticed some errors in the docs on the website. According to the > documentation, the files are in /src/site/markdown: > http://phoenix.apache.org/building_website.html > > However, there is no src/site/markdown in the git repo on Github or the > ASF repo. What's the current method for updating the website? > > Cheers, > > Francis > >
How to I update the website?
I noticed some errors in the docs on the website. According to the documentation, the files are in /src/site/markdown: http://phoenix.apache.org/building_website.html However, there is no src/site/markdown in the git repo on Github or the ASF repo. What's the current method for updating the website? Cheers, Francis
[jira] [Commented] (PHOENIX-3370) VIEW derived from another VIEW with WHERE on a TABLE doesn't use parent VIEW indexes
[ https://issues.apache.org/jira/browse/PHOENIX-3370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15570319#comment-15570319 ] Hudson commented on PHOENIX-3370: - SUCCESS: Integrated in Jenkins build Phoenix-master #1439 (See [https://builds.apache.org/job/Phoenix-master/1439/]) PHOENIX-3370 VIEW derived from another VIEW with WHERE on a TABLE (jamestaylor: rev 89cea911c1b5429363d32cbdeac3dadddccd5465) * (edit) phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java > VIEW derived from another VIEW with WHERE on a TABLE doesn't use parent VIEW > indexes > > > Key: PHOENIX-3370 > URL: https://issues.apache.org/jira/browse/PHOENIX-3370 > Project: Phoenix > Issue Type: Bug >Affects Versions: 4.8.1 >Reporter: Jiping Zhou >Assignee: James Taylor > Attachments: PHOENIX-3370.patch, PHOENIX-3370_wip.patch > > > 1. Create a global table > CREATE TABLE IF NOT EXISTS PLATFORM_ENTITY.GLOBAL_TABLE ( > ORGANIZATION_ID CHAR(15) NOT NULL, > KEY_PREFIX CHAR(3) NOT NULL, > CREATED_DATE DATE, > CREATED_BY CHAR(15), > CONSTRAINT PK PRIMARY KEY ( > ORGANIZATION_ID, > KEY_PREFIX > ) > ) VERSIONS=1, IMMUTABLE_ROWS=true, MULTI_TENANT=true; > 2. Create a global view on base global table with where clause > CREATE VIEW IF NOT EXISTS PLATFORM_ENTITY.GLOBAL_VIEW ( > INT1 BIGINT NOT NULL, > DOUBLE1 DECIMAL(12, 3), > IS_BOOLEAN BOOLEAN, > TEXT1 VARCHAR, > CONSTRAINT PKVIEW PRIMARY KEY > ( > INT1 > ) > ) > AS SELECT * FROM PLATFORM_ENTITY.GLOBAL_TABLE WHERE KEY_PREFIX = '123'; > 3. Create gloabl index on the global view > CREATE INDEX IF NOT EXISTS GLOBAL_INDEX > ON PLATFORM_ENTITY.GLOBAL_VIEW (TEXT1 DESC, INT1) > INCLUDE (CREATED_BY, DOUBLE1, IS_BOOLEAN, CREATED_DATE); > 4. Create tenant specific view on top of global view > CREATE VIEW IF NOT EXISTS PLATFORM_ENTITY.TENANT_VIEW > AS SELECT * FROM PLATFORM_ENTITY.GLOBAL_VIEW; > 5. Query in global view > EXPLAIN SELECT DOUBLE1 FROM PLATFORM_ENTITY.GLOBAL_VIEW WHERE ORGANIZATION_ID > = '00Dxx002Col' AND TEXT1='Test' AND INT1=1; > The result is > CLIENT 1-CHUNK 1 ROWS 452 BYTES PARALLEL 1-WAY ROUND ROBIN POINT LOOKUP ON 1 > KEY OVER PLATFORM_ENTITY.GLOBAL_TABLE > SERVER FILTER BY TEXT1 = 'Test' > It is not using the secondary index at all. The same thing happens on the > Tenant view. > However if we have a global view without where clause like > CREATE VIEW IF NOT EXISTS PLATFORM_ENTITY.GLOBAL_VIEW2 ( > INT1 BIGINT NOT NULL, > DOUBLE1 DECIMAL(12, 3), > IS_BOOLEAN BOOLEAN, > TEXT1 VARCHAR, > CONSTRAINT PKVIEW PRIMARY KEY > ( > INT1 > ) > ) > AS SELECT * FROM PLATFORM_ENTITY.GLOBAL_TABLE; > CREATE INDEX IF NOT EXISTS GLOBAL_INDEX2 > ON PLATFORM_ENTITY.GLOBAL_VIEW2 (TEXT1 DESC, INT1) > INCLUDE (CREATED_BY, DOUBLE1, IS_BOOLEAN, CREATED_DATE); > EXPLAIN SELECT DOUBLE1 FROM PLATFORM_ENTITY.GLOBAL_VIEW2 WHERE > ORGANIZATION_ID = '00Dxx002Col' AND TEXT1='Test' AND INT1=1 ORDER BY > TEXT1 DESC, INT1; > The secondary index will be correctly used. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PHOENIX-3371) Aggregate Function is broken if secondary index exists
[ https://issues.apache.org/jira/browse/PHOENIX-3371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James Taylor updated PHOENIX-3371: -- Attachment: PHOENIX-3371.patch [~JipingZhou] - I'm having a hard time reproducing the issue you reported. Would you mind taking a quick look at the new test case to see what I'm doing differently from you? This test passes fine for me. > Aggregate Function is broken if secondary index exists > -- > > Key: PHOENIX-3371 > URL: https://issues.apache.org/jira/browse/PHOENIX-3371 > Project: Phoenix > Issue Type: Bug >Affects Versions: 4.8.1 >Reporter: Jiping Zhou > Attachments: PHOENIX-3371.patch > > > 1. Create a global table > CREATE TABLE IF NOT EXISTS PLATFORM_ENTITY.GLOBAL_TABLE ( > ORGANIZATION_ID CHAR(15) NOT NULL, > KEY_PREFIX CHAR(3) NOT NULL, > CREATED_DATE DATE, > CREATED_BY CHAR(15), > CONSTRAINT PK PRIMARY KEY ( > ORGANIZATION_ID, > KEY_PREFIX > ) > ) VERSIONS=1, IMMUTABLE_ROWS=true, MULTI_TENANT=true; > 2. Create a global view on base global table with where clause > CREATE VIEW IF NOT EXISTS PLATFORM_ENTITY.GLOBAL_VIEW ( > INT1 BIGINT NOT NULL, > DOUBLE1 DECIMAL(12, 3), > IS_BOOLEAN BOOLEAN, > TEXT1 VARCHAR, > CONSTRAINT PKVIEW PRIMARY KEY > ( > INT1 > ) > ) > AS SELECT * FROM PLATFORM_ENTITY.GLOBAL_TABLE WHERE KEY_PREFIX = '123'; > 3. Create gloabl index on the global view > CREATE INDEX IF NOT EXISTS GLOBAL_INDEX > ON PLATFORM_ENTITY.GLOBAL_VIEW (TEXT1 DESC, INT1) > INCLUDE (CREATED_BY, DOUBLE1, IS_BOOLEAN, CREATED_DATE); > 4. Create tenant specific view on top of global view > CREATE VIEW IF NOT EXISTS PLATFORM_ENTITY.TENANT_VIEW > AS SELECT * FROM PLATFORM_ENTITY.GLOBAL_VIEW; > 5. Insert 10 record in tenant view > 6. Remove any record in tenant view > 7. Query in tenant view > SELECT * FROM PLATFORM_ENTITY.TENANT_VIEW; > 9 records are returned > SELECT COUNT(*) FROM PLATFORM_ENTITY.TENANT_VIEW; > 10 was returned. > I guess the issue was secondary index is not updated when delete or update > happens. And the aggregate function is using the secondary index. The problem > does not happen in 4.8.0-1.0.4 > It is a regression -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (PHOENIX-3370) VIEW derived from another VIEW with WHERE on a TABLE doesn't use parent VIEW indexes
[ https://issues.apache.org/jira/browse/PHOENIX-3370?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James Taylor resolved PHOENIX-3370. --- Resolution: Invalid > VIEW derived from another VIEW with WHERE on a TABLE doesn't use parent VIEW > indexes > > > Key: PHOENIX-3370 > URL: https://issues.apache.org/jira/browse/PHOENIX-3370 > Project: Phoenix > Issue Type: Bug >Affects Versions: 4.8.1 >Reporter: Jiping Zhou >Assignee: James Taylor > Attachments: PHOENIX-3370.patch, PHOENIX-3370_wip.patch > > > 1. Create a global table > CREATE TABLE IF NOT EXISTS PLATFORM_ENTITY.GLOBAL_TABLE ( > ORGANIZATION_ID CHAR(15) NOT NULL, > KEY_PREFIX CHAR(3) NOT NULL, > CREATED_DATE DATE, > CREATED_BY CHAR(15), > CONSTRAINT PK PRIMARY KEY ( > ORGANIZATION_ID, > KEY_PREFIX > ) > ) VERSIONS=1, IMMUTABLE_ROWS=true, MULTI_TENANT=true; > 2. Create a global view on base global table with where clause > CREATE VIEW IF NOT EXISTS PLATFORM_ENTITY.GLOBAL_VIEW ( > INT1 BIGINT NOT NULL, > DOUBLE1 DECIMAL(12, 3), > IS_BOOLEAN BOOLEAN, > TEXT1 VARCHAR, > CONSTRAINT PKVIEW PRIMARY KEY > ( > INT1 > ) > ) > AS SELECT * FROM PLATFORM_ENTITY.GLOBAL_TABLE WHERE KEY_PREFIX = '123'; > 3. Create gloabl index on the global view > CREATE INDEX IF NOT EXISTS GLOBAL_INDEX > ON PLATFORM_ENTITY.GLOBAL_VIEW (TEXT1 DESC, INT1) > INCLUDE (CREATED_BY, DOUBLE1, IS_BOOLEAN, CREATED_DATE); > 4. Create tenant specific view on top of global view > CREATE VIEW IF NOT EXISTS PLATFORM_ENTITY.TENANT_VIEW > AS SELECT * FROM PLATFORM_ENTITY.GLOBAL_VIEW; > 5. Query in global view > EXPLAIN SELECT DOUBLE1 FROM PLATFORM_ENTITY.GLOBAL_VIEW WHERE ORGANIZATION_ID > = '00Dxx002Col' AND TEXT1='Test' AND INT1=1; > The result is > CLIENT 1-CHUNK 1 ROWS 452 BYTES PARALLEL 1-WAY ROUND ROBIN POINT LOOKUP ON 1 > KEY OVER PLATFORM_ENTITY.GLOBAL_TABLE > SERVER FILTER BY TEXT1 = 'Test' > It is not using the secondary index at all. The same thing happens on the > Tenant view. > However if we have a global view without where clause like > CREATE VIEW IF NOT EXISTS PLATFORM_ENTITY.GLOBAL_VIEW2 ( > INT1 BIGINT NOT NULL, > DOUBLE1 DECIMAL(12, 3), > IS_BOOLEAN BOOLEAN, > TEXT1 VARCHAR, > CONSTRAINT PKVIEW PRIMARY KEY > ( > INT1 > ) > ) > AS SELECT * FROM PLATFORM_ENTITY.GLOBAL_TABLE; > CREATE INDEX IF NOT EXISTS GLOBAL_INDEX2 > ON PLATFORM_ENTITY.GLOBAL_VIEW2 (TEXT1 DESC, INT1) > INCLUDE (CREATED_BY, DOUBLE1, IS_BOOLEAN, CREATED_DATE); > EXPLAIN SELECT DOUBLE1 FROM PLATFORM_ENTITY.GLOBAL_VIEW2 WHERE > ORGANIZATION_ID = '00Dxx002Col' AND TEXT1='Test' AND INT1=1 ORDER BY > TEXT1 DESC, INT1; > The secondary index will be correctly used. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PHOENIX-3370) VIEW derived from another VIEW with WHERE on a TABLE doesn't use parent VIEW indexes
[ https://issues.apache.org/jira/browse/PHOENIX-3370?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James Taylor updated PHOENIX-3370: -- Attachment: PHOENIX-3370.patch [~JipingZhou] - here's a patch with a test case. The reason the index isn't being used is because the query is already a point lookup on the data table: all the primary key columns have values: ORGANIZATION_ID, KEY_PREFIX, and INT1. There's no more efficient way to retrieve data than a point lookup. In this case, one row would be looked up and then a filter would be applied for the one row on TEXT1. So you'd get back one or zero rows. A query on only TEXT1 like the following that's in this new test case would use the index, though: {code} SELECT DOUBLE1 FROM PLATFORM_ENTITY.GLOBAL_VIEW WHERE ORGANIZATION_ID = '00Dxx002Col' AND TEXT1='Test' {code} > VIEW derived from another VIEW with WHERE on a TABLE doesn't use parent VIEW > indexes > > > Key: PHOENIX-3370 > URL: https://issues.apache.org/jira/browse/PHOENIX-3370 > Project: Phoenix > Issue Type: Bug >Affects Versions: 4.8.1 >Reporter: Jiping Zhou >Assignee: James Taylor > Attachments: PHOENIX-3370.patch, PHOENIX-3370_wip.patch > > > 1. Create a global table > CREATE TABLE IF NOT EXISTS PLATFORM_ENTITY.GLOBAL_TABLE ( > ORGANIZATION_ID CHAR(15) NOT NULL, > KEY_PREFIX CHAR(3) NOT NULL, > CREATED_DATE DATE, > CREATED_BY CHAR(15), > CONSTRAINT PK PRIMARY KEY ( > ORGANIZATION_ID, > KEY_PREFIX > ) > ) VERSIONS=1, IMMUTABLE_ROWS=true, MULTI_TENANT=true; > 2. Create a global view on base global table with where clause > CREATE VIEW IF NOT EXISTS PLATFORM_ENTITY.GLOBAL_VIEW ( > INT1 BIGINT NOT NULL, > DOUBLE1 DECIMAL(12, 3), > IS_BOOLEAN BOOLEAN, > TEXT1 VARCHAR, > CONSTRAINT PKVIEW PRIMARY KEY > ( > INT1 > ) > ) > AS SELECT * FROM PLATFORM_ENTITY.GLOBAL_TABLE WHERE KEY_PREFIX = '123'; > 3. Create gloabl index on the global view > CREATE INDEX IF NOT EXISTS GLOBAL_INDEX > ON PLATFORM_ENTITY.GLOBAL_VIEW (TEXT1 DESC, INT1) > INCLUDE (CREATED_BY, DOUBLE1, IS_BOOLEAN, CREATED_DATE); > 4. Create tenant specific view on top of global view > CREATE VIEW IF NOT EXISTS PLATFORM_ENTITY.TENANT_VIEW > AS SELECT * FROM PLATFORM_ENTITY.GLOBAL_VIEW; > 5. Query in global view > EXPLAIN SELECT DOUBLE1 FROM PLATFORM_ENTITY.GLOBAL_VIEW WHERE ORGANIZATION_ID > = '00Dxx002Col' AND TEXT1='Test' AND INT1=1; > The result is > CLIENT 1-CHUNK 1 ROWS 452 BYTES PARALLEL 1-WAY ROUND ROBIN POINT LOOKUP ON 1 > KEY OVER PLATFORM_ENTITY.GLOBAL_TABLE > SERVER FILTER BY TEXT1 = 'Test' > It is not using the secondary index at all. The same thing happens on the > Tenant view. > However if we have a global view without where clause like > CREATE VIEW IF NOT EXISTS PLATFORM_ENTITY.GLOBAL_VIEW2 ( > INT1 BIGINT NOT NULL, > DOUBLE1 DECIMAL(12, 3), > IS_BOOLEAN BOOLEAN, > TEXT1 VARCHAR, > CONSTRAINT PKVIEW PRIMARY KEY > ( > INT1 > ) > ) > AS SELECT * FROM PLATFORM_ENTITY.GLOBAL_TABLE; > CREATE INDEX IF NOT EXISTS GLOBAL_INDEX2 > ON PLATFORM_ENTITY.GLOBAL_VIEW2 (TEXT1 DESC, INT1) > INCLUDE (CREATED_BY, DOUBLE1, IS_BOOLEAN, CREATED_DATE); > EXPLAIN SELECT DOUBLE1 FROM PLATFORM_ENTITY.GLOBAL_VIEW2 WHERE > ORGANIZATION_ID = '00Dxx002Col' AND TEXT1='Test' AND INT1=1 ORDER BY > TEXT1 DESC, INT1; > The secondary index will be correctly used. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PHOENIX-3265) Double-quote column names that use reserved keywords
[ https://issues.apache.org/jira/browse/PHOENIX-3265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15570038#comment-15570038 ] Hudson commented on PHOENIX-3265: - SUCCESS: Integrated in Jenkins build Phoenix-master #1438 (See [https://builds.apache.org/job/Phoenix-master/1438/]) PHOENIX-3265 Double-quote column names that use reserved keywords (Eric (maryannxue: rev 68845287959d84f215eeb8b0726425b92e215268) * (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/SortMergeJoinIT.java * (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/HashJoinIT.java > Double-quote column names that use reserved keywords > > > Key: PHOENIX-3265 > URL: https://issues.apache.org/jira/browse/PHOENIX-3265 > Project: Phoenix > Issue Type: Sub-task >Reporter: James Taylor >Assignee: Eric Lomore > Fix For: 4.9.0 > > > In Phoenix {{date}} is not a reserved word, but perhaps in Calcite it is? If > that's the case, we should surround occurrences of columns named {{date}} in > double quotes to prevent the parser error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PHOENIX-3265) Double-quote column names that use reserved keywords
[ https://issues.apache.org/jira/browse/PHOENIX-3265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15569875#comment-15569875 ] Maryann Xue commented on PHOENIX-3265: -- Committed. Thank you, [~lomoree], for your quick response! > Double-quote column names that use reserved keywords > > > Key: PHOENIX-3265 > URL: https://issues.apache.org/jira/browse/PHOENIX-3265 > Project: Phoenix > Issue Type: Sub-task >Reporter: James Taylor >Assignee: Eric Lomore > Fix For: 4.9.0 > > > In Phoenix {{date}} is not a reserved word, but perhaps in Calcite it is? If > that's the case, we should surround occurrences of columns named {{date}} in > double quotes to prevent the parser error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PHOENIX-3265) Double-quote column names that use reserved keywords
[ https://issues.apache.org/jira/browse/PHOENIX-3265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15569858#comment-15569858 ] ASF GitHub Bot commented on PHOENIX-3265: - Github user lomoree closed the pull request at: https://github.com/apache/phoenix/pull/218 > Double-quote column names that use reserved keywords > > > Key: PHOENIX-3265 > URL: https://issues.apache.org/jira/browse/PHOENIX-3265 > Project: Phoenix > Issue Type: Sub-task >Reporter: James Taylor >Assignee: Eric Lomore > Fix For: 4.9.0 > > > In Phoenix {{date}} is not a reserved word, but perhaps in Calcite it is? If > that's the case, we should surround occurrences of columns named {{date}} in > double quotes to prevent the parser error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[GitHub] phoenix pull request #218: PHOENIX-3265 Surround columns named date with dou...
Github user lomoree closed the pull request at: https://github.com/apache/phoenix/pull/218 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Commented] (PHOENIX-3265) Double-quote column names that use reserved keywords
[ https://issues.apache.org/jira/browse/PHOENIX-3265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15569847#comment-15569847 ] Eric Lomore commented on PHOENIX-3265: -- Amended the recent commit with the change. Let me know if there's anything else, apologies again for the trouble. > Double-quote column names that use reserved keywords > > > Key: PHOENIX-3265 > URL: https://issues.apache.org/jira/browse/PHOENIX-3265 > Project: Phoenix > Issue Type: Sub-task >Reporter: James Taylor >Assignee: Eric Lomore > Fix For: 4.9.0 > > > In Phoenix {{date}} is not a reserved word, but perhaps in Calcite it is? If > that's the case, we should surround occurrences of columns named {{date}} in > double quotes to prevent the parser error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PHOENIX-3265) Double-quote column names that use reserved keywords
[ https://issues.apache.org/jira/browse/PHOENIX-3265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15569837#comment-15569837 ] Maryann Xue commented on PHOENIX-3265: -- It's OK, I can commit for you. But actually as I reviewing your latest commit for HashJoinIT.java, I realized that you didn't make corresponding changes in SortMergeJoinIT.java. There are still "date" columns in SortMergeJoinIT.testNestedSubqueries(). Do you think you can push in another change quickly so that I can cover them in just one commit to master branch? > Double-quote column names that use reserved keywords > > > Key: PHOENIX-3265 > URL: https://issues.apache.org/jira/browse/PHOENIX-3265 > Project: Phoenix > Issue Type: Sub-task >Reporter: James Taylor >Assignee: Eric Lomore > Fix For: 4.9.0 > > > In Phoenix {{date}} is not a reserved word, but perhaps in Calcite it is? If > that's the case, we should surround occurrences of columns named {{date}} in > double quotes to prevent the parser error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (PHOENIX-3265) Double-quote column names that use reserved keywords
[ https://issues.apache.org/jira/browse/PHOENIX-3265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15569735#comment-15569735 ] Eric Lomore edited comment on PHOENIX-3265 at 10/12/16 8:20 PM: Weird, my PR missed my recent commit which updated HashJoinIT.java. I've pushed the appropriate commit to the existing pull request. My apologies for not catching this! was (Author: lomoree): Weird, my PR missed my recent commit which rolled back the changes causing this error. Need to simply revert changes to HashJoinIT. Note: The fix is on the existing pull request. > Double-quote column names that use reserved keywords > > > Key: PHOENIX-3265 > URL: https://issues.apache.org/jira/browse/PHOENIX-3265 > Project: Phoenix > Issue Type: Sub-task >Reporter: James Taylor >Assignee: Eric Lomore > Fix For: 4.9.0 > > > In Phoenix {{date}} is not a reserved word, but perhaps in Calcite it is? If > that's the case, we should surround occurrences of columns named {{date}} in > double quotes to prevent the parser error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (PHOENIX-3265) Double-quote column names that use reserved keywords
[ https://issues.apache.org/jira/browse/PHOENIX-3265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15569735#comment-15569735 ] Eric Lomore edited comment on PHOENIX-3265 at 10/12/16 8:09 PM: Weird, my PR missed my recent commit which rolled back the changes causing this error. Need to simply revert changes to HashJoinIT. Note: The fix is on the existing pull request. was (Author: lomoree): Weird, my PR missed my recent commit which rolled back the changes causing this error. Need to simply revert changes to HashJoinIT. > Double-quote column names that use reserved keywords > > > Key: PHOENIX-3265 > URL: https://issues.apache.org/jira/browse/PHOENIX-3265 > Project: Phoenix > Issue Type: Sub-task >Reporter: James Taylor >Assignee: Eric Lomore > Fix For: 4.9.0 > > > In Phoenix {{date}} is not a reserved word, but perhaps in Calcite it is? If > that's the case, we should surround occurrences of columns named {{date}} in > double quotes to prevent the parser error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PHOENIX-3265) Double-quote column names that use reserved keywords
[ https://issues.apache.org/jira/browse/PHOENIX-3265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15569735#comment-15569735 ] Eric Lomore commented on PHOENIX-3265: -- Weird, my PR missed my recent commit which rolled back the changes causing this error. Need to simply revert changes to HashJoinIT. > Double-quote column names that use reserved keywords > > > Key: PHOENIX-3265 > URL: https://issues.apache.org/jira/browse/PHOENIX-3265 > Project: Phoenix > Issue Type: Sub-task >Reporter: James Taylor >Assignee: Eric Lomore > Fix For: 4.9.0 > > > In Phoenix {{date}} is not a reserved word, but perhaps in Calcite it is? If > that's the case, we should surround occurrences of columns named {{date}} in > double quotes to prevent the parser error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PHOENIX-3265) Double-quote column names that use reserved keywords
[ https://issues.apache.org/jira/browse/PHOENIX-3265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15569724#comment-15569724 ] Eric Lomore commented on PHOENIX-3265: -- Looking into what caused the error > Double-quote column names that use reserved keywords > > > Key: PHOENIX-3265 > URL: https://issues.apache.org/jira/browse/PHOENIX-3265 > Project: Phoenix > Issue Type: Sub-task >Reporter: James Taylor >Assignee: Eric Lomore > Fix For: 4.9.0 > > > In Phoenix {{date}} is not a reserved word, but perhaps in Calcite it is? If > that's the case, we should surround occurrences of columns named {{date}} in > double quotes to prevent the parser error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (PHOENIX-3375) Upgrade from v4.8.1 to 4.9.0 fails
Mujtaba Chohan created PHOENIX-3375: --- Summary: Upgrade from v4.8.1 to 4.9.0 fails Key: PHOENIX-3375 URL: https://issues.apache.org/jira/browse/PHOENIX-3375 Project: Phoenix Issue Type: Bug Affects Versions: 4.9.0 Reporter: Mujtaba Chohan {noformat} Error: Cluster is being concurrently upgraded from 4.8.x to 4.9.x. Please retry establishing connection. (state=INT12,code=2010) org.apache.phoenix.exception.UpgradeInProgressException: Cluster is being concurrently upgraded from 4.8.x to 4.9.x. Please retry establishing connection. at org.apache.phoenix.query.ConnectionQueryServicesImpl.acquireUpgradeMutex(ConnectionQueryServicesImpl.java:2979) at org.apache.phoenix.query.ConnectionQueryServicesImpl.upgradeSystemTables(ConnectionQueryServicesImpl.java:2499) at org.apache.phoenix.query.ConnectionQueryServicesImpl$13.call(ConnectionQueryServicesImpl.java:2413) at org.apache.phoenix.query.ConnectionQueryServicesImpl$13.call(ConnectionQueryServicesImpl.java:2347) at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:76) at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:2347) at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:232) at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:147) at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:202) {noformat} Note: UPGRADE_MUTEX is not present is SYSTEM.CATALOG -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PHOENIX-3375) Upgrade from v4.8.1 to 4.9.0 fails
[ https://issues.apache.org/jira/browse/PHOENIX-3375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mujtaba Chohan updated PHOENIX-3375: Assignee: Samarth Jain > Upgrade from v4.8.1 to 4.9.0 fails > -- > > Key: PHOENIX-3375 > URL: https://issues.apache.org/jira/browse/PHOENIX-3375 > Project: Phoenix > Issue Type: Bug >Affects Versions: 4.9.0 >Reporter: Mujtaba Chohan >Assignee: Samarth Jain > > {noformat} > Error: Cluster is being concurrently upgraded from 4.8.x to 4.9.x. Please > retry establishing connection. (state=INT12,code=2010) > org.apache.phoenix.exception.UpgradeInProgressException: Cluster is being > concurrently upgraded from 4.8.x to 4.9.x. Please retry establishing > connection. > at > org.apache.phoenix.query.ConnectionQueryServicesImpl.acquireUpgradeMutex(ConnectionQueryServicesImpl.java:2979) > at > org.apache.phoenix.query.ConnectionQueryServicesImpl.upgradeSystemTables(ConnectionQueryServicesImpl.java:2499) > at > org.apache.phoenix.query.ConnectionQueryServicesImpl$13.call(ConnectionQueryServicesImpl.java:2413) > at > org.apache.phoenix.query.ConnectionQueryServicesImpl$13.call(ConnectionQueryServicesImpl.java:2347) > at > org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:76) > at > org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:2347) > at > org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:232) > at > org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:147) > at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:202) > {noformat} > Note: UPGRADE_MUTEX is not present is SYSTEM.CATALOG -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PHOENIX-3265) Double-quote column names that use reserved keywords
[ https://issues.apache.org/jira/browse/PHOENIX-3265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15569641#comment-15569641 ] Hudson commented on PHOENIX-3265: - FAILURE: Integrated in Jenkins build Phoenix-master #1437 (See [https://builds.apache.org/job/Phoenix-master/1437/]) PHOENIX-3265 Double-quote column names that use reserved keywords (Eric (maryannxue: rev e280cb9b63619960c4b01510655515157298f1ef) * (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/SortOrderIT.java * (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/AbsFunctionEnd2EndIT.java * (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertValuesIT.java * (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/NthValueFunctionIT.java * (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/ProductMetricsIT.java * (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/ExecuteStatementsIT.java * (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/LastValueFunctionIT.java * (edit) phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java * (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/SubqueryUsingSortMergeJoinIT.java * (edit) phoenix-core/src/test/java/org/apache/phoenix/query/QueryPlanTest.java * (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java * (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/VariableLengthPKIT.java * (edit) phoenix-core/src/test/java/org/apache/phoenix/compile/QueryOptimizerTest.java * (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/HashJoinIT.java * (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/SignFunctionEnd2EndIT.java * (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/SortMergeJoinIT.java * (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/FirstValueFunctionIT.java * (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java * (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayFillFunctionIT.java * (edit) phoenix-core/src/test/java/org/apache/phoenix/compile/JoinQueryCompilerTest.java > Double-quote column names that use reserved keywords > > > Key: PHOENIX-3265 > URL: https://issues.apache.org/jira/browse/PHOENIX-3265 > Project: Phoenix > Issue Type: Sub-task >Reporter: James Taylor >Assignee: Eric Lomore > Fix For: 4.9.0 > > > In Phoenix {{date}} is not a reserved word, but perhaps in Calcite it is? If > that's the case, we should surround occurrences of columns named {{date}} in > double quotes to prevent the parser error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (PHOENIX-3265) Double-quote column names that use reserved keywords
[ https://issues.apache.org/jira/browse/PHOENIX-3265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Maryann Xue resolved PHOENIX-3265. -- Resolution: Fixed Fix Version/s: 4.9.0 Committed to master and 4.x branches. Will sync calcite branch later. Thank you again for your nice work, [~lomoree]! > Double-quote column names that use reserved keywords > > > Key: PHOENIX-3265 > URL: https://issues.apache.org/jira/browse/PHOENIX-3265 > Project: Phoenix > Issue Type: Sub-task >Reporter: James Taylor >Assignee: Eric Lomore > Fix For: 4.9.0 > > > In Phoenix {{date}} is not a reserved word, but perhaps in Calcite it is? If > that's the case, we should surround occurrences of columns named {{date}} in > double quotes to prevent the parser error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PHOENIX-3265) Double-quote column names that use reserved keywords
[ https://issues.apache.org/jira/browse/PHOENIX-3265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Maryann Xue updated PHOENIX-3265: - Summary: Double-quote column names that use reserved keywords (was: Double quote column names that use reserved keywords) > Double-quote column names that use reserved keywords > > > Key: PHOENIX-3265 > URL: https://issues.apache.org/jira/browse/PHOENIX-3265 > Project: Phoenix > Issue Type: Sub-task >Reporter: James Taylor >Assignee: Eric Lomore > > In Phoenix {{date}} is not a reserved word, but perhaps in Calcite it is? If > that's the case, we should surround occurrences of columns named {{date}} in > double quotes to prevent the parser error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PHOENIX-3265) Double quote column names that use reserved keywords
[ https://issues.apache.org/jira/browse/PHOENIX-3265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Maryann Xue updated PHOENIX-3265: - Summary: Double quote column names that use reserved keywords (was: Surround columns named date with double quotes) > Double quote column names that use reserved keywords > > > Key: PHOENIX-3265 > URL: https://issues.apache.org/jira/browse/PHOENIX-3265 > Project: Phoenix > Issue Type: Sub-task >Reporter: James Taylor >Assignee: Eric Lomore > > In Phoenix {{date}} is not a reserved word, but perhaps in Calcite it is? If > that's the case, we should surround occurrences of columns named {{date}} in > double quotes to prevent the parser error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PHOENIX-3374) Wrong data row key is getting generated for local indexes for functions with fixed non null columns
[ https://issues.apache.org/jira/browse/PHOENIX-3374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15569401#comment-15569401 ] James Taylor commented on PHOENIX-3374: --- +1. I can't think of a reason why {{isNullableToBe}} was assumed to be true. Please make sure other unit tests pass too with this change. > Wrong data row key is getting generated for local indexes for functions with > fixed non null columns > --- > > Key: PHOENIX-3374 > URL: https://issues.apache.org/jira/browse/PHOENIX-3374 > Project: Phoenix > Issue Type: Bug >Reporter: Rajeshbabu Chintaguntla >Assignee: Rajeshbabu Chintaguntla > Fix For: 4.9.0, 4.8.2 > > Attachments: PHOENIX-3374.patch > > > When we create local indexes on functions then while joining back missing > columns from data table is generating wrong data row key. > When we generated index row key schema we are initializing isNullableToBe to > true always even if the expression might be not null. Because of this we > might change the column type to other castable one and may consider actual > data as separator bytes. > {noformat} > ... > if (indexField == null) { > Expression e = expressionItr.next(); > isNullableToBe = true; > dataTypeToBe = > IndexUtil.getIndexColumnDataType(isNullableToBe, e.getDataType()); > sortOrderToBe = descIndexColumnBitSet.get(i) ? SortOrder.DESC > : SortOrder.ASC; > maxLengthToBe = e.getMaxLength(); > scaleToBe = e.getScale(); > ... > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (PHOENIX-3372) sparksql no data
[ https://issues.apache.org/jira/browse/PHOENIX-3372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Josh Elser resolved PHOENIX-3372. - Resolution: Incomplete [~gaodazhu], please ask these types of questions on u...@phoenix.apache.org and include more information about your issue. Thanks. > sparksql no data > > > Key: PHOENIX-3372 > URL: https://issues.apache.org/jira/browse/PHOENIX-3372 > Project: Phoenix > Issue Type: Bug >Affects Versions: 4.8.0 > Environment: spark-2.0.0 hive-1.2.1 >Reporter: gaozhu > > sparksql -> hive -> phoenix serde -> no data with column names > hive-shell -> phoenix serde -> data with column names -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PHOENIX-3370) VIEW derived from another VIEW with WHERE on a TABLE doesn't use parent VIEW indexes
[ https://issues.apache.org/jira/browse/PHOENIX-3370?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James Taylor updated PHOENIX-3370: -- Attachment: PHOENIX-3370_wip.patch Attaching unit test that repros the issue. Will work on a fix next. > VIEW derived from another VIEW with WHERE on a TABLE doesn't use parent VIEW > indexes > > > Key: PHOENIX-3370 > URL: https://issues.apache.org/jira/browse/PHOENIX-3370 > Project: Phoenix > Issue Type: Bug >Affects Versions: 4.8.1 >Reporter: Jiping Zhou > Attachments: PHOENIX-3370_wip.patch > > > 1. Create a global table > CREATE TABLE IF NOT EXISTS PLATFORM_ENTITY.GLOBAL_TABLE ( > ORGANIZATION_ID CHAR(15) NOT NULL, > KEY_PREFIX CHAR(3) NOT NULL, > CREATED_DATE DATE, > CREATED_BY CHAR(15), > CONSTRAINT PK PRIMARY KEY ( > ORGANIZATION_ID, > KEY_PREFIX > ) > ) VERSIONS=1, IMMUTABLE_ROWS=true, MULTI_TENANT=true; > 2. Create a global view on base global table with where clause > CREATE VIEW IF NOT EXISTS PLATFORM_ENTITY.GLOBAL_VIEW ( > INT1 BIGINT NOT NULL, > DOUBLE1 DECIMAL(12, 3), > IS_BOOLEAN BOOLEAN, > TEXT1 VARCHAR, > CONSTRAINT PKVIEW PRIMARY KEY > ( > INT1 > ) > ) > AS SELECT * FROM PLATFORM_ENTITY.GLOBAL_TABLE WHERE KEY_PREFIX = '123'; > 3. Create gloabl index on the global view > CREATE INDEX IF NOT EXISTS GLOBAL_INDEX > ON PLATFORM_ENTITY.GLOBAL_VIEW (TEXT1 DESC, INT1) > INCLUDE (CREATED_BY, DOUBLE1, IS_BOOLEAN, CREATED_DATE); > 4. Create tenant specific view on top of global view > CREATE VIEW IF NOT EXISTS PLATFORM_ENTITY.TENANT_VIEW > AS SELECT * FROM PLATFORM_ENTITY.GLOBAL_VIEW; > 5. Query in global view > EXPLAIN SELECT DOUBLE1 FROM PLATFORM_ENTITY.GLOBAL_VIEW WHERE ORGANIZATION_ID > = '00Dxx002Col' AND TEXT1='Test' AND INT1=1; > The result is > CLIENT 1-CHUNK 1 ROWS 452 BYTES PARALLEL 1-WAY ROUND ROBIN POINT LOOKUP ON 1 > KEY OVER PLATFORM_ENTITY.GLOBAL_TABLE > SERVER FILTER BY TEXT1 = 'Test' > It is not using the secondary index at all. The same thing happens on the > Tenant view. > However if we have a global view without where clause like > CREATE VIEW IF NOT EXISTS PLATFORM_ENTITY.GLOBAL_VIEW2 ( > INT1 BIGINT NOT NULL, > DOUBLE1 DECIMAL(12, 3), > IS_BOOLEAN BOOLEAN, > TEXT1 VARCHAR, > CONSTRAINT PKVIEW PRIMARY KEY > ( > INT1 > ) > ) > AS SELECT * FROM PLATFORM_ENTITY.GLOBAL_TABLE; > CREATE INDEX IF NOT EXISTS GLOBAL_INDEX2 > ON PLATFORM_ENTITY.GLOBAL_VIEW2 (TEXT1 DESC, INT1) > INCLUDE (CREATED_BY, DOUBLE1, IS_BOOLEAN, CREATED_DATE); > EXPLAIN SELECT DOUBLE1 FROM PLATFORM_ENTITY.GLOBAL_VIEW2 WHERE > ORGANIZATION_ID = '00Dxx002Col' AND TEXT1='Test' AND INT1=1 ORDER BY > TEXT1 DESC, INT1; > The secondary index will be correctly used. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PHOENIX-3374) Wrong data row key is getting generated for local indexes for functions with fixed non null columns
[ https://issues.apache.org/jira/browse/PHOENIX-3374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15569345#comment-15569345 ] Hadoop QA commented on PHOENIX-3374: {color:red}-1 overall{color}. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12832939/PHOENIX-3374.patch against master branch at commit d1156eaadfc72d9bcfe6418fa98a170d27b18264. ATTACHMENT ID: 12832939 {color:green}+1 @author{color}. The patch does not contain any @author tags. {color:red}-1 tests included{color}. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. {color:red}-1 patch{color}. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/623//console This message is automatically generated. > Wrong data row key is getting generated for local indexes for functions with > fixed non null columns > --- > > Key: PHOENIX-3374 > URL: https://issues.apache.org/jira/browse/PHOENIX-3374 > Project: Phoenix > Issue Type: Bug >Reporter: Rajeshbabu Chintaguntla >Assignee: Rajeshbabu Chintaguntla > Fix For: 4.9.0, 4.8.2 > > Attachments: PHOENIX-3374.patch > > > When we create local indexes on functions then while joining back missing > columns from data table is generating wrong data row key. > When we generated index row key schema we are initializing isNullableToBe to > true always even if the expression might be not null. Because of this we > might change the column type to other castable one and may consider actual > data as separator bytes. > {noformat} > ... > if (indexField == null) { > Expression e = expressionItr.next(); > isNullableToBe = true; > dataTypeToBe = > IndexUtil.getIndexColumnDataType(isNullableToBe, e.getDataType()); > sortOrderToBe = descIndexColumnBitSet.get(i) ? SortOrder.DESC > : SortOrder.ASC; > maxLengthToBe = e.getMaxLength(); > scaleToBe = e.getScale(); > ... > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PHOENIX-3374) Wrong data row key is getting generated for local indexes for functions with fixed non null columns
[ https://issues.apache.org/jira/browse/PHOENIX-3374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rajeshbabu Chintaguntla updated PHOENIX-3374: - Attachment: PHOENIX-3374.patch Here is the patch. [~jamestaylor] Please review. > Wrong data row key is getting generated for local indexes for functions with > fixed non null columns > --- > > Key: PHOENIX-3374 > URL: https://issues.apache.org/jira/browse/PHOENIX-3374 > Project: Phoenix > Issue Type: Bug >Reporter: Rajeshbabu Chintaguntla >Assignee: Rajeshbabu Chintaguntla > Fix For: 4.9.0, 4.8.2 > > Attachments: PHOENIX-3374.patch > > > When we create local indexes on functions then while joining back missing > columns from data table is generating wrong data row key. > When we generated index row key schema we are initializing isNullableToBe to > true always even if the expression might be not null. Because of this we > might change the column type to other castable one and may consider actual > data as separator bytes. > {noformat} > ... > if (indexField == null) { > Expression e = expressionItr.next(); > isNullableToBe = true; > dataTypeToBe = > IndexUtil.getIndexColumnDataType(isNullableToBe, e.getDataType()); > sortOrderToBe = descIndexColumnBitSet.get(i) ? SortOrder.DESC > : SortOrder.ASC; > maxLengthToBe = e.getMaxLength(); > scaleToBe = e.getScale(); > ... > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (PHOENIX-3374) Wrong data row key is getting generated for local indexes for functions with fixed non null columns
Rajeshbabu Chintaguntla created PHOENIX-3374: Summary: Wrong data row key is getting generated for local indexes for functions with fixed non null columns Key: PHOENIX-3374 URL: https://issues.apache.org/jira/browse/PHOENIX-3374 Project: Phoenix Issue Type: Bug Reporter: Rajeshbabu Chintaguntla Assignee: Rajeshbabu Chintaguntla Fix For: 4.9.0, 4.8.2 When we create local indexes on functions then while joining back missing columns from data table is generating wrong data row key. When we generated index row key schema we are initializing isNullableToBe to true always even if the expression might be not null. Because of this we might change the column type to other castable one and may consider actual data as separator bytes. {noformat} ... if (indexField == null) { Expression e = expressionItr.next(); isNullableToBe = true; dataTypeToBe = IndexUtil.getIndexColumnDataType(isNullableToBe, e.getDataType()); sortOrderToBe = descIndexColumnBitSet.get(i) ? SortOrder.DESC : SortOrder.ASC; maxLengthToBe = e.getMaxLength(); scaleToBe = e.getScale(); ... {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PHOENIX-3265) Surround columns named date with double quotes
[ https://issues.apache.org/jira/browse/PHOENIX-3265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15569272#comment-15569272 ] ASF GitHub Bot commented on PHOENIX-3265: - GitHub user lomoree opened a pull request: https://github.com/apache/phoenix/pull/218 PHOENIX-3265 Surround columns named date with double quotes -- Intended to make phoenix compatible with calcite. Calcite has reserved keywords such as date and dec which must be surrounded with quotes. You can merge this pull request into a Git repository by running: $ git pull https://github.com/bloomberg/phoenix master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/phoenix/pull/218.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #218 commit 3ba4f1977e81b5da1c4b9717a07036a0ae7bc520 Author: EricDate: 2016-10-05T18:55:59Z PHOENIX-3265 Surround columns named date with double quotes > Surround columns named date with double quotes > -- > > Key: PHOENIX-3265 > URL: https://issues.apache.org/jira/browse/PHOENIX-3265 > Project: Phoenix > Issue Type: Sub-task >Reporter: James Taylor >Assignee: Eric Lomore > > In Phoenix {{date}} is not a reserved word, but perhaps in Calcite it is? If > that's the case, we should surround occurrences of columns named {{date}} in > double quotes to prevent the parser error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[GitHub] phoenix pull request #218: PHOENIX-3265 Surround columns named date with dou...
GitHub user lomoree opened a pull request: https://github.com/apache/phoenix/pull/218 PHOENIX-3265 Surround columns named date with double quotes -- Intended to make phoenix compatible with calcite. Calcite has reserved keywords such as date and dec which must be surrounded with quotes. You can merge this pull request into a Git repository by running: $ git pull https://github.com/bloomberg/phoenix master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/phoenix/pull/218.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #218 commit 3ba4f1977e81b5da1c4b9717a07036a0ae7bc520 Author: EricDate: 2016-10-05T18:55:59Z PHOENIX-3265 Surround columns named date with double quotes --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] phoenix pull request #215: PHOENIX-3345 SQLException code's not propagating ...
Github user lomoree commented on a diff in the pull request: https://github.com/apache/phoenix/pull/215#discussion_r83024234 --- Diff: phoenix-core/src/main/java/org/apache/phoenix/calcite/CalciteUtils.java --- @@ -1120,8 +1120,11 @@ public static SQLException unwrapSqlException(SQLException root){ Exception e = root; while(e.getCause() != null){ e = (Exception) e.getCause(); +if(e instanceof RuntimeException && e.getCause() instanceof SQLException) { --- End diff -- Latest changes attempt to locate the nested SQLException within an RuntimeException. We still throw the first SQLException seen in case there's no wrapping argument exception. And if no matches are found, we throw the root so as to avoid unexpected behavior. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Commented] (PHOENIX-3345) SQLException code's not propagating as expected
[ https://issues.apache.org/jira/browse/PHOENIX-3345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15568954#comment-15568954 ] ASF GitHub Bot commented on PHOENIX-3345: - Github user lomoree commented on a diff in the pull request: https://github.com/apache/phoenix/pull/215#discussion_r83024234 --- Diff: phoenix-core/src/main/java/org/apache/phoenix/calcite/CalciteUtils.java --- @@ -1120,8 +1120,11 @@ public static SQLException unwrapSqlException(SQLException root){ Exception e = root; while(e.getCause() != null){ e = (Exception) e.getCause(); +if(e instanceof RuntimeException && e.getCause() instanceof SQLException) { --- End diff -- Latest changes attempt to locate the nested SQLException within an RuntimeException. We still throw the first SQLException seen in case there's no wrapping argument exception. And if no matches are found, we throw the root so as to avoid unexpected behavior. > SQLException code's not propagating as expected > --- > > Key: PHOENIX-3345 > URL: https://issues.apache.org/jira/browse/PHOENIX-3345 > Project: Phoenix > Issue Type: Sub-task >Reporter: Eric Lomore >Assignee: Eric Lomore > Attachments: variablestate.png > > > Perhaps this is intended by Calcite, but when errors are thrown by execute() > functions the error code that is initially thrown (say 1000) does not make > its way to the final SQLException on top. > This is prevalent in multiple tests throughout QueryCompilerTest.java. One > such example is included below. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PHOENIX-3373) Phoenix Running/Completed/Failed query tracker
[ https://issues.apache.org/jira/browse/PHOENIX-3373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] madhu raghavendra updated PHOENIX-3373: --- Description: We need to monitor the running/completed/failed hbase/phoenix queries to analyze/troubleshoot if they are long running.We need these details to be available in log or some table. So our requirement is like phoenix should have a web UI which shows that required query information. was:We need to monitor the running/completed/failed hbase/phoenix queries to analyze/troubleshoot if they are long running.We need these details to be available in log or some table. > Phoenix Running/Completed/Failed query tracker > -- > > Key: PHOENIX-3373 > URL: https://issues.apache.org/jira/browse/PHOENIX-3373 > Project: Phoenix > Issue Type: New Feature >Affects Versions: 4.8.0 >Reporter: madhu raghavendra > Fix For: verify > > > We need to monitor the running/completed/failed hbase/phoenix queries to > analyze/troubleshoot if they are long running.We need these details to be > available in log or some table. > So our requirement is like phoenix should have a web UI which shows that > required query information. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PHOENIX-3373) Phoenix Running/Completed/Failed query tracker
[ https://issues.apache.org/jira/browse/PHOENIX-3373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] madhu raghavendra updated PHOENIX-3373: --- Description: We need to monitor the running/completed/failed hbase/phoenix queries to analyze/troubleshoot if they are long running.We need these details to be available in log or some table. (was: We need to monitor the running/completed/failed hbase/phoenix queries to analyze/troubleshoot if they are long running.) > Phoenix Running/Completed/Failed query tracker > -- > > Key: PHOENIX-3373 > URL: https://issues.apache.org/jira/browse/PHOENIX-3373 > Project: Phoenix > Issue Type: New Feature >Affects Versions: 4.8.0 >Reporter: madhu raghavendra > Fix For: verify > > > We need to monitor the running/completed/failed hbase/phoenix queries to > analyze/troubleshoot if they are long running.We need these details to be > available in log or some table. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PHOENIX-3373) Phoenix Running/Completed/Failed query tracker
[ https://issues.apache.org/jira/browse/PHOENIX-3373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] madhu raghavendra updated PHOENIX-3373: --- Issue Type: New Feature (was: Wish) > Phoenix Running/Completed/Failed query tracker > -- > > Key: PHOENIX-3373 > URL: https://issues.apache.org/jira/browse/PHOENIX-3373 > Project: Phoenix > Issue Type: New Feature >Affects Versions: 4.8.0 >Reporter: madhu raghavendra > Fix For: verify > > > We need to monitor the running/completed/failed hbase/phoenix queries to > analyze/troubleshoot if they are long running. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (PHOENIX-3373) Phoenix Running/Completed/Failed query tracker
madhu raghavendra created PHOENIX-3373: -- Summary: Phoenix Running/Completed/Failed query tracker Key: PHOENIX-3373 URL: https://issues.apache.org/jira/browse/PHOENIX-3373 Project: Phoenix Issue Type: Wish Affects Versions: 4.8.0 Reporter: madhu raghavendra Fix For: verify We need to monitor the running/completed/failed hbase/phoenix queries to analyze/troubleshoot if they are long running. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PHOENIX-2935) IndexMetaData cache can expire when a delete and or query running on server
[ https://issues.apache.org/jira/browse/PHOENIX-2935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15568217#comment-15568217 ] Hudson commented on PHOENIX-2935: - SUCCESS: Integrated in Jenkins build Phoenix-master #1436 (See [https://builds.apache.org/job/Phoenix-master/1436/]) PHOENIX-2935 IndexMetaData cache can expire when a delete and or query (ankitsinghal59: rev d1156eaadfc72d9bcfe6418fa98a170d27b18264) * (edit) phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java * (edit) phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java * (edit) phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java * (edit) phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexMetaData.java > IndexMetaData cache can expire when a delete and or query running on server > --- > > Key: PHOENIX-2935 > URL: https://issues.apache.org/jira/browse/PHOENIX-2935 > Project: Phoenix > Issue Type: Bug >Reporter: Ankit Singhal >Assignee: Ankit Singhal > Labels: index > Fix For: 4.9.0 > > Attachments: PHOENIX-2935.patch > > > IndexMetaData cache can expire when a delete or upsert query is running on > server. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PHOENIX-2935) IndexMetaData cache can expire when a delete and or query running on server
[ https://issues.apache.org/jira/browse/PHOENIX-2935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15568074#comment-15568074 ] Ankit Singhal commented on PHOENIX-2935: Thanks [~jamestaylor] and [~enis]. Committed to 4.x branches and master. > IndexMetaData cache can expire when a delete and or query running on server > --- > > Key: PHOENIX-2935 > URL: https://issues.apache.org/jira/browse/PHOENIX-2935 > Project: Phoenix > Issue Type: Bug >Reporter: Ankit Singhal >Assignee: Ankit Singhal > Labels: index > Fix For: 4.9.0 > > Attachments: PHOENIX-2935.patch > > > IndexMetaData cache can expire when a delete or upsert query is running on > server. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (PHOENIX-3372) sparksql no data
gaozhu created PHOENIX-3372: --- Summary: sparksql no data Key: PHOENIX-3372 URL: https://issues.apache.org/jira/browse/PHOENIX-3372 Project: Phoenix Issue Type: Bug Affects Versions: 4.8.0 Environment: spark-2.0.0 hive-1.2.1 Reporter: gaozhu sparksql -> hive -> phoenix serde -> no data with column names hive-shell -> phoenix serde -> data with column names -- This message was sent by Atlassian JIRA (v6.3.4#6332)