Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11.0
    • Component/s: Function/UDF
    • Labels:
      None

      Description

      json_array_get

      SELECT json_array_get('["a", "b", "c"]', 0); => "a"
      SELECT json_array_get('["a", "b", "c"]', 1); => "b"
      SELECT json_array_get('["c", "b", "a"]', -1); => "a"
      SELECT json_array_get('["c", "b", "a"]', -2); => "b"
      SELECT json_array_get('[]', 0); => null
      SELECT json_array_get('["a", "b", "c"]', 10); => null
      SELECT json_array_get('["c", "b", "a"]', -10); => null
      

      json_array_contains

      SELECT json_array_contains('[1, 2, 3]', 2);
      

      json_array_length

      SELECT json_array_length('[1, 2, 3]');
      

        Activity

        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user jihoonson opened a pull request:

        https://github.com/apache/tajo/pull/687

        TAJO-1754: Implement several functions to handle json array

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/jihoonson/tajo-2 TAJO-1754

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/tajo/pull/687.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #687


        commit fbc212d85880b11d5f0c3f634970d202fb2fbd67
        Author: Jihoon Son <jihoonson@apache.org>
        Date: 2015-08-13T03:05:32Z

        TAJO-1754


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user jihoonson opened a pull request: https://github.com/apache/tajo/pull/687 TAJO-1754 : Implement several functions to handle json array You can merge this pull request into a Git repository by running: $ git pull https://github.com/jihoonson/tajo-2 TAJO-1754 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/687.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #687 commit fbc212d85880b11d5f0c3f634970d202fb2fbd67 Author: Jihoon Son <jihoonson@apache.org> Date: 2015-08-13T03:05:32Z TAJO-1754
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user hyunsik commented on the pull request:

        https://github.com/apache/tajo/pull/687#issuecomment-130662056

        +1 LGTM!

        Show
        githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/687#issuecomment-130662056 +1 LGTM!
        Hide
        jihoonson Jihoon Son added a comment -

        Committed to master.

        Show
        jihoonson Jihoon Son added a comment - Committed to master.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

        https://github.com/apache/tajo/pull/687

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/tajo/pull/687
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user jihoonson commented on the pull request:

        https://github.com/apache/tajo/pull/687#issuecomment-130673788

        Thanks for your review!

        Show
        githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on the pull request: https://github.com/apache/tajo/pull/687#issuecomment-130673788 Thanks for your review!
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #798 (See https://builds.apache.org/job/Tajo-master-build/798/)
        TAJO-1754: Implement several functions to handle json array. (jihoonson: rev 9114485b594b89616f240267fc3b3cf5d2a02370)

        • tajo-docs/src/main/sphinx/functions/json_func.rst
        • tajo-core/src/main/java/org/apache/tajo/engine/function/json/ScalarJsonFunction.java
        • CHANGES
        • tajo-core/src/main/java/org/apache/tajo/engine/function/json/JsonArrayContains.java
        • tajo-core/src/test/java/org/apache/tajo/engine/function/TestJsonFunctions.java
        • tajo-core/src/main/java/org/apache/tajo/engine/function/json/JsonArrayGet.java
        • tajo-core/src/main/java/org/apache/tajo/engine/function/json/JsonExtractPathText.java
        • tajo-core/src/main/java/org/apache/tajo/engine/function/json/JsonArrayLength.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #798 (See https://builds.apache.org/job/Tajo-master-build/798/ ) TAJO-1754 : Implement several functions to handle json array. (jihoonson: rev 9114485b594b89616f240267fc3b3cf5d2a02370) tajo-docs/src/main/sphinx/functions/json_func.rst tajo-core/src/main/java/org/apache/tajo/engine/function/json/ScalarJsonFunction.java CHANGES tajo-core/src/main/java/org/apache/tajo/engine/function/json/JsonArrayContains.java tajo-core/src/test/java/org/apache/tajo/engine/function/TestJsonFunctions.java tajo-core/src/main/java/org/apache/tajo/engine/function/json/JsonArrayGet.java tajo-core/src/main/java/org/apache/tajo/engine/function/json/JsonExtractPathText.java tajo-core/src/main/java/org/apache/tajo/engine/function/json/JsonArrayLength.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Tajo-master-CODEGEN-build #436 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/436/)
        TAJO-1754: Implement several functions to handle json array. (jihoonson: rev 9114485b594b89616f240267fc3b3cf5d2a02370)

        • tajo-core/src/main/java/org/apache/tajo/engine/function/json/JsonArrayLength.java
        • tajo-core/src/main/java/org/apache/tajo/engine/function/json/JsonArrayContains.java
        • tajo-docs/src/main/sphinx/functions/json_func.rst
        • tajo-core/src/main/java/org/apache/tajo/engine/function/json/ScalarJsonFunction.java
        • tajo-core/src/main/java/org/apache/tajo/engine/function/json/JsonExtractPathText.java
        • tajo-core/src/main/java/org/apache/tajo/engine/function/json/JsonArrayGet.java
        • CHANGES
        • tajo-core/src/test/java/org/apache/tajo/engine/function/TestJsonFunctions.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Tajo-master-CODEGEN-build #436 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/436/ ) TAJO-1754 : Implement several functions to handle json array. (jihoonson: rev 9114485b594b89616f240267fc3b3cf5d2a02370) tajo-core/src/main/java/org/apache/tajo/engine/function/json/JsonArrayLength.java tajo-core/src/main/java/org/apache/tajo/engine/function/json/JsonArrayContains.java tajo-docs/src/main/sphinx/functions/json_func.rst tajo-core/src/main/java/org/apache/tajo/engine/function/json/ScalarJsonFunction.java tajo-core/src/main/java/org/apache/tajo/engine/function/json/JsonExtractPathText.java tajo-core/src/main/java/org/apache/tajo/engine/function/json/JsonArrayGet.java CHANGES tajo-core/src/test/java/org/apache/tajo/engine/function/TestJsonFunctions.java

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development