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 2021/03/20 01:59:33 UTC

[GitHub] [phoenix] lhofhansl opened a new pull request #1175: PHOENIX-6421 Selecting an indexed array value from an uncovered column with local index returns NULL.

lhofhansl opened a new pull request #1175:
URL: https://github.com/apache/phoenix/pull/1175


   See jira.


-- 
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] lhofhansl edited a comment on pull request #1175: PHOENIX-6421 Selecting an indexed array value from an uncovered column with local index returns NULL.

Posted by GitBox <gi...@apache.org>.
lhofhansl edited a comment on pull request #1175:
URL: https://github.com/apache/phoenix/pull/1175#issuecomment-803261165


   Last push fixes the test failures, the array element needed to be handled even when there is no projector. This should now be OK in all cases.


-- 
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] virajjasani commented on a change in pull request #1175: PHOENIX-6421 Selecting an indexed array value from an uncovered column with local index returns NULL.

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



##########
File path: phoenix-core/src/main/java/org/apache/phoenix/compile/ProjectionCompiler.java
##########
@@ -694,6 +695,11 @@ public Void visit(ProjectedColumnExpression expression) {
                          if (expression.getDataType().isArrayType()) {
                              indexProjectedColumns.add(expression);
                              PColumn col = expression.getColumn();
+                             // hack'ish... For covered columns with local indexes we defer to the server.

Review comment:
       Tested locally and looks good

##########
File path: phoenix-core/src/main/java/org/apache/phoenix/iterate/RegionScannerFactory.java
##########
@@ -367,10 +367,6 @@ private boolean scanTillScanStartRow(final RegionScanner s,
           if (isDummy(result)) {
             return true;
           }
-          if (arrayFuncRefs != null && arrayFuncRefs.length > 0 && arrayKVRefs.size() > 0) {
-            int arrayElementCellPosition = replaceArrayIndexElement(arrayKVRefs, arrayFuncRefs, result);
-            arrayElementCell = result.get(arrayElementCellPosition);

Review comment:
       So true, much needed change 👍 




-- 
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 #1175: PHOENIX-6421 Selecting an indexed array value from an uncovered column with local index returns NULL.

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


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   6m 16s |  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.  |
   ||| _ master Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  15m 51s |  master passed  |
   | +0 |  hbaserecompile  |  22m 29s |  HBase recompiled.  |
   | +1 :green_heart: |  compile  |   1m  3s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   0m 41s |  master passed  |
   | +1 :green_heart: |  javadoc  |   0m 52s |  master passed  |
   | +0 :ok: |  spotbugs  |   3m  6s |  phoenix-core in master has 958 extant spotbugs warnings.  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   8m  8s |  the patch passed  |
   | +0 |  hbaserecompile  |  18m  8s |  HBase recompiled.  |
   | +1 :green_heart: |  compile  |   1m  4s |  the patch passed  |
   | +1 :green_heart: |  javac  |   1m  4s |  the patch passed  |
   | -1 :x: |  checkstyle  |   0m 43s |  phoenix-core: The patch generated 9 new + 425 unchanged - 10 fixed = 434 total (was 435)  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  javadoc  |   0m 50s |  the patch passed  |
   | +1 :green_heart: |  spotbugs  |   3m 13s |  phoenix-core generated 0 new + 956 unchanged - 2 fixed = 956 total (was 958)  |
   ||| _ Other Tests _ |
   | -1 :x: |  unit  | 107m 10s |  phoenix-core in the patch failed.  |
   | +1 :green_heart: |  asflicense  |   0m 48s |  The patch does not generate ASF License warnings.  |
   |  |   | 166m 32s |   |
   
   
   | Reason | Tests |
   |-------:|:------|
   | Failed junit tests | phoenix.end2end.ProjectArrayElemAfterHashJoinIT |
   |   | phoenix.end2end.UpsertSelectIT |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1175/1/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/phoenix/pull/1175 |
   | Optional Tests | dupname asflicense javac javadoc unit spotbugs hbaserebuild hbaseanti checkstyle compile |
   | uname | Linux 143e7b2fda37 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev/phoenix-personality.sh |
   | git revision | master / 888c249 |
   | 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-1175/1/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-1175/1/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-1175/1/testReport/ |
   | Max. process+thread count | 14531 (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-1175/1/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] lhofhansl merged pull request #1175: PHOENIX-6421 Selecting an indexed array value from an uncovered column with local index returns NULL.

Posted by GitBox <gi...@apache.org>.
lhofhansl merged pull request #1175:
URL: https://github.com/apache/phoenix/pull/1175


   


-- 
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] lhofhansl commented on pull request #1175: PHOENIX-6421 Selecting an indexed array value from an uncovered column with local index returns NULL.

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


   Last push fixes the test-change, the array element needed to be handled even when there is no projector. This should now be OK in all cases.


-- 
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] lhofhansl commented on a change in pull request #1175: PHOENIX-6421 Selecting an indexed array value from an uncovered column with local index returns NULL.

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



##########
File path: phoenix-core/src/main/java/org/apache/phoenix/iterate/RegionScannerFactory.java
##########
@@ -367,10 +367,6 @@ private boolean scanTillScanStartRow(final RegionScanner s,
           if (isDummy(result)) {
             return true;
           }
-          if (arrayFuncRefs != null && arrayFuncRefs.length > 0 && arrayKVRefs.size() > 0) {
-            int arrayElementCellPosition = replaceArrayIndexElement(arrayKVRefs, arrayFuncRefs, result);
-            arrayElementCell = result.get(arrayElementCellPosition);

Review comment:
       This never worked. Someone did not understand how Java references work. This just changed the local arrayElemenCell reference with no effect outside of the method.




-- 
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 #1175: PHOENIX-6421 Selecting an indexed array value from an uncovered column with local index returns NULL.

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


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 30s |  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.  |
   ||| _ master Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  15m 54s |  master passed  |
   | +0 |  hbaserecompile  |  22m 44s |  HBase recompiled.  |
   | +1 :green_heart: |  compile  |   1m  2s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   0m 44s |  master passed  |
   | +1 :green_heart: |  javadoc  |   0m 50s |  master passed  |
   | +0 :ok: |  spotbugs  |   3m  8s |  phoenix-core in master has 958 extant spotbugs warnings.  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   8m 17s |  the patch passed  |
   | +0 |  hbaserecompile  |  18m 16s |  HBase recompiled.  |
   | +1 :green_heart: |  compile  |   1m  5s |  the patch passed  |
   | +1 :green_heart: |  javac  |   1m  5s |  the patch passed  |
   | -1 :x: |  checkstyle  |   0m 44s |  phoenix-core: The patch generated 6 new + 428 unchanged - 7 fixed = 434 total (was 435)  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  javadoc  |   0m 51s |  the patch passed  |
   | +1 :green_heart: |  spotbugs  |   3m 22s |  phoenix-core generated 0 new + 956 unchanged - 2 fixed = 956 total (was 958)  |
   ||| _ Other Tests _ |
   | -1 :x: |  unit  | 106m 12s |  phoenix-core in the patch failed.  |
   | +1 :green_heart: |  asflicense  |   0m 55s |  The patch does not generate ASF License warnings.  |
   |  |   | 160m 24s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1175/2/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/phoenix/pull/1175 |
   | Optional Tests | dupname asflicense javac javadoc unit spotbugs hbaserebuild hbaseanti checkstyle compile |
   | uname | Linux 8d15c05d5abd 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev/phoenix-personality.sh |
   | git revision | master / 888c249 |
   | 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-1175/2/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-1175/2/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-1175/2/testReport/ |
   | Max. process+thread count | 13865 (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-1175/2/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] lhofhansl commented on a change in pull request #1175: PHOENIX-6421 Selecting an indexed array value from an uncovered column with local index returns NULL.

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



##########
File path: phoenix-core/src/main/java/org/apache/phoenix/iterate/RegionScannerFactory.java
##########
@@ -367,10 +367,6 @@ private boolean scanTillScanStartRow(final RegionScanner s,
           if (isDummy(result)) {
             return true;
           }
-          if (arrayFuncRefs != null && arrayFuncRefs.length > 0 && arrayKVRefs.size() > 0) {
-            int arrayElementCellPosition = replaceArrayIndexElement(arrayKVRefs, arrayFuncRefs, result);
-            arrayElementCell = result.get(arrayElementCellPosition);

Review comment:
       This never worked. Someone did not understand how Java references work. This just changed the local arrayElemenCell reference with no effect outside of the method.
   
   Instead I moved the calling code in the right place. 




-- 
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] lhofhansl commented on pull request #1175: PHOENIX-6421 Selecting an indexed array value from an uncovered column with local index returns NULL.

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


   Test failures look relevant.


-- 
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] lhofhansl commented on pull request #1175: PHOENIX-6421 Selecting an indexed array value from an uncovered column with local index returns NULL.

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


   Thanks @virajjasani . Merging...


-- 
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] lhofhansl commented on a change in pull request #1175: PHOENIX-6421 Selecting an indexed array value from an uncovered column with local index returns NULL.

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



##########
File path: phoenix-core/src/main/java/org/apache/phoenix/iterate/RegionScannerFactory.java
##########
@@ -247,6 +242,11 @@ public boolean nextRaw(List<Cell> result) throws IOException {
             }
           }
           if (projector != null) {
+            Cell arrayElementCell = null;

Review comment:
       This actually the only place where this was needed, and it is done here after we re-positioned the local index scan (scanTillStarRow) and after uncovered columns are merged in.




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