Details

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

      Description

      octet_length function returns byte size of text.

      1. TAJO-348.4.patch
        4 kB
        DaeMyung Kang
      2. TAJO-348.3.patch
        4 kB
        DaeMyung Kang
      3. TAJO-348.2.patch
        2 kB
        DaeMyung Kang
      4. TAJO-348.patch
        4 kB
        DaeMyung Kang

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-trunk-postcommit #584 (See https://builds.apache.org/job/Tajo-trunk-postcommit/584/)
        TAJO-348: Implement octet_length(text). (DaeMyung Kang via jaehwa) (jhjung: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=19c7585cc775764860341fcc9404ee92d80d3b20)

        • CHANGES.txt
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/function/string/OctetLength.java
        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/function/TestStringOperatorsAndFunctions.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/TajoMaster.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-trunk-postcommit #584 (See https://builds.apache.org/job/Tajo-trunk-postcommit/584/ ) TAJO-348 : Implement octet_length(text). (DaeMyung Kang via jaehwa) (jhjung: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=19c7585cc775764860341fcc9404ee92d80d3b20 ) CHANGES.txt tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/function/string/OctetLength.java tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/function/TestStringOperatorsAndFunctions.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/TajoMaster.java
        Hide
        blrunner Jaehwa Jung added a comment -

        +1. It looks good and 'mvn clean install' passed.
        I've just committed.

        Show
        blrunner Jaehwa Jung added a comment - +1. It looks good and 'mvn clean install' passed. I've just committed.
        Hide
        sirpkt Keuntae Park added a comment -

        This patch looks good to me

        Show
        sirpkt Keuntae Park added a comment - This patch looks good to me
        Hide
        charsyam DaeMyung Kang added a comment -

        sorry. I uploaded patch again.

        Show
        charsyam DaeMyung Kang added a comment - sorry. I uploaded patch again.
        Hide
        charsyam DaeMyung Kang added a comment -

        Keuntae Park you are right. I'm sorry I uploaded bad file.

        sqlFuncs.add(
        new FunctionDesc("octet_length", OctetLength.class, FunctionType.GENERAL,
        CatalogUtil.newSimpleDataType(Type.INT4),
        CatalogUtil.newSimpleDataTypeArray(Type.TEXT)));

        is right.

        Show
        charsyam DaeMyung Kang added a comment - Keuntae Park you are right. I'm sorry I uploaded bad file. sqlFuncs.add( new FunctionDesc("octet_length", OctetLength.class, FunctionType.GENERAL, CatalogUtil.newSimpleDataType(Type.INT4), CatalogUtil.newSimpleDataTypeArray(Type.TEXT))); is right.
        Hide
        sirpkt Keuntae Park added a comment -

        This patch didn't pass 'mvn clean install'
        I think following code in TajoMaster.java

        sqlFuncs.add(
                new FunctionDesc("octet_length", OctetLength.class, FunctionType.GENERAL,
                    CatalogUtil.newSimpleDataType(Type.TEXT),
                    CatalogUtil.newSimpleDataTypeArray(Type.INT4)));
        

        should be

        sqlFuncs.add(
                new FunctionDesc("octet_length", OctetLength.class, FunctionType.GENERAL,
                    CatalogUtil.newSimpleDataType(Type.INT4),
                    CatalogUtil.newSimpleDataTypeArray(Type.TEXT)));
        
        Show
        sirpkt Keuntae Park added a comment - This patch didn't pass 'mvn clean install' I think following code in TajoMaster.java sqlFuncs.add( new FunctionDesc("octet_length", OctetLength.class, FunctionType.GENERAL, CatalogUtil.newSimpleDataType(Type.TEXT), CatalogUtil.newSimpleDataTypeArray(Type.INT4))); should be sqlFuncs.add( new FunctionDesc("octet_length", OctetLength.class, FunctionType.GENERAL, CatalogUtil.newSimpleDataType(Type.INT4), CatalogUtil.newSimpleDataTypeArray(Type.TEXT)));
        Hide
        charsyam DaeMyung Kang added a comment -

        Keuntae Park Thank you. I uploaded it again.

        Show
        charsyam DaeMyung Kang added a comment - Keuntae Park Thank you. I uploaded it again.
        Hide
        sirpkt Keuntae Park added a comment -

        It looks that code for 'OctetLength.java' is missing in TAJO-348.2.patch.
        Please, check.

        Show
        sirpkt Keuntae Park added a comment - It looks that code for 'OctetLength.java' is missing in TAJO-348 .2.patch. Please, check.
        Hide
        charsyam DaeMyung Kang added a comment -

        I changed return value type from TEXT to INT4.

        Show
        charsyam DaeMyung Kang added a comment - I changed return value type from TEXT to INT4.
        Hide
        charsyam DaeMyung Kang added a comment -

        I implemented octet_length.

        Show
        charsyam DaeMyung Kang added a comment - I implemented octet_length.

          People

          • Assignee:
            charsyam DaeMyung Kang
            Reporter:
            charsyam DaeMyung Kang
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development