Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-3773

Implement FIRST_VALUES aggregate function

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.11.0
    • Labels:

      Description

      Similar to FIRST_VALUE, but would allow the user to specify how many values to keep. This could use a MinMaxPriorityQueue under the covers and be much more efficient than using multiple NTH_VALUE calls to do the same like this:

      SELECT entity_id,
             NTH_VALUE(user_id,1) WITHIN GROUP (ORDER BY last_read_date DESC) as nth1_user_id,
             NTH_VALUE(user_id,2) WITHIN GROUP (ORDER BY last_read_date DESC) as nth2_user_id,
             NTH_VALUE(user_id,3) WITHIN GROUP (ORDER BY last_read_date DESC) as nth3_user_id,
             count(*)
      FROM  MY_TABLE 
      WHERE tenant_id='00Dx0000000XXXX'
      AND entity_id in ('0D5x000000ABCD','0D5x000000ABCE')
      GROUP BY entity_id;
      
      1. PHOENIX-3773.patch
        51 kB
        Loknath Priyatham Teja Singamsetty
      2. PHOENIX-3773.v2.patch
        51 kB
        Loknath Priyatham Teja Singamsetty
      3. PHOENIX-3773.v3.patch
        50 kB
        Loknath Priyatham Teja Singamsetty
      4. PHOENIX-3773_master.patch
        51 kB
        Loknath Priyatham Teja Singamsetty
      5. PHOENIX-3773_4.x-HBase-0.98.patch
        58 kB
        Loknath Priyatham Teja Singamsetty
      6. PHOENIX-3773_4.x-HBase-0.98_v2.patch
        94 kB
        James Taylor
      7. PHOENIX-3773_master_v2.patch
        88 kB
        Loknath Priyatham Teja Singamsetty
      8. PHOENIX-3773_4.x-HBase-1.1_v2.patch
        88 kB
        Loknath Priyatham Teja Singamsetty
      9. PHOENIX-3773_4.x-HBase-1.2_v2.patch
        88 kB
        Loknath Priyatham Teja Singamsetty

        Issue Links

        There are no Sub-Tasks for this issue.

          Activity

          Show
          jamestaylor James Taylor added a comment - FYI, Loknath Priyatham Teja Singamsetty
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12869433/PHOENIX-3773.patch
          against master branch at commit e27fae93191d9540574765065900a23bda90905f.
          ATTACHMENT ID: 12869433

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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.

          -1 Anti-pattern. The patch appears to have anti-pattern where BYTES_COMPARATOR was omitted:
          protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());.

          -1 Known Incompatible class. The patch appears to have incompatible classes:
          protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());.

          -1 javac. The patch appears to cause mvn compile goal to fail .

          Compilation errors resume:
          [ERROR] COMPILATION ERROR :
          [ERROR] /home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java:[231,25] cannot find symbol
          [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project phoenix-core: Compilation failure
          [ERROR] /home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java:[231,25] cannot find symbol
          [ERROR] symbol: class FirstValuesFunction
          [ERROR] location: class org.apache.phoenix.expression.ExpressionType
          [ERROR] -> [Help 1]
          [ERROR]
          [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
          [ERROR] Re-run Maven using the -X switch to enable full debug logging.
          [ERROR]
          [ERROR] For more information about the errors and possible solutions, please read the following articles:
          [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
          [ERROR]
          [ERROR] After correcting the problems, you can resume the build with the command
          [ERROR] mvn <goals> -rf :phoenix-core

          Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/889//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12869433/PHOENIX-3773.patch against master branch at commit e27fae93191d9540574765065900a23bda90905f. ATTACHMENT ID: 12869433 +1 @author . The patch does not contain any @author tags. -1 tests included . 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. -1 Anti-pattern . The patch appears to have anti-pattern where BYTES_COMPARATOR was omitted: protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());. -1 Known Incompatible class . The patch appears to have incompatible classes: protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());. -1 javac . The patch appears to cause mvn compile goal to fail . Compilation errors resume: [ERROR] COMPILATION ERROR : [ERROR] /home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java: [231,25] cannot find symbol [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project phoenix-core: Compilation failure [ERROR] /home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java: [231,25] cannot find symbol [ERROR] symbol: class FirstValuesFunction [ERROR] location: class org.apache.phoenix.expression.ExpressionType [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :phoenix-core Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/889//console This message is automatically generated.
          Hide
          singamteja Loknath Priyatham Teja Singamsetty added a comment -

          James Taylor Please review

          Show
          singamteja Loknath Priyatham Teja Singamsetty added a comment - James Taylor Please review
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12869477/PHOENIX-3773.patch
          against master branch at commit e27fae93191d9540574765065900a23bda90905f.
          ATTACHMENT ID: 12869477

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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.

          -1 patch. The patch command could not apply the patch.

          Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/890//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12869477/PHOENIX-3773.patch against master branch at commit e27fae93191d9540574765065900a23bda90905f. ATTACHMENT ID: 12869477 +1 @author . The patch does not contain any @author tags. -1 tests included . 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. -1 patch . The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/890//console This message is automatically generated.
          Hide
          singamteja Loknath Priyatham Teja Singamsetty added a comment -

          James Taylor Thomas D'Silva Samarth Jain Can you please review. Also can you please see why the patch is not getting applied resulting in build failure.

          Show
          singamteja Loknath Priyatham Teja Singamsetty added a comment - James Taylor Thomas D'Silva Samarth Jain Can you please review. Also can you please see why the patch is not getting applied resulting in build failure.
          Hide
          jamestaylor James Taylor added a comment -

          Thanks for the patch, Loknath Priyatham Teja Singamsetty . Here's some feedback:

          • Make sure your code base has been rebased and that the patch applies. There are directions here: https://phoenix.apache.org/contributing.html#Generate_a_patch
          • Have FIRST_VALUES return an ARRAY type so that you can return all values in a single row. It's not going to work to change the semantics of SQL (it's pretty well established). A function can't return multiple rows like that.
          • Implement this in a base class so that you can support both FIRST_VALUES and LAST_VALUES. It's a trivial matter of multiplying the result of the comparator by -1 for LAST_VALUES.
          Show
          jamestaylor James Taylor added a comment - Thanks for the patch, Loknath Priyatham Teja Singamsetty . Here's some feedback: Make sure your code base has been rebased and that the patch applies. There are directions here: https://phoenix.apache.org/contributing.html#Generate_a_patch Have FIRST_VALUES return an ARRAY type so that you can return all values in a single row. It's not going to work to change the semantics of SQL (it's pretty well established). A function can't return multiple rows like that. Implement this in a base class so that you can support both FIRST_VALUES and LAST_VALUES. It's a trivial matter of multiplying the result of the comparator by -1 for LAST_VALUES.
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12869486/PHOENIX-3773.v2.patch
          against master branch at commit e27fae93191d9540574765065900a23bda90905f.
          ATTACHMENT ID: 12869486

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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.

          -1 patch. The patch command could not apply the patch.

          Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/891//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12869486/PHOENIX-3773.v2.patch against master branch at commit e27fae93191d9540574765065900a23bda90905f. ATTACHMENT ID: 12869486 +1 @author . The patch does not contain any @author tags. -1 tests included . 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. -1 patch . The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/891//console This message is automatically generated.
          Hide
          singamteja Loknath Priyatham Teja Singamsetty added a comment -

          James Taylor

          Have FIRST_VALUES return an ARRAY type so that you can return all values in a single row. It's not going to work to change the semantics of SQL (it's pretty well established). A function can't return multiple rows like that.

          Gone through Oracle/SQL rank over and grouped_concat behaviours. Probably what you are suggesting here is to implement Group_concat https://stackoverflow.com/questions/2129693/using-limit-within-group-by-to-get-n-results-per-group.

          Kindly help me with the expectation here.

          TEST.TEST

          id page_id date val
          2 8 1 7
          3 8 2 9
          4 8 3 4
          5 8 4 2
          6 9 5 10
          7 9 6 13

          For the above table with below queries,

          a) FIRST_VALUES With Group By Clause
          SELECT page_id, FIRST_VALUES(val, 2) WITHIN GROUP (ORDER BY dates DESC) as first_values FROM TEST.TEST GROUP BY page_id

          Expected Output?
          -----------------------

          page_id first_values
          8 2,4
          9 13,10

          b) FIRST_VALUES without group by
          SELECT FIRST_VALUES(val, 2) as first_values WITHIN GROUP (ORDER BY dates DESC) as first_values FROM TEST.TEST

          first_values
          13,10

          James Taylor Let me know if the above looks as expected behaviour.

          Show
          singamteja Loknath Priyatham Teja Singamsetty added a comment - James Taylor Have FIRST_VALUES return an ARRAY type so that you can return all values in a single row. It's not going to work to change the semantics of SQL (it's pretty well established). A function can't return multiple rows like that. Gone through Oracle/SQL rank over and grouped_concat behaviours. Probably what you are suggesting here is to implement Group_concat https://stackoverflow.com/questions/2129693/using-limit-within-group-by-to-get-n-results-per-group . Kindly help me with the expectation here. TEST.TEST id page_id date val 2 8 1 7 3 8 2 9 4 8 3 4 5 8 4 2 6 9 5 10 7 9 6 13 For the above table with below queries, a) FIRST_VALUES With Group By Clause SELECT page_id, FIRST_VALUES(val, 2) WITHIN GROUP (ORDER BY dates DESC) as first_values FROM TEST.TEST GROUP BY page_id Expected Output? ----------------------- page_id first_values 8 2,4 9 13,10 b) FIRST_VALUES without group by SELECT FIRST_VALUES(val, 2) as first_values WITHIN GROUP (ORDER BY dates DESC) as first_values FROM TEST.TEST first_values 13,10 James Taylor Let me know if the above looks as expected behaviour.
          Hide
          jamestaylor James Taylor added a comment -

          Yes, your input/output example is what I was suggesting (where the return value of FIRST_VALUES is an array type).

          Show
          jamestaylor James Taylor added a comment - Yes, your input/output example is what I was suggesting (where the return value of FIRST_VALUES is an array type).
          Hide
          singamteja Loknath Priyatham Teja Singamsetty added a comment -

          James Taylor Please find the v3 patch with the required changes to support returning ARRAY for FIRST_VALUES

          Show
          singamteja Loknath Priyatham Teja Singamsetty added a comment - James Taylor Please find the v3 patch with the required changes to support returning ARRAY for FIRST_VALUES
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12870373/PHOENIX-3773.v3.patch
          against master branch at commit 08f93f48fb33d9545bf40800478d01d6d10b86e9.
          ATTACHMENT ID: 12870373

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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.

          -1 patch. The patch command could not apply the patch.

          Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/925//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12870373/PHOENIX-3773.v3.patch against master branch at commit 08f93f48fb33d9545bf40800478d01d6d10b86e9. ATTACHMENT ID: 12870373 +1 @author . The patch does not contain any @author tags. -1 tests included . 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. -1 patch . The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/925//console This message is automatically generated.
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12870496/PHOENIX-3733.v4.patch
          against master branch at commit e3fc929e93715a359b4267db9f4d12706247a6a6.
          ATTACHMENT ID: 12870496

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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.

          -1 patch. The patch command could not apply the patch.

          Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/935//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12870496/PHOENIX-3733.v4.patch against master branch at commit e3fc929e93715a359b4267db9f4d12706247a6a6. ATTACHMENT ID: 12870496 +1 @author . The patch does not contain any @author tags. -1 tests included . 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. -1 patch . The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/935//console This message is automatically generated.
          Hide
          singamteja Loknath Priyatham Teja Singamsetty added a comment -

          Samarth Jain Thomas D'Silva Can you please help resolve this "patch command could not apply the patch". I was able to apply this patch to both master and 4.x-HBase.0.98 on dev box.

          Show
          singamteja Loknath Priyatham Teja Singamsetty added a comment - Samarth Jain Thomas D'Silva Can you please help resolve this "patch command could not apply the patch". I was able to apply this patch to both master and 4.x-HBase.0.98 on dev box.
          Hide
          singamteja Loknath Priyatham Teja Singamsetty added a comment - - edited

          James Taylor Samarth Jain

          Here is what i'm doing to create patch which is working for master and 4.x branch locally. This used to work earlier but the precommit build is failing now while applying to master.

          a) checkout to 4.x-HBase-0.98
          b) git commit
          c) git format-patch HEAD -1

          I have also tried the instructions specified in http://phoenix.apache.org/contributing.html. This is resulting in patch file with lot of commits back dated from 2014 when i run "git format-patch – stdout origin > PHOENIX-

          {NUMBER}

          .patch"

          Between on debugging further from build console output,

          + /home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/dev/smart-apply-patch.sh /home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/patchprocess/patch
          The patch does not appear to apply with p0 to p2
          + [[ 1 != 0 ]]
          + echo 'PATCH APPLICATION FAILED'
          PATCH APPLICATION FAILED
          + JIRA_COMMENT='Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12870496/PHOENIX-3733.v4.patch
          against master branch at commit e3fc929e93715a359b4267db9f4d12706247a6a6.

          Would like to know the commands part of smart-apply-patch.sh for further debugging.

          Show
          singamteja Loknath Priyatham Teja Singamsetty added a comment - - edited James Taylor Samarth Jain Here is what i'm doing to create patch which is working for master and 4.x branch locally. This used to work earlier but the precommit build is failing now while applying to master. a) checkout to 4.x-HBase-0.98 b) git commit c) git format-patch HEAD -1 I have also tried the instructions specified in http://phoenix.apache.org/contributing.html . This is resulting in patch file with lot of commits back dated from 2014 when i run "git format-patch – stdout origin > PHOENIX- {NUMBER} .patch" Between on debugging further from build console output, + /home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/dev/smart-apply-patch.sh /home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/patchprocess/patch The patch does not appear to apply with p0 to p2 + [[ 1 != 0 ]] + echo 'PATCH APPLICATION FAILED' PATCH APPLICATION FAILED + JIRA_COMMENT='Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12870496/PHOENIX-3733.v4.patch against master branch at commit e3fc929e93715a359b4267db9f4d12706247a6a6. Would like to know the commands part of smart-apply-patch.sh for further debugging.
          Hide
          samarthjain Samarth Jain added a comment -

          Loknath Priyatham Teja Singamsetty - the patch name should have PHOENIX-3773 and not PHOENIX-3733. Also, if you are generating a patch using the 4.x-HBase-0.98 branch, then you should end it with _4.x-HBase-0.98 to tell the QA bot to apply the patch to that branch. It is possible that a patch for 4.x-HBase-0.98 branch may not apply directly to master or vice-versa.

          Show
          samarthjain Samarth Jain added a comment - Loknath Priyatham Teja Singamsetty - the patch name should have PHOENIX-3773 and not PHOENIX-3733 . Also, if you are generating a patch using the 4.x-HBase-0.98 branch, then you should end it with _4.x-HBase-0.98 to tell the QA bot to apply the patch to that branch. It is possible that a patch for 4.x-HBase-0.98 branch may not apply directly to master or vice-versa.
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12870520/PHOENIX-3733-v6.patch
          against master branch at commit e3fc929e93715a359b4267db9f4d12706247a6a6.
          ATTACHMENT ID: 12870520

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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.

          -1 Anti-pattern. The patch appears to have anti-pattern where BYTES_COMPARATOR was omitted:
          protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());.

          -1 Known Incompatible class. The patch appears to have incompatible classes:
          protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());.

          -1 javac. The patch appears to cause mvn compile goal to fail .

          Compilation errors resume:
          [ERROR] COMPILATION ERROR :
          [ERROR] /home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java:[292,25] cannot find symbol
          [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project phoenix-core: Compilation failure
          [ERROR] /home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java:[292,25] cannot find symbol
          [ERROR] symbol: class FirstValuesFunction
          [ERROR] location: class org.apache.phoenix.expression.ExpressionType
          [ERROR] -> [Help 1]
          [ERROR]
          [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
          [ERROR] Re-run Maven using the -X switch to enable full debug logging.
          [ERROR]
          [ERROR] For more information about the errors and possible solutions, please read the following articles:
          [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
          [ERROR]
          [ERROR] After correcting the problems, you can resume the build with the command
          [ERROR] mvn <goals> -rf :phoenix-core

          Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/936//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12870520/PHOENIX-3733-v6.patch against master branch at commit e3fc929e93715a359b4267db9f4d12706247a6a6. ATTACHMENT ID: 12870520 +1 @author . The patch does not contain any @author tags. -1 tests included . 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. -1 Anti-pattern . The patch appears to have anti-pattern where BYTES_COMPARATOR was omitted: protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());. -1 Known Incompatible class . The patch appears to have incompatible classes: protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());. -1 javac . The patch appears to cause mvn compile goal to fail . Compilation errors resume: [ERROR] COMPILATION ERROR : [ERROR] /home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java: [292,25] cannot find symbol [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project phoenix-core: Compilation failure [ERROR] /home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java: [292,25] cannot find symbol [ERROR] symbol: class FirstValuesFunction [ERROR] location: class org.apache.phoenix.expression.ExpressionType [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :phoenix-core Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/936//console This message is automatically generated.
          Hide
          singamteja Loknath Priyatham Teja Singamsetty added a comment -

          Samarth Jain Made necessary changes as suggested.

          Show
          singamteja Loknath Priyatham Teja Singamsetty added a comment - Samarth Jain Made necessary changes as suggested.
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12870525/PHOENIX-3733_master.patch
          against master branch at commit e3fc929e93715a359b4267db9f4d12706247a6a6.
          ATTACHMENT ID: 12870525

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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.

          -1 Anti-pattern. The patch appears to have anti-pattern where BYTES_COMPARATOR was omitted:
          protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());.

          -1 Known Incompatible class. The patch appears to have incompatible classes:
          protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          -1 javadoc. The javadoc tool appears to have generated 45 warning messages.

          -1 release audit. The applied patch generated 1 release audit warnings (more than the master's current 0 warnings).

          -1 lineLengths. The patch introduces the following lines longer than 100:
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, '1', '3')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (2, 8, '2', '7')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (3, 8, '3', '9')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (5, 8, '4', '2')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, '5', '4')");
          + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + table_name
          + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)");
          + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, 5, 400)");
          + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + tableName
          + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)");

          -1 core tests. The patch failed these unit tests:
          ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.SpillableGroupByIT

          Test results: https://builds.apache.org/job/PreCommit-PHOENIX-Build/938//testReport/
          Release audit warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/938//artifact/patchprocess/patchReleaseAuditWarnings.txt
          Javadoc warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/938//artifact/patchprocess/patchJavadocWarnings.txt
          Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/938//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12870525/PHOENIX-3733_master.patch against master branch at commit e3fc929e93715a359b4267db9f4d12706247a6a6. ATTACHMENT ID: 12870525 +1 @author . The patch does not contain any @author tags. -1 tests included . 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. -1 Anti-pattern . The patch appears to have anti-pattern where BYTES_COMPARATOR was omitted: protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());. -1 Known Incompatible class . The patch appears to have incompatible classes: protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());. +1 javac . The applied patch does not increase the total number of javac compiler warnings. -1 javadoc . The javadoc tool appears to have generated 45 warning messages. -1 release audit . The applied patch generated 1 release audit warnings (more than the master's current 0 warnings). -1 lineLengths . The patch introduces the following lines longer than 100: + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, '1', '3')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (2, 8, '2', '7')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (3, 8, '3', '9')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (5, 8, '4', '2')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, '5', '4')"); + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + table_name + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)"); + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, 5, 400)"); + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + tableName + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)"); -1 core tests . The patch failed these unit tests: ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.SpillableGroupByIT Test results: https://builds.apache.org/job/PreCommit-PHOENIX-Build/938//testReport/ Release audit warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/938//artifact/patchprocess/patchReleaseAuditWarnings.txt Javadoc warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/938//artifact/patchprocess/patchJavadocWarnings.txt Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/938//console This message is automatically generated.
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12870542/PHOENIX-3773_4.x-HBase-0.98.patch
          against 4.x-HBase-0.98 branch at commit e3fc929e93715a359b4267db9f4d12706247a6a6.
          ATTACHMENT ID: 12870542

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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.

          -1 patch. The patch command could not apply the patch.

          Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/940//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12870542/PHOENIX-3773_4.x-HBase-0.98.patch against 4.x-HBase-0.98 branch at commit e3fc929e93715a359b4267db9f4d12706247a6a6. ATTACHMENT ID: 12870542 +1 @author . The patch does not contain any @author tags. -1 tests included . 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. -1 patch . The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/940//console This message is automatically generated.
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12870533/PHOENIX-3773_master.patch
          against master branch at commit e3fc929e93715a359b4267db9f4d12706247a6a6.
          ATTACHMENT ID: 12870533

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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.

          -1 Anti-pattern. The patch appears to have anti-pattern where BYTES_COMPARATOR was omitted:
          protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());.

          -1 Known Incompatible class. The patch appears to have incompatible classes:
          protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          -1 javadoc. The javadoc tool appears to have generated 45 warning messages.

          -1 release audit. The applied patch generated 1 release audit warnings (more than the master's current 0 warnings).

          -1 lineLengths. The patch introduces the following lines longer than 100:
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, '1', '3')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (2, 8, '2', '7')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (3, 8, '3', '9')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (5, 8, '4', '2')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, '5', '4')");
          + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + table_name
          + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)");
          + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, 5, 400)");
          + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + tableName
          + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)");

          -1 core tests. The patch failed these unit tests:
          ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.SpillableGroupByIT
          ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.ViewIT
          ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.trace.PhoenixTracingEndToEndIT

          Test results: https://builds.apache.org/job/PreCommit-PHOENIX-Build/939//testReport/
          Release audit warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/939//artifact/patchprocess/patchReleaseAuditWarnings.txt
          Javadoc warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/939//artifact/patchprocess/patchJavadocWarnings.txt
          Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/939//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12870533/PHOENIX-3773_master.patch against master branch at commit e3fc929e93715a359b4267db9f4d12706247a6a6. ATTACHMENT ID: 12870533 +1 @author . The patch does not contain any @author tags. -1 tests included . 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. -1 Anti-pattern . The patch appears to have anti-pattern where BYTES_COMPARATOR was omitted: protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());. -1 Known Incompatible class . The patch appears to have incompatible classes: protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());. +1 javac . The applied patch does not increase the total number of javac compiler warnings. -1 javadoc . The javadoc tool appears to have generated 45 warning messages. -1 release audit . The applied patch generated 1 release audit warnings (more than the master's current 0 warnings). -1 lineLengths . The patch introduces the following lines longer than 100: + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, '1', '3')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (2, 8, '2', '7')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (3, 8, '3', '9')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (5, 8, '4', '2')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, '5', '4')"); + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + table_name + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)"); + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, 5, 400)"); + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + tableName + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)"); -1 core tests . The patch failed these unit tests: ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.SpillableGroupByIT ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.ViewIT ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.trace.PhoenixTracingEndToEndIT Test results: https://builds.apache.org/job/PreCommit-PHOENIX-Build/939//testReport/ Release audit warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/939//artifact/patchprocess/patchReleaseAuditWarnings.txt Javadoc warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/939//artifact/patchprocess/patchJavadocWarnings.txt Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/939//console This message is automatically generated.
          Hide
          jamestaylor James Taylor added a comment -

          Thanks for the updated patch, Loknath Priyatham Teja Singamsetty . It's looking very good. Here's some feedback:

          Instead of deserializing the byte arrays to objects (a relatively expensive operation) in the evaluate method of FirstLastValueBaseClientAggregator, store the bytes pointer in a List<ImmutableBytesWritable>.

          +                    if (getMultipleValues) {
          +                        multipleValuesResult.add(PDataType.fromTypeId(dataType.getSqlType() - PDataType.ARRAY_TYPE_BASE).toObject(it.next()));
          +                        if (++counter == offset) {
          +                            break;
          +                        }
          +                    } else {
          

          Then, once you have all the values, combine them together using the PArrayDataType.appendItemToArray() method outside the loop.

          -            //not enought values to return Nth
          +            if (getMultipleValues && multipleValuesResult.size() > 0) {
          +                ptr.set(dataType.toBytes(PArrayDataType.instantiatePhoenixArray(PDataType.fromTypeId(dataType.getSqlType() - PDataType.ARRAY_TYPE_BASE), multipleValuesResult.toArray())));
          +                return true;
          +            }
          +
          +            //not enough values to return Nth or top N'values or trying to retreive (N+1)th value
          

          I think the handling of the case in which there are no values may not be handled correctly. You need to move this check to the top of the aggregate method:

                  if (topValue == null) {
                      return false;
                  }
          

          And this would be the only case that would return false. Otherwise, if there aren't enough values, do this:

              ptr.set(ByteUtil.EMPTY_BYTE_ARRAY);
              return true;
          

          Probably a good idea to have a test that asks for the top 3 values when there are only 2 values to make sure that case works too (if you don't have that already).

          Also, one minor nit. How about instead of calling the new member variable getMultipleValues you call it isArrayReturnType?

          Show
          jamestaylor James Taylor added a comment - Thanks for the updated patch, Loknath Priyatham Teja Singamsetty . It's looking very good. Here's some feedback: Instead of deserializing the byte arrays to objects (a relatively expensive operation) in the evaluate method of FirstLastValueBaseClientAggregator, store the bytes pointer in a List<ImmutableBytesWritable>. + if (getMultipleValues) { + multipleValuesResult.add(PDataType.fromTypeId(dataType.getSqlType() - PDataType.ARRAY_TYPE_BASE).toObject(it.next())); + if (++counter == offset) { + break ; + } + } else { Then, once you have all the values, combine them together using the PArrayDataType.appendItemToArray() method outside the loop. - //not enought values to return Nth + if (getMultipleValues && multipleValuesResult.size() > 0) { + ptr.set(dataType.toBytes(PArrayDataType.instantiatePhoenixArray(PDataType.fromTypeId(dataType.getSqlType() - PDataType.ARRAY_TYPE_BASE), multipleValuesResult.toArray()))); + return true ; + } + + //not enough values to return Nth or top N'values or trying to retreive (N+1)th value I think the handling of the case in which there are no values may not be handled correctly. You need to move this check to the top of the aggregate method: if (topValue == null ) { return false ; } And this would be the only case that would return false. Otherwise, if there aren't enough values, do this: ptr.set(ByteUtil.EMPTY_BYTE_ARRAY); return true ; Probably a good idea to have a test that asks for the top 3 values when there are only 2 values to make sure that case works too (if you don't have that already). Also, one minor nit. How about instead of calling the new member variable getMultipleValues you call it isArrayReturnType?
          Hide
          singamteja Loknath Priyatham Teja Singamsetty added a comment -

          James Taylor

          Then, once you have all the values, combine them together using the PArrayDataType.appendItemToArray() method

          I tried this last week as well but for some reason the output is not as expected. Yesterday made changes to use PArrayDataType.appendItemToArray(), upon debugging found two things:

          a) For fixed length data types, the appendItemToArray is actually prepending the arrayBytes reversing the array construction. For the time being used prependItemToArray() method instead which fixed this issue. The following lines of code in appendItemToArray seems to be the reason behind this which copies the new bytes to front of array and older bytes to the end.

          newArray = new byte[length + elementLength];

          System.arraycopy(arrayBytes, offset, newArray, 0, length);
          System.arraycopy(elementBytes, elementOffset, newArray, length, elementLength);

          b) For variable length data types, the Array construction results in ArrayIndexOutOfBoundsException. Here is the stack trace

          java.lang.ArrayIndexOutOfBoundsException: 32767
          at org.apache.phoenix.schema.types.PArrayDataType.prependItemToArray(PArrayDataType.java:545)
          at org.apache.phoenix.expression.aggregator.FirstLastValueBaseClientAggregator.evaluate(FirstLastValueBaseClientAggregator.java:117)
          at org.apache.phoenix.schema.KeyValueSchema.toBytes(KeyValueSchema.java:112)
          at org.apache.phoenix.schema.KeyValueSchema.toBytes(KeyValueSchema.java:93)
          at org.apache.phoenix.expression.aggregator.Aggregators.toBytes(Aggregators.java:112)
          at org.apache.phoenix.iterate.BaseGroupedAggregatingResultIterator.next(BaseGroupedAggregatingResultIterator.java:82)
          at org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:778)
          at org.apache.phoenix.end2end.FirstValuesFunctionIT.varcharDatatypeSimpleTest(FirstValuesFunctionIT.java:100)

          I'm debugging this further.

          Probably a good idea to have a test that asks for the top 3 values when there are only 2 values to make sure that case works too (if you don't have that already).

          Test case is included already.

          Show
          singamteja Loknath Priyatham Teja Singamsetty added a comment - James Taylor Then, once you have all the values, combine them together using the PArrayDataType.appendItemToArray() method I tried this last week as well but for some reason the output is not as expected. Yesterday made changes to use PArrayDataType.appendItemToArray(), upon debugging found two things: a) For fixed length data types, the appendItemToArray is actually prepending the arrayBytes reversing the array construction. For the time being used prependItemToArray() method instead which fixed this issue. The following lines of code in appendItemToArray seems to be the reason behind this which copies the new bytes to front of array and older bytes to the end. newArray = new byte [length + elementLength] ; System.arraycopy(arrayBytes, offset, newArray, 0, length); System.arraycopy(elementBytes, elementOffset, newArray, length, elementLength); b) For variable length data types, the Array construction results in ArrayIndexOutOfBoundsException. Here is the stack trace java.lang.ArrayIndexOutOfBoundsException: 32767 at org.apache.phoenix.schema.types.PArrayDataType.prependItemToArray(PArrayDataType.java:545) at org.apache.phoenix.expression.aggregator.FirstLastValueBaseClientAggregator.evaluate(FirstLastValueBaseClientAggregator.java:117) at org.apache.phoenix.schema.KeyValueSchema.toBytes(KeyValueSchema.java:112) at org.apache.phoenix.schema.KeyValueSchema.toBytes(KeyValueSchema.java:93) at org.apache.phoenix.expression.aggregator.Aggregators.toBytes(Aggregators.java:112) at org.apache.phoenix.iterate.BaseGroupedAggregatingResultIterator.next(BaseGroupedAggregatingResultIterator.java:82) at org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:778) at org.apache.phoenix.end2end.FirstValuesFunctionIT.varcharDatatypeSimpleTest(FirstValuesFunctionIT.java:100) I'm debugging this further. Probably a good idea to have a test that asks for the top 3 values when there are only 2 values to make sure that case works too (if you don't have that already). Test case is included already.
          Hide
          jamestaylor James Taylor added a comment -

          Thanks, Loknath Priyatham Teja Singamsetty . You might want to check out ArrayAppendFunctionIT which exercises ARRAY_APPEND which in turn calls PArrayDataType.appendItemToArray to compare how you're using that function versus how ArrayAppendFunction is using it (which appears to be working). I suspect the arguments you're using aren't what's expected.

          Show
          jamestaylor James Taylor added a comment - Thanks, Loknath Priyatham Teja Singamsetty . You might want to check out ArrayAppendFunctionIT which exercises ARRAY_APPEND which in turn calls PArrayDataType.appendItemToArray to compare how you're using that function versus how ArrayAppendFunction is using it (which appears to be working). I suspect the arguments you're using aren't what's expected.
          Hide
          singamteja Loknath Priyatham Teja Singamsetty added a comment -

          You might want to check out ArrayAppendFunctionIT which exercises ARRAY_APPEND

          Thanks for the pointer James. Was looking into the same and was understanding how things were working.

          James Taylor Looks like I found the reason. The PArrayDataType.appendItemToArray can be used when you already have an Array serialized to bytes with atleast one element in it. We cannot leverage this without having an array pre-constructed.

          In our case, the requirement is to convert the multiple <T>PDataType to single <T>PArrayDataType. There is no such util method which can construct the Array from scratch given element one by one to array.

          We have to perform serialization/deserialization for one element in order to construct the Array, post which we can make use of PArrayDataType.appendItemToArray. This would save serialization/deserialization cost on the rest of items in first values array result set.

          Let me know if this approach is fine with you.

          Show
          singamteja Loknath Priyatham Teja Singamsetty added a comment - You might want to check out ArrayAppendFunctionIT which exercises ARRAY_APPEND Thanks for the pointer James. Was looking into the same and was understanding how things were working. James Taylor Looks like I found the reason. The PArrayDataType.appendItemToArray can be used when you already have an Array serialized to bytes with atleast one element in it. We cannot leverage this without having an array pre-constructed. In our case, the requirement is to convert the multiple <T>PDataType to single <T>PArrayDataType. There is no such util method which can construct the Array from scratch given element one by one to array. We have to perform serialization/deserialization for one element in order to construct the Array, post which we can make use of PArrayDataType.appendItemToArray. This would save serialization/deserialization cost on the rest of items in first values array result set. Let me know if this approach is fine with you.
          Hide
          jamestaylor James Taylor added a comment -

          Try constructing an empty array before calling the append function (or add a new function that inializes the array or fix the append function to handle this case).

          Show
          jamestaylor James Taylor added a comment - Try constructing an empty array before calling the append function (or add a new function that inializes the array or fix the append function to handle this case).
          Hide
          singamteja Loknath Priyatham Teja Singamsetty added a comment - - edited

          Sure James Taylor.. Will do whatever is best suited here.

          Show
          singamteja Loknath Priyatham Teja Singamsetty added a comment - - edited Sure James Taylor .. Will do whatever is best suited here.
          Hide
          jamestaylor James Taylor added a comment -

          Best option IMHO is to fix appendItemToArray to handle the case where the existing array is empty (i.e. null). Just add a test in ArrayAppendFunctionIT that does an ARRAY_APPEND where the array (i.e. the varchars column in this case) itself is null:

          SELECT ARRAY_APPEND(varchars,'1') FROM T;
          SELECT ARRAY_APPEND(null,'1') FROM T;
          

          Both these should work correctly and end up with an array with a single element of '1'. Also, given that appendItemToArray always allocates a new byte array, probably simplest to just append as you evaluate rather than outside the loop (since there'd be no advantage to doing it outside the loop).

          Show
          jamestaylor James Taylor added a comment - Best option IMHO is to fix appendItemToArray to handle the case where the existing array is empty (i.e. null). Just add a test in ArrayAppendFunctionIT that does an ARRAY_APPEND where the array (i.e. the varchars column in this case) itself is null: SELECT ARRAY_APPEND(varchars,'1') FROM T; SELECT ARRAY_APPEND( null ,'1') FROM T; Both these should work correctly and end up with an array with a single element of '1'. Also, given that appendItemToArray always allocates a new byte array, probably simplest to just append as you evaluate rather than outside the loop (since there'd be no advantage to doing it outside the loop).
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12871493/PHOENIX-3773_4.x-HBase-0.98_001.patch
          against 4.x-HBase-0.98 branch at commit 7cdfc9cd489a493378968236bff7ae075402613b.
          ATTACHMENT ID: 12871493

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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.

          -1 patch. The patch command could not apply the patch.

          Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1005//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12871493/PHOENIX-3773_4.x-HBase-0.98_001.patch against 4.x-HBase-0.98 branch at commit 7cdfc9cd489a493378968236bff7ae075402613b. ATTACHMENT ID: 12871493 +1 @author . The patch does not contain any @author tags. -1 tests included . 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. -1 patch . The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1005//console This message is automatically generated.
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12871511/PHOENIX-3773_4.x-HBase-0.98_002.patch
          against 4.x-HBase-0.98 branch at commit 7cdfc9cd489a493378968236bff7ae075402613b.
          ATTACHMENT ID: 12871511

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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.

          -1 patch. The patch command could not apply the patch.

          Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1007//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12871511/PHOENIX-3773_4.x-HBase-0.98_002.patch against 4.x-HBase-0.98 branch at commit 7cdfc9cd489a493378968236bff7ae075402613b. ATTACHMENT ID: 12871511 +1 @author . The patch does not contain any @author tags. -1 tests included . 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. -1 patch . The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1007//console This message is automatically generated.
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12871495/PHOENIX-3773_master_001.patch
          against master branch at commit 7cdfc9cd489a493378968236bff7ae075402613b.
          ATTACHMENT ID: 12871495

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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.

          -1 Anti-pattern. The patch appears to have anti-pattern where BYTES_COMPARATOR was omitted:
          protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());.

          -1 Known Incompatible class. The patch appears to have incompatible classes:
          protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          -1 javadoc. The javadoc tool appears to have generated 47 warning messages.

          -1 release audit. The applied patch generated 5 release audit warnings (more than the master's current 0 warnings).

          -1 lineLengths. The patch introduces the following lines longer than 100:
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, '1', '3')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (2, 8, '2', '7')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (3, 8, '3', '9')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (5, 8, '4', '2')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, '5', '4')");
          + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + table_name
          + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)");
          + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, 5, 400)");
          + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + tableName
          + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)");

          -1 core tests. The patch failed these unit tests:
          ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.UpgradeIT
          ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.monitoring.PhoenixMetricsIT

          Test results: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1006//testReport/
          Release audit warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1006//artifact/patchprocess/patchReleaseAuditWarnings.txt
          Javadoc warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1006//artifact/patchprocess/patchJavadocWarnings.txt
          Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1006//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12871495/PHOENIX-3773_master_001.patch against master branch at commit 7cdfc9cd489a493378968236bff7ae075402613b. ATTACHMENT ID: 12871495 +1 @author . The patch does not contain any @author tags. -1 tests included . 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. -1 Anti-pattern . The patch appears to have anti-pattern where BYTES_COMPARATOR was omitted: protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());. -1 Known Incompatible class . The patch appears to have incompatible classes: protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());. +1 javac . The applied patch does not increase the total number of javac compiler warnings. -1 javadoc . The javadoc tool appears to have generated 47 warning messages. -1 release audit . The applied patch generated 5 release audit warnings (more than the master's current 0 warnings). -1 lineLengths . The patch introduces the following lines longer than 100: + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, '1', '3')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (2, 8, '2', '7')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (3, 8, '3', '9')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (5, 8, '4', '2')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, '5', '4')"); + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + table_name + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)"); + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, 5, 400)"); + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + tableName + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)"); -1 core tests . The patch failed these unit tests: ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.UpgradeIT ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.monitoring.PhoenixMetricsIT Test results: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1006//testReport/ Release audit warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1006//artifact/patchprocess/patchReleaseAuditWarnings.txt Javadoc warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1006//artifact/patchprocess/patchJavadocWarnings.txt Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1006//console This message is automatically generated.
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12871515/PHOENIX-3773_master_002.patch
          against master branch at commit 7cdfc9cd489a493378968236bff7ae075402613b.
          ATTACHMENT ID: 12871515

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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.

          -1 Anti-pattern. The patch appears to have anti-pattern where BYTES_COMPARATOR was omitted:
          protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());.

          -1 Known Incompatible class. The patch appears to have incompatible classes:
          protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          -1 javadoc. The javadoc tool appears to have generated 47 warning messages.

          -1 release audit. The applied patch generated 5 release audit warnings (more than the master's current 0 warnings).

          -1 lineLengths. The patch introduces the following lines longer than 100:
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, '1', '3')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (2, 8, '2', '7')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (3, 8, '3', '9')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (5, 8, '4', '2')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, '5', '4')");
          + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + table_name
          + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)");
          + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, 5, 400)");
          + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + tableName
          + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)");

          -1 core tests. The patch failed these unit tests:
          ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.LastValuesFunctionIT

          Test results: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1008//testReport/
          Release audit warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1008//artifact/patchprocess/patchReleaseAuditWarnings.txt
          Javadoc warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1008//artifact/patchprocess/patchJavadocWarnings.txt
          Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1008//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12871515/PHOENIX-3773_master_002.patch against master branch at commit 7cdfc9cd489a493378968236bff7ae075402613b. ATTACHMENT ID: 12871515 +1 @author . The patch does not contain any @author tags. -1 tests included . 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. -1 Anti-pattern . The patch appears to have anti-pattern where BYTES_COMPARATOR was omitted: protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());. -1 Known Incompatible class . The patch appears to have incompatible classes: protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());. +1 javac . The applied patch does not increase the total number of javac compiler warnings. -1 javadoc . The javadoc tool appears to have generated 47 warning messages. -1 release audit . The applied patch generated 5 release audit warnings (more than the master's current 0 warnings). -1 lineLengths . The patch introduces the following lines longer than 100: + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, '1', '3')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (2, 8, '2', '7')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (3, 8, '3', '9')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (5, 8, '4', '2')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, '5', '4')"); + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + table_name + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)"); + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, 5, 400)"); + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + tableName + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)"); -1 core tests . The patch failed these unit tests: ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.LastValuesFunctionIT Test results: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1008//testReport/ Release audit warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1008//artifact/patchprocess/patchReleaseAuditWarnings.txt Javadoc warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1008//artifact/patchprocess/patchJavadocWarnings.txt Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1008//console This message is automatically generated.
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12871523/PHOENIX-3773_4.x-HBase-0.98_final.patch
          against 4.x-HBase-0.98 branch at commit 7cdfc9cd489a493378968236bff7ae075402613b.
          ATTACHMENT ID: 12871523

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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.

          -1 patch. The patch command could not apply the patch.

          Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1010//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12871523/PHOENIX-3773_4.x-HBase-0.98_final.patch against 4.x-HBase-0.98 branch at commit 7cdfc9cd489a493378968236bff7ae075402613b. ATTACHMENT ID: 12871523 +1 @author . The patch does not contain any @author tags. -1 tests included . 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. -1 patch . The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1010//console This message is automatically generated.
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12871516/PHOENIX-3773_master_003.patch
          against master branch at commit 7cdfc9cd489a493378968236bff7ae075402613b.
          ATTACHMENT ID: 12871516

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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.

          -1 Anti-pattern. The patch appears to have anti-pattern where BYTES_COMPARATOR was omitted:
          protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());.

          -1 Known Incompatible class. The patch appears to have incompatible classes:
          protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          -1 javadoc. The javadoc tool appears to have generated 47 warning messages.

          -1 release audit. The applied patch generated 5 release audit warnings (more than the master's current 0 warnings).

          -1 lineLengths. The patch introduces the following lines longer than 100:
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, '1', '3')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (2, 8, '2', '7')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (3, 8, '3', '9')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (5, 8, '4', '2')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, '5', '4')");
          + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + table_name
          + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)");
          + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, 5, 400)");
          + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + tableName
          + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)");

          -1 core tests. The patch failed these unit tests:
          ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.UpgradeIT
          ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.monitoring.PhoenixMetricsIT
          ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.LastValuesFunctionIT

          Test results: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1009//testReport/
          Release audit warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1009//artifact/patchprocess/patchReleaseAuditWarnings.txt
          Javadoc warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1009//artifact/patchprocess/patchJavadocWarnings.txt
          Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1009//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12871516/PHOENIX-3773_master_003.patch against master branch at commit 7cdfc9cd489a493378968236bff7ae075402613b. ATTACHMENT ID: 12871516 +1 @author . The patch does not contain any @author tags. -1 tests included . 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. -1 Anti-pattern . The patch appears to have anti-pattern where BYTES_COMPARATOR was omitted: protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());. -1 Known Incompatible class . The patch appears to have incompatible classes: protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());. +1 javac . The applied patch does not increase the total number of javac compiler warnings. -1 javadoc . The javadoc tool appears to have generated 47 warning messages. -1 release audit . The applied patch generated 5 release audit warnings (more than the master's current 0 warnings). -1 lineLengths . The patch introduces the following lines longer than 100: + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, '1', '3')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (2, 8, '2', '7')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (3, 8, '3', '9')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (5, 8, '4', '2')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, '5', '4')"); + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + table_name + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)"); + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, 5, 400)"); + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + tableName + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)"); -1 core tests . The patch failed these unit tests: ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.UpgradeIT ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.monitoring.PhoenixMetricsIT ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.LastValuesFunctionIT Test results: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1009//testReport/ Release audit warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1009//artifact/patchprocess/patchReleaseAuditWarnings.txt Javadoc warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1009//artifact/patchprocess/patchJavadocWarnings.txt Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1009//console This message is automatically generated.
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12871556/PHOENIX-3773_4.x-HBase-0.98_final.patch
          against 4.x-HBase-0.98 branch at commit 7cdfc9cd489a493378968236bff7ae075402613b.
          ATTACHMENT ID: 12871556

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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.

          -1 patch. The patch command could not apply the patch.

          Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1012//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12871556/PHOENIX-3773_4.x-HBase-0.98_final.patch against 4.x-HBase-0.98 branch at commit 7cdfc9cd489a493378968236bff7ae075402613b. ATTACHMENT ID: 12871556 +1 @author . The patch does not contain any @author tags. -1 tests included . 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. -1 patch . The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1012//console This message is automatically generated.
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12871539/PHOENIX-3773_master_final.patch
          against master branch at commit 7cdfc9cd489a493378968236bff7ae075402613b.
          ATTACHMENT ID: 12871539

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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.

          -1 Anti-pattern. The patch appears to have anti-pattern where BYTES_COMPARATOR was omitted:
          protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());.

          -1 Known Incompatible class. The patch appears to have incompatible classes:
          protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          -1 javadoc. The javadoc tool appears to have generated 47 warning messages.

          -1 release audit. The applied patch generated 5 release audit warnings (more than the master's current 0 warnings).

          -1 lineLengths. The patch introduces the following lines longer than 100:
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, '1', '3')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (2, 8, '2', '7')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (3, 8, '3', '9')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (5, 8, '4', '2')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, '5', '4')");
          + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + table_name
          + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)");
          + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, 5, 400)");
          + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + tableName
          + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)");

          -1 core tests. The patch failed these unit tests:
          ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.UpgradeIT
          ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.monitoring.PhoenixMetricsIT

          Test results: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1011//testReport/
          Release audit warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1011//artifact/patchprocess/patchReleaseAuditWarnings.txt
          Javadoc warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1011//artifact/patchprocess/patchJavadocWarnings.txt
          Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1011//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12871539/PHOENIX-3773_master_final.patch against master branch at commit 7cdfc9cd489a493378968236bff7ae075402613b. ATTACHMENT ID: 12871539 +1 @author . The patch does not contain any @author tags. -1 tests included . 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. -1 Anti-pattern . The patch appears to have anti-pattern where BYTES_COMPARATOR was omitted: protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());. -1 Known Incompatible class . The patch appears to have incompatible classes: protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());. +1 javac . The applied patch does not increase the total number of javac compiler warnings. -1 javadoc . The javadoc tool appears to have generated 47 warning messages. -1 release audit . The applied patch generated 5 release audit warnings (more than the master's current 0 warnings). -1 lineLengths . The patch introduces the following lines longer than 100: + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, '1', '3')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (2, 8, '2', '7')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (3, 8, '3', '9')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (5, 8, '4', '2')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, '5', '4')"); + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + table_name + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)"); + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, 5, 400)"); + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + tableName + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)"); -1 core tests . The patch failed these unit tests: ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.UpgradeIT ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.monitoring.PhoenixMetricsIT Test results: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1011//testReport/ Release audit warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1011//artifact/patchprocess/patchReleaseAuditWarnings.txt Javadoc warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1011//artifact/patchprocess/patchJavadocWarnings.txt Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1011//console This message is automatically generated.
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12871576/PHOENIX-3773_4.x-HBase-0.98_final.patch
          against 4.x-HBase-0.98 branch at commit 7cdfc9cd489a493378968236bff7ae075402613b.
          ATTACHMENT ID: 12871576

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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.

          -1 patch. The patch command could not apply the patch.

          Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1013//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12871576/PHOENIX-3773_4.x-HBase-0.98_final.patch against 4.x-HBase-0.98 branch at commit 7cdfc9cd489a493378968236bff7ae075402613b. ATTACHMENT ID: 12871576 +1 @author . The patch does not contain any @author tags. -1 tests included . 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. -1 patch . The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1013//console This message is automatically generated.
          Hide
          singamteja Loknath Priyatham Teja Singamsetty added a comment -

          Thomas D'Silva Samarth Jain James Taylor
          Have incorporated the review comments.

          a) Added ability to PArrayDataType.appendItemToArray to build array with element provided when empty
          b) Renamed the variable to isArrayReturnType.
          c) Removed the outer loop
          d) For nth value return empty byte array with return value as true when not found

          Issue with pre-commit build. The master patch file is applied properly. But the pre-commit build fails applying the 4.x-HBase-0.98 patch although it applies perfectly fine with "git apply <filename>" on checked out phoenix code. No insight into why this patch failed. Here are the log lines from the build output:

          + /home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/dev/smart-apply-patch.sh /home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/patchprocess/patch
          /home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/dev/test-patch.sh: line 488: /home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/dev/smart-apply-patch.sh: No such file or directory
          + [[ 127 != 0 ]]

          Can you guys help here?

          Show
          singamteja Loknath Priyatham Teja Singamsetty added a comment - Thomas D'Silva Samarth Jain James Taylor Have incorporated the review comments. a) Added ability to PArrayDataType.appendItemToArray to build array with element provided when empty b) Renamed the variable to isArrayReturnType. c) Removed the outer loop d) For nth value return empty byte array with return value as true when not found Issue with pre-commit build. The master patch file is applied properly. But the pre-commit build fails applying the 4.x-HBase-0.98 patch although it applies perfectly fine with "git apply <filename>" on checked out phoenix code. No insight into why this patch failed. Here are the log lines from the build output: + /home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/dev/smart-apply-patch.sh /home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/patchprocess/patch /home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/dev/test-patch.sh: line 488: /home/jenkins/jenkins-slave/workspace/PreCommit-PHOENIX-Build/dev/smart-apply-patch.sh: No such file or directory + [[ 127 != 0 ]] Can you guys help here?
          Hide
          singamteja Loknath Priyatham Teja Singamsetty added a comment -

          Not able to debug further as i don't have access to smart-applu-patch.sh

          FYI: James Taylor

          Show
          singamteja Loknath Priyatham Teja Singamsetty added a comment - Not able to debug further as i don't have access to smart-applu-patch.sh FYI: James Taylor
          Hide
          tdsilva Thomas D'Silva added a comment -

          I think the pre commit build always applies a patch to master.

          Show
          tdsilva Thomas D'Silva added a comment - I think the pre commit build always applies a patch to master.
          Hide
          singamteja Loknath Priyatham Teja Singamsetty added a comment -

          Thomas D'Silva In one of the earlier comments, Samarth suggested to create <JIRA>_<branch>.patch which will only apply to specific branch. Is this not the case ?

          Show
          singamteja Loknath Priyatham Teja Singamsetty added a comment - Thomas D'Silva In one of the earlier comments, Samarth suggested to create <JIRA>_<branch>.patch which will only apply to specific branch. Is this not the case ?
          Hide
          singamteja Loknath Priyatham Teja Singamsetty added a comment -

          Thomas D'Silva If you have access can you paste the code from smart-apply-patch.sh and test-patch.sh

          CC: Samarth Jain

          Show
          singamteja Loknath Priyatham Teja Singamsetty added a comment - Thomas D'Silva If you have access can you paste the code from smart-apply-patch.sh and test-patch.sh CC: Samarth Jain
          Hide
          jamestaylor James Taylor added a comment -

          If you ran the tests locally, that's ok too. Would you mind attaching patches here for other branches if this one doesn't apply cleanly?

          Show
          jamestaylor James Taylor added a comment - If you ran the tests locally, that's ok too. Would you mind attaching patches here for other branches if this one doesn't apply cleanly?
          Hide
          jamestaylor James Taylor added a comment -

          Loknath Priyatham Teja Singamsetty - here's a patch on top of PHOENIX-3913. If you could generate patches for this that apply cleanly to other branches, that'd be most appreciated.

          Show
          jamestaylor James Taylor added a comment - Loknath Priyatham Teja Singamsetty - here's a patch on top of PHOENIX-3913 . If you could generate patches for this that apply cleanly to other branches, that'd be most appreciated.
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12871745/PHOENIX-3773_4.x-HBase-0.98_v2.patch
          against 4.x-HBase-0.98 branch at commit dbd70f56d1926bf94bb444c918c56671c30a41e8.
          ATTACHMENT ID: 12871745

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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.

          -1 patch. The patch command could not apply the patch.

          Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1020//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12871745/PHOENIX-3773_4.x-HBase-0.98_v2.patch against 4.x-HBase-0.98 branch at commit dbd70f56d1926bf94bb444c918c56671c30a41e8. ATTACHMENT ID: 12871745 +1 @author . The patch does not contain any @author tags. -1 tests included . 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. -1 patch . The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1020//console This message is automatically generated.
          Hide
          singamteja Loknath Priyatham Teja Singamsetty added a comment -

          James Taylor Attached patches created on top of PHOENIX-3913 for all the branches.

          Show
          singamteja Loknath Priyatham Teja Singamsetty added a comment - James Taylor Attached patches created on top of PHOENIX-3913 for all the branches.
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12871772/PHOENIX-3773_4.x-HBase-1.2_v2.patch
          against master branch at commit dbd70f56d1926bf94bb444c918c56671c30a41e8.
          ATTACHMENT ID: 12871772

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. 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.

          -1 Anti-pattern. The patch appears to have anti-pattern where BYTES_COMPARATOR was omitted:
          protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());.

          -1 Known Incompatible class. The patch appears to have incompatible classes:
          protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          -1 javadoc. The javadoc tool appears to have generated 50 warning messages.

          -1 release audit. The applied patch generated 5 release audit warnings (more than the master's current 0 warnings).

          -1 lineLengths. The patch introduces the following lines longer than 100:
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, '1', '3')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (2, 8, '2', '7')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (3, 8, '3', '9')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (5, 8, '4', '2')");
          + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, '5', '4')");
          + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + table_name
          + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)");
          + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, 5, 400)");
          + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + tableName
          + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)");

          -1 core tests. The patch failed these unit tests:
          ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.LastValuesFunctionIT
          ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.index.MutableIndexFailureIT
          ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.ClientTimeArithmeticQueryIT
          ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.RegexBulkLoadToolIT
          ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.FirstValuesFunctionIT

          Test results: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1022//testReport/
          Release audit warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1022//artifact/patchprocess/patchReleaseAuditWarnings.txt
          Javadoc warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1022//artifact/patchprocess/patchJavadocWarnings.txt
          Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1022//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12871772/PHOENIX-3773_4.x-HBase-1.2_v2.patch against master branch at commit dbd70f56d1926bf94bb444c918c56671c30a41e8. ATTACHMENT ID: 12871772 +1 @author . The patch does not contain any @author tags. -1 tests included . 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. -1 Anti-pattern . The patch appears to have anti-pattern where BYTES_COMPARATOR was omitted: protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());. -1 Known Incompatible class . The patch appears to have incompatible classes: protected TreeMap<byte[], LinkedList<byte[]>> topValues = new TreeMap<byte[], LinkedList<byte[]>>(new ByteArrayComparator());. +1 javac . The applied patch does not increase the total number of javac compiler warnings. -1 javadoc . The javadoc tool appears to have generated 50 warning messages. -1 release audit . The applied patch generated 5 release audit warnings (more than the master's current 0 warnings). -1 lineLengths . The patch introduces the following lines longer than 100: + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, '1', '3')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (2, 8, '2', '7')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (3, 8, '3', '9')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (5, 8, '4', '2')"); + "UPSERT INTO " + table_name + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, '5', '4')"); + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + table_name + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)"); + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (4, 8, 5, 400)"); + "SELECT FIRST_VALUES(\"value\", 2) WITHIN GROUP (ORDER BY \"DATE\" ASC) FROM " + tableName + "UPSERT INTO " + tableName + " (id, page_id, \"DATE\", \"value\") VALUES (1, 8, 1, 300)"); -1 core tests . The patch failed these unit tests: ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.LastValuesFunctionIT ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.index.MutableIndexFailureIT ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.ClientTimeArithmeticQueryIT ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.RegexBulkLoadToolIT ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.FirstValuesFunctionIT Test results: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1022//testReport/ Release audit warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1022//artifact/patchprocess/patchReleaseAuditWarnings.txt Javadoc warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1022//artifact/patchprocess/patchJavadocWarnings.txt Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1022//console This message is automatically generated.
          Hide
          jamestaylor James Taylor added a comment -

          Pushed to 4.x and master branches. Thanks for the contribution, Loknath Priyatham Teja Singamsetty . Please make sure to file a separate JIRA to update our website with these new aggregate functions.

          Show
          jamestaylor James Taylor added a comment - Pushed to 4.x and master branches. Thanks for the contribution, Loknath Priyatham Teja Singamsetty . Please make sure to file a separate JIRA to update our website with these new aggregate functions.
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Jenkins build Phoenix-master #1646 (See https://builds.apache.org/job/Phoenix-master/1646/)
          PHOENIX-3773 Support FIRST_VALUES and LAST_VALUES aggregate function to (jamestaylor: rev 9095b3ec87aef45138d62e5bbffdafee3e934d38)

          • (edit) phoenix-core/src/main/java/org/apache/phoenix/expression/aggregator/FirstLastValueBaseClientAggregator.java
          • (add) phoenix-core/src/main/java/org/apache/phoenix/expression/function/LastValuesFunction.java
          • (add) phoenix-core/src/it/java/org/apache/phoenix/end2end/LastValuesFunctionIT.java
          • (edit) phoenix-core/src/main/java/org/apache/phoenix/expression/aggregator/FirstLastValueServerAggregator.java
          • (add) phoenix-core/src/main/java/org/apache/phoenix/expression/function/FirstValuesFunction.java
          • (add) phoenix-core/src/main/java/org/apache/phoenix/parse/LastValuesAggregateParseNode.java
          • (edit) phoenix-core/src/main/java/org/apache/phoenix/expression/function/LastValueFunction.java
          • (add) phoenix-core/src/main/java/org/apache/phoenix/parse/FirstValuesAggregateParseNode.java
          • (add) phoenix-core/src/it/java/org/apache/phoenix/end2end/FirstValuesFunctionIT.java
          • (edit) phoenix-core/src/main/java/org/apache/phoenix/util/FirstLastNthValueDataContainer.java
          • (edit) phoenix-core/src/main/java/org/apache/phoenix/expression/function/NthValueFunction.java
          • (edit) phoenix-core/src/main/java/org/apache/phoenix/expression/function/FirstValueFunction.java
          • (edit) phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Jenkins build Phoenix-master #1646 (See https://builds.apache.org/job/Phoenix-master/1646/ ) PHOENIX-3773 Support FIRST_VALUES and LAST_VALUES aggregate function to (jamestaylor: rev 9095b3ec87aef45138d62e5bbffdafee3e934d38) (edit) phoenix-core/src/main/java/org/apache/phoenix/expression/aggregator/FirstLastValueBaseClientAggregator.java (add) phoenix-core/src/main/java/org/apache/phoenix/expression/function/LastValuesFunction.java (add) phoenix-core/src/it/java/org/apache/phoenix/end2end/LastValuesFunctionIT.java (edit) phoenix-core/src/main/java/org/apache/phoenix/expression/aggregator/FirstLastValueServerAggregator.java (add) phoenix-core/src/main/java/org/apache/phoenix/expression/function/FirstValuesFunction.java (add) phoenix-core/src/main/java/org/apache/phoenix/parse/LastValuesAggregateParseNode.java (edit) phoenix-core/src/main/java/org/apache/phoenix/expression/function/LastValueFunction.java (add) phoenix-core/src/main/java/org/apache/phoenix/parse/FirstValuesAggregateParseNode.java (add) phoenix-core/src/it/java/org/apache/phoenix/end2end/FirstValuesFunctionIT.java (edit) phoenix-core/src/main/java/org/apache/phoenix/util/FirstLastNthValueDataContainer.java (edit) phoenix-core/src/main/java/org/apache/phoenix/expression/function/NthValueFunction.java (edit) phoenix-core/src/main/java/org/apache/phoenix/expression/function/FirstValueFunction.java (edit) phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java

            People

            • Assignee:
              singamteja Loknath Priyatham Teja Singamsetty
              Reporter:
              jamestaylor James Taylor
            • Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development