You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2020/03/25 00:20:01 UTC
[GitHub] [phoenix] dbwong opened a new pull request #742: Phoenix-5797 RVC
Offset does not work with tenant views on global indexes
dbwong opened a new pull request #742: Phoenix-5797 RVC Offset does not work with tenant views on global indexes
URL: https://github.com/apache/phoenix/pull/742
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [phoenix] yanxinyi commented on a change in pull request #742:
Phoenix-5797 RVC Offset does not work with tenant views on global indexes
Posted by GitBox <gi...@apache.org>.
yanxinyi commented on a change in pull request #742: Phoenix-5797 RVC Offset does not work with tenant views on global indexes
URL: https://github.com/apache/phoenix/pull/742#discussion_r397544127
##########
File path: phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorOffsetIT.java
##########
@@ -940,4 +941,70 @@ public void testOffsetExplain() throws SQLException {
assertTrue(explainStringBuilder.toString().contains("With RVC Offset"));
}
}
+
+ @Test public void testGlobalIndexViewAccess() throws Exception {
+ String
+ ddl =
+ "CREATE TABLE IF NOT EXISTS ARCHIVE.FIELD_HISTORY_ARCHIVE (\n"
+ + " ORGANIZATION_ID CHAR(15) NOT NULL,\n"
+ + " PARENT_KEY_PREFIX CHAR(3) NOT NULL,\n"
+ + " PARENT_ID CHAR(15) NOT NULL,\n" + " CREATED_DATE DATE NOT NULL,\n"
+ + " DATA VARCHAR \n" + " CONSTRAINT PK PRIMARY KEY \n" + " (\n"
+ + " ORGANIZATION_ID, \n" + " PARENT_KEY_PREFIX,\n"
+ + " PARENT_ID,\n" + " CREATED_DATE\n" + " )\n"
+ + ") MULTI_TENANT=true";
+
+ //Index reorders the pk only
+ String
Review comment:
nit: weird line break
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [phoenix] dbwong commented on issue #742: Phoenix-5797 RVC Offset
does not work with tenant views on global indexes
Posted by GitBox <gi...@apache.org>.
dbwong commented on issue #742: Phoenix-5797 RVC Offset does not work with tenant views on global indexes
URL: https://github.com/apache/phoenix/pull/742#issuecomment-603573249
@yanxinyi @ChinmaySKulkarni review for issue with global indexes in tenant views.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [phoenix] yanxinyi commented on a change in pull request #742:
Phoenix-5797 RVC Offset does not work with tenant views on global indexes
Posted by GitBox <gi...@apache.org>.
yanxinyi commented on a change in pull request #742: Phoenix-5797 RVC Offset does not work with tenant views on global indexes
URL: https://github.com/apache/phoenix/pull/742#discussion_r397544315
##########
File path: phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorOffsetIT.java
##########
@@ -940,4 +941,70 @@ public void testOffsetExplain() throws SQLException {
assertTrue(explainStringBuilder.toString().contains("With RVC Offset"));
}
}
+
+ @Test public void testGlobalIndexViewAccess() throws Exception {
+ String
+ ddl =
Review comment:
nit: weird line break
`String ddl =` should be a single line?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [phoenix] yanxinyi commented on a change in pull request #742:
Phoenix-5797 RVC Offset does not work with tenant views on global indexes
Posted by GitBox <gi...@apache.org>.
yanxinyi commented on a change in pull request #742: Phoenix-5797 RVC Offset does not work with tenant views on global indexes
URL: https://github.com/apache/phoenix/pull/742#discussion_r397544399
##########
File path: phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorOffsetIT.java
##########
@@ -940,4 +941,70 @@ public void testOffsetExplain() throws SQLException {
assertTrue(explainStringBuilder.toString().contains("With RVC Offset"));
}
}
+
+ @Test public void testGlobalIndexViewAccess() throws Exception {
+ String
+ ddl =
+ "CREATE TABLE IF NOT EXISTS ARCHIVE.FIELD_HISTORY_ARCHIVE (\n"
+ + " ORGANIZATION_ID CHAR(15) NOT NULL,\n"
+ + " PARENT_KEY_PREFIX CHAR(3) NOT NULL,\n"
+ + " PARENT_ID CHAR(15) NOT NULL,\n" + " CREATED_DATE DATE NOT NULL,\n"
+ + " DATA VARCHAR \n" + " CONSTRAINT PK PRIMARY KEY \n" + " (\n"
+ + " ORGANIZATION_ID, \n" + " PARENT_KEY_PREFIX,\n"
+ + " PARENT_ID,\n" + " CREATED_DATE\n" + " )\n"
+ + ") MULTI_TENANT=true";
+
+ //Index reorders the pk only
+ String
+ indexSyncDDL =
+ "CREATE INDEX IF NOT EXISTS FIELD_HISTORY_ARCHIVE_INDEX\n"
+ + "ON ARCHIVE.FIELD_HISTORY_ARCHIVE (PARENT_KEY_PREFIX, CREATED_DATE, PARENT_ID)\n"
+ + "INCLUDE (DATA)";
+
+ String
+ viewDDL =
+ "CREATE VIEW IF NOT EXISTS ARCHIVE.\"1HA\" AS SELECT * FROM ARCHIVE.\"FIELD_HISTORY_ARCHIVE\"";
+ try (Statement statement = conn.createStatement()) {
+ statement.execute(ddl);
+ statement.execute(indexSyncDDL);
+ //statement.execute(viewDDL);
Review comment:
remove unused line
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [phoenix] dbwong commented on a change in pull request #742:
Phoenix-5797 RVC Offset does not work with tenant views on global indexes
Posted by GitBox <gi...@apache.org>.
dbwong commented on a change in pull request #742: Phoenix-5797 RVC Offset does not work with tenant views on global indexes
URL: https://github.com/apache/phoenix/pull/742#discussion_r397546379
##########
File path: phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorOffsetIT.java
##########
@@ -940,4 +941,70 @@ public void testOffsetExplain() throws SQLException {
assertTrue(explainStringBuilder.toString().contains("With RVC Offset"));
}
}
+
+ @Test public void testGlobalIndexViewAccess() throws Exception {
+ String
+ ddl =
+ "CREATE TABLE IF NOT EXISTS ARCHIVE.FIELD_HISTORY_ARCHIVE (\n"
+ + " ORGANIZATION_ID CHAR(15) NOT NULL,\n"
+ + " PARENT_KEY_PREFIX CHAR(3) NOT NULL,\n"
+ + " PARENT_ID CHAR(15) NOT NULL,\n" + " CREATED_DATE DATE NOT NULL,\n"
+ + " DATA VARCHAR \n" + " CONSTRAINT PK PRIMARY KEY \n" + " (\n"
+ + " ORGANIZATION_ID, \n" + " PARENT_KEY_PREFIX,\n"
+ + " PARENT_ID,\n" + " CREATED_DATE\n" + " )\n"
+ + ") MULTI_TENANT=true";
+
+ //Index reorders the pk only
+ String
Review comment:
i think i used the phoenix code formatter and it did this i can see if i can trick it into formatting nicer.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [phoenix] dbwong commented on a change in pull request #742:
Phoenix-5797 RVC Offset does not work with tenant views on global indexes
Posted by GitBox <gi...@apache.org>.
dbwong commented on a change in pull request #742: Phoenix-5797 RVC Offset does not work with tenant views on global indexes
URL: https://github.com/apache/phoenix/pull/742#discussion_r397546360
##########
File path: phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorOffsetIT.java
##########
@@ -940,4 +941,70 @@ public void testOffsetExplain() throws SQLException {
assertTrue(explainStringBuilder.toString().contains("With RVC Offset"));
}
}
+
+ @Test public void testGlobalIndexViewAccess() throws Exception {
+ String
+ ddl =
Review comment:
i think i used the phoenix code formatter and it did this i can see if i can trick it into formatting nicer.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [phoenix] dbwong commented on a change in pull request #742:
Phoenix-5797 RVC Offset does not work with tenant views on global indexes
Posted by GitBox <gi...@apache.org>.
dbwong commented on a change in pull request #742: Phoenix-5797 RVC Offset does not work with tenant views on global indexes
URL: https://github.com/apache/phoenix/pull/742#discussion_r397546006
##########
File path: phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorOffsetIT.java
##########
@@ -940,4 +941,70 @@ public void testOffsetExplain() throws SQLException {
assertTrue(explainStringBuilder.toString().contains("With RVC Offset"));
}
}
+
+ @Test public void testGlobalIndexViewAccess() throws Exception {
+ String
+ ddl =
+ "CREATE TABLE IF NOT EXISTS ARCHIVE.FIELD_HISTORY_ARCHIVE (\n"
+ + " ORGANIZATION_ID CHAR(15) NOT NULL,\n"
+ + " PARENT_KEY_PREFIX CHAR(3) NOT NULL,\n"
+ + " PARENT_ID CHAR(15) NOT NULL,\n" + " CREATED_DATE DATE NOT NULL,\n"
+ + " DATA VARCHAR \n" + " CONSTRAINT PK PRIMARY KEY \n" + " (\n"
+ + " ORGANIZATION_ID, \n" + " PARENT_KEY_PREFIX,\n"
+ + " PARENT_ID,\n" + " CREATED_DATE\n" + " )\n"
+ + ") MULTI_TENANT=true";
+
+ //Index reorders the pk only
+ String
+ indexSyncDDL =
+ "CREATE INDEX IF NOT EXISTS FIELD_HISTORY_ARCHIVE_INDEX\n"
+ + "ON ARCHIVE.FIELD_HISTORY_ARCHIVE (PARENT_KEY_PREFIX, CREATED_DATE, PARENT_ID)\n"
+ + "INCLUDE (DATA)";
+
+ String
+ viewDDL =
+ "CREATE VIEW IF NOT EXISTS ARCHIVE.\"1HA\" AS SELECT * FROM ARCHIVE.\"FIELD_HISTORY_ARCHIVE\"";
+ try (Statement statement = conn.createStatement()) {
+ statement.execute(ddl);
+ statement.execute(indexSyncDDL);
+ //statement.execute(viewDDL);
Review comment:
Done
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [phoenix] dbwong closed pull request #742: Phoenix-5797 RVC Offset
does not work with tenant views on global indexes
Posted by GitBox <gi...@apache.org>.
dbwong closed pull request #742: Phoenix-5797 RVC Offset does not work with tenant views on global indexes
URL: https://github.com/apache/phoenix/pull/742
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [phoenix] yanxinyi commented on a change in pull request #742:
Phoenix-5797 RVC Offset does not work with tenant views on global indexes
Posted by GitBox <gi...@apache.org>.
yanxinyi commented on a change in pull request #742: Phoenix-5797 RVC Offset does not work with tenant views on global indexes
URL: https://github.com/apache/phoenix/pull/742#discussion_r397544348
##########
File path: phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorOffsetIT.java
##########
@@ -940,4 +941,70 @@ public void testOffsetExplain() throws SQLException {
assertTrue(explainStringBuilder.toString().contains("With RVC Offset"));
}
}
+
+ @Test public void testGlobalIndexViewAccess() throws Exception {
+ String
+ ddl =
+ "CREATE TABLE IF NOT EXISTS ARCHIVE.FIELD_HISTORY_ARCHIVE (\n"
+ + " ORGANIZATION_ID CHAR(15) NOT NULL,\n"
+ + " PARENT_KEY_PREFIX CHAR(3) NOT NULL,\n"
+ + " PARENT_ID CHAR(15) NOT NULL,\n" + " CREATED_DATE DATE NOT NULL,\n"
+ + " DATA VARCHAR \n" + " CONSTRAINT PK PRIMARY KEY \n" + " (\n"
+ + " ORGANIZATION_ID, \n" + " PARENT_KEY_PREFIX,\n"
+ + " PARENT_ID,\n" + " CREATED_DATE\n" + " )\n"
+ + ") MULTI_TENANT=true";
+
+ //Index reorders the pk only
+ String
+ indexSyncDDL =
+ "CREATE INDEX IF NOT EXISTS FIELD_HISTORY_ARCHIVE_INDEX\n"
+ + "ON ARCHIVE.FIELD_HISTORY_ARCHIVE (PARENT_KEY_PREFIX, CREATED_DATE, PARENT_ID)\n"
+ + "INCLUDE (DATA)";
+
+ String
+ viewDDL =
Review comment:
nit: weird line break
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [phoenix] yanxinyi commented on issue #742: Phoenix-5797 RVC Offset
does not work with tenant views on global indexes
Posted by GitBox <gi...@apache.org>.
yanxinyi commented on issue #742: Phoenix-5797 RVC Offset does not work with tenant views on global indexes
URL: https://github.com/apache/phoenix/pull/742#issuecomment-611872902
can you close this pull request? I already merged your patch, thanks.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [phoenix] dbwong commented on a change in pull request #742:
Phoenix-5797 RVC Offset does not work with tenant views on global indexes
Posted by GitBox <gi...@apache.org>.
dbwong commented on a change in pull request #742: Phoenix-5797 RVC Offset does not work with tenant views on global indexes
URL: https://github.com/apache/phoenix/pull/742#discussion_r397546341
##########
File path: phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorOffsetIT.java
##########
@@ -940,4 +941,70 @@ public void testOffsetExplain() throws SQLException {
assertTrue(explainStringBuilder.toString().contains("With RVC Offset"));
}
}
+
+ @Test public void testGlobalIndexViewAccess() throws Exception {
+ String
+ ddl =
+ "CREATE TABLE IF NOT EXISTS ARCHIVE.FIELD_HISTORY_ARCHIVE (\n"
+ + " ORGANIZATION_ID CHAR(15) NOT NULL,\n"
+ + " PARENT_KEY_PREFIX CHAR(3) NOT NULL,\n"
+ + " PARENT_ID CHAR(15) NOT NULL,\n" + " CREATED_DATE DATE NOT NULL,\n"
+ + " DATA VARCHAR \n" + " CONSTRAINT PK PRIMARY KEY \n" + " (\n"
+ + " ORGANIZATION_ID, \n" + " PARENT_KEY_PREFIX,\n"
+ + " PARENT_ID,\n" + " CREATED_DATE\n" + " )\n"
+ + ") MULTI_TENANT=true";
+
+ //Index reorders the pk only
+ String
+ indexSyncDDL =
+ "CREATE INDEX IF NOT EXISTS FIELD_HISTORY_ARCHIVE_INDEX\n"
+ + "ON ARCHIVE.FIELD_HISTORY_ARCHIVE (PARENT_KEY_PREFIX, CREATED_DATE, PARENT_ID)\n"
+ + "INCLUDE (DATA)";
+
+ String
+ viewDDL =
Review comment:
i think i used the phoenix code formatter and it did this i can see if i can trick it into formatting nicer.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services