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/09/28 20:59:31 UTC

[GitHub] [phoenix] yanxinyi opened a new pull request #898: PHOENIX-6158 create table/view should not update VIEW_INDEX_ID_DATA_T…

yanxinyi opened a new pull request #898:
URL: https://github.com/apache/phoenix/pull/898


   …YPE column


----------------------------------------------------------------
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



[GitHub] [phoenix] stoty commented on pull request #898: PHOENIX-6158 create table/view should not update VIEW_INDEX_ID_DATA_T…

Posted by GitBox <gi...@apache.org>.
stoty commented on pull request #898:
URL: https://github.com/apache/phoenix/pull/898#issuecomment-718272614


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   6m 22s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  Patch does not have any anti-patterns.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   | -1 :x: |  test4tests  |   0m  0s |  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.  |
   ||| _ 4.x Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  11m 37s |  4.x passed  |
   | +1 :green_heart: |  compile  |   1m  0s |  4.x passed  |
   | +1 :green_heart: |  checkstyle  |   1m 16s |  4.x passed  |
   | +1 :green_heart: |  javadoc  |   0m 45s |  4.x passed  |
   | +0 :ok: |  spotbugs  |   3m  6s |  phoenix-core in 4.x has 953 extant spotbugs warnings.  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   6m 17s |  the patch passed  |
   | +1 :green_heart: |  compile  |   1m  0s |  the patch passed  |
   | +1 :green_heart: |  javac  |   1m  0s |  the patch passed  |
   | -1 :x: |  checkstyle  |   1m 16s |  phoenix-core: The patch generated 3 new + 2823 unchanged - 1 fixed = 2826 total (was 2824)  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  javadoc  |   0m 45s |  the patch passed  |
   | +1 :green_heart: |  spotbugs  |   3m 20s |  the patch passed  |
   ||| _ Other Tests _ |
   | -1 :x: |  unit  | 177m 35s |  phoenix-core in the patch failed.  |
   | +1 :green_heart: |  asflicense  |   0m 29s |  The patch does not generate ASF License warnings.  |
   |  |   | 217m 16s |   |
   
   
   | Reason | Tests |
   |-------:|:------|
   | Failed junit tests | TEST-[InQueryIT_0] |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-898/4/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/phoenix/pull/898 |
   | Optional Tests | dupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile |
   | uname | Linux a5510bc4c95a 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev/phoenix-personality.sh |
   | git revision | 4.x / ac0538b |
   | Default Java | Private Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08 |
   | checkstyle | https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-898/4/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt |
   | unit | https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-898/4/artifact/yetus-general-check/output/patch-unit-phoenix-core.txt |
   |  Test Results | https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-898/4/testReport/ |
   | Max. process+thread count | 5971 (vs. ulimit of 30000) |
   | modules | C: phoenix-core U: phoenix-core |
   | Console output | https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-898/4/console |
   | versions | git=2.7.4 maven=3.3.9 spotbugs=4.1.3 |
   | Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


----------------------------------------------------------------
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



[GitHub] [phoenix] yanxinyi commented on pull request #898: PHOENIX-6158 create table/view should not update VIEW_INDEX_ID_DATA_T…

Posted by GitBox <gi...@apache.org>.
yanxinyi commented on pull request #898:
URL: https://github.com/apache/phoenix/pull/898#issuecomment-701530240


   > Just a couple of tiny nits, then +1
   
   Thanks for spending time and reviewing here :) 


----------------------------------------------------------------
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



[GitHub] [phoenix] gjacoby126 commented on a change in pull request #898: PHOENIX-6158 create table/view should not update VIEW_INDEX_ID_DATA_T…

Posted by GitBox <gi...@apache.org>.
gjacoby126 commented on a change in pull request #898:
URL: https://github.com/apache/phoenix/pull/898#discussion_r497257076



##########
File path: phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
##########
@@ -626,4 +632,42 @@ private int getRowCountOfView(Connection conn, String schemaName, String viewNam
       }
       return size;
     }
+
+    @Test
+    public void testIndexIdDataTypeDefaultValue() throws Exception {
+        String tableName = "T_" + generateUniqueName();
+        String globalViewName = "V_" + generateUniqueName();
+        String globalViewIndexName = "GV_" + generateUniqueName();
+        try (Connection globalConn = getConnection()) {
+            createBaseTable(SCHEMA1, tableName, true, 0, null, true);
+            createView(globalConn, SCHEMA1, globalViewName, tableName);
+            createViewIndex(globalConn, SCHEMA1, globalViewIndexName, globalViewName, "v1");
+
+            String sql = "SELECT " + VIEW_INDEX_ID_DATA_TYPE + " FROM " + SYSTEM_CATALOG_NAME + " WHERE " +
+                    TABLE_SCHEM + " = '%s' AND " +
+                    TABLE_NAME + " = '%s' AND " +
+                    COLUMN_COUNT + " IS NOT NULL";
+            // should not have default value for table
+            ResultSet rs = globalConn.createStatement().executeQuery(String.format(sql, SCHEMA1, tableName));
+            if (rs.next()) {
+                assertEquals(null, rs.getObject(1));
+            } else {
+                fail();
+            }
+            // should not have default value for view
+            rs = globalConn.createStatement().executeQuery(String.format(sql, SCHEMA1, globalViewName));
+            if (rs.next()) {
+                assertEquals(null, rs.getObject(1));

Review comment:
       nit: also assertIsNull here

##########
File path: phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
##########
@@ -626,4 +632,42 @@ private int getRowCountOfView(Connection conn, String schemaName, String viewNam
       }
       return size;
     }
+
+    @Test
+    public void testIndexIdDataTypeDefaultValue() throws Exception {
+        String tableName = "T_" + generateUniqueName();
+        String globalViewName = "V_" + generateUniqueName();
+        String globalViewIndexName = "GV_" + generateUniqueName();
+        try (Connection globalConn = getConnection()) {
+            createBaseTable(SCHEMA1, tableName, true, 0, null, true);
+            createView(globalConn, SCHEMA1, globalViewName, tableName);
+            createViewIndex(globalConn, SCHEMA1, globalViewIndexName, globalViewName, "v1");
+
+            String sql = "SELECT " + VIEW_INDEX_ID_DATA_TYPE + " FROM " + SYSTEM_CATALOG_NAME + " WHERE " +
+                    TABLE_SCHEM + " = '%s' AND " +
+                    TABLE_NAME + " = '%s' AND " +
+                    COLUMN_COUNT + " IS NOT NULL";
+            // should not have default value for table
+            ResultSet rs = globalConn.createStatement().executeQuery(String.format(sql, SCHEMA1, tableName));
+            if (rs.next()) {
+                assertEquals(null, rs.getObject(1));

Review comment:
       nit: can do assertIsNull




----------------------------------------------------------------
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