Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-682

RangePartitionAlgorithm should be improved to handle empty texts

    Details

      Description

      See the title.
      When one of input datums is an empty TextDatum, java.lang.StringIndexOutOfBoundsException occurs because, currently, the first characters of both input datum are always compared to calculate the cardinality.

      1. TAJO-682.patch
        6 kB
        Alvin Henrick

        Activity

        Hide
        alvinhenrick Alvin Henrick added a comment -

        Please find the patch attached.

        Assumptions made :-- The cardinality is defaulted to '0' if the TextDatum is Null.
        First Datum is Null (defaulted to 0) and second is 2 the appropriate cardinality will be calculated . The same logic is implemented if the second Datum is Null.

        If Both are Null the cardinality will be 0 - 0 = 0.

        Thanks!
        Warm Regards,
        Alvin.

        Show
        alvinhenrick Alvin Henrick added a comment - Please find the patch attached. Assumptions made :-- The cardinality is defaulted to '0' if the TextDatum is Null. First Datum is Null (defaulted to 0) and second is 2 the appropriate cardinality will be calculated . The same logic is implemented if the second Datum is Null. If Both are Null the cardinality will be 0 - 0 = 0. Thanks! Warm Regards, Alvin.
        Hide
        tajoqa Tajo QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12635553/TAJO-682.patch
        against master revision 5f7934e.

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

        +1 tests included. The patch appears to include 1 new or modified test files.

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

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

        +1 checkstyle. The patch generated 0 code style errors.

        -1 findbugs. The patch appears to introduce 183 new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in tajo-core/tajo-core-backend.

        Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/231//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/231//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core-backend.html
        Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/231//console

        This message is automatically generated.

        Show
        tajoqa Tajo QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12635553/TAJO-682.patch against master revision 5f7934e. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 1 new or modified test files. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The applied patch does not increase the total number of javadoc warnings. +1 checkstyle. The patch generated 0 code style errors. -1 findbugs. The patch appears to introduce 183 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed unit tests in tajo-core/tajo-core-backend. Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/231//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/231//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core-backend.html Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/231//console This message is automatically generated.
        Hide
        hyunsik Hyunsik Choi added a comment -

        +1

        Thank you for your contribution. You seem to find the essential problem. The patch looks nice for me.
        In addition, I realized that we need to handle NULL values in other types. I'll create another issue for them.

        Show
        hyunsik Hyunsik Choi added a comment - +1 Thank you for your contribution. You seem to find the essential problem. The patch looks nice for me. In addition, I realized that we need to handle NULL values in other types. I'll create another issue for them.
        Hide
        hyunsik Hyunsik Choi added a comment -

        Hi Alvin Henrick

        Currently, we are migrating our development resource into TLP's one. So, we cannot commit the patches to git repo for a while. I'll commit this patch after the migration issue is resolved.

        Regards,
        Hyunsik

        Show
        hyunsik Hyunsik Choi added a comment - Hi Alvin Henrick Currently, we are migrating our development resource into TLP's one. So, we cannot commit the patches to git repo for a while. I'll commit this patch after the migration issue is resolved. Regards, Hyunsik
        Hide
        hyunsik Hyunsik Choi added a comment -

        Thank you Alvin for your contribution. I just committed your patch on Tajo git repo.

        Here is your first commit log in Tajo git repo.
        https://git-wip-us.apache.org/repos/asf?p=tajo.git;a=commit;h=e12e038b5d50db015e6b9cdf8de478591b0712be

        Regards,
        Hyunsik

        Show
        hyunsik Hyunsik Choi added a comment - Thank you Alvin for your contribution. I just committed your patch on Tajo git repo. Here is your first commit log in Tajo git repo. https://git-wip-us.apache.org/repos/asf?p=tajo.git;a=commit;h=e12e038b5d50db015e6b9cdf8de478591b0712be Regards, Hyunsik
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #128 (See https://builds.apache.org/job/Tajo-master-build/128/)
        TAJO-682: RangePartitionAlgorithm should be improved to handle empty texts. (Alvin Henrick via hyunsik) (hyunsik: rev e12e038b5d50db015e6b9cdf8de478591b0712be)

        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/TestUniformRangePartition.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/RangePartitionAlgorithm.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/UniformRangePartition.java
        • CHANGES.txt
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #128 (See https://builds.apache.org/job/Tajo-master-build/128/ ) TAJO-682 : RangePartitionAlgorithm should be improved to handle empty texts. (Alvin Henrick via hyunsik) (hyunsik: rev e12e038b5d50db015e6b9cdf8de478591b0712be) tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/TestUniformRangePartition.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/RangePartitionAlgorithm.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/UniformRangePartition.java CHANGES.txt
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-0.8.0-build #33 (See https://builds.apache.org/job/Tajo-0.8.0-build/33/)
        TAJO-682: RangePartitionAlgorithm should be improved to handle empty texts. (Alvin Henrick via hyunsik) (hyunsik: rev 9c33b3294bbe7483d38aa2acd4397bc16616157f)

        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/TestUniformRangePartition.java
        • CHANGES.txt
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/UniformRangePartition.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/RangePartitionAlgorithm.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-0.8.0-build #33 (See https://builds.apache.org/job/Tajo-0.8.0-build/33/ ) TAJO-682 : RangePartitionAlgorithm should be improved to handle empty texts. (Alvin Henrick via hyunsik) (hyunsik: rev 9c33b3294bbe7483d38aa2acd4397bc16616157f) tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/planner/TestUniformRangePartition.java CHANGES.txt tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/UniformRangePartition.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/RangePartitionAlgorithm.java

          People

          • Assignee:
            alvinhenrick Alvin Henrick
            Reporter:
            jihoonson Jihoon Son
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development