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

Unicode delimiter does not work correctly

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.0, 0.9.0
    • Fix Version/s: 0.9.0
    • Component/s: Catalog
    • Labels:
      None

      Description

      When table create with a unicode delimiter, it store wrong unicode as follows:

      create table delim_test (col1 text, col2 text) using csv with ('csvfile.delimiter'='\u0036');
      Actual : 'csvfile.delimiter'='\u0006'
      

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #278 (See https://builds.apache.org/job/Tajo-master-build/278/)
        TAJO-902: Unicode delimiter does not work correctly. (jinho) (jinossy: rev 10caff074e2f00887134f94b0dc918b3cef0e824)

        • tajo-common/src/test/java/org/apache/tajo/util/TestStringUtil.java
        • tajo-client/src/main/java/org/apache/tajo/cli/DescTableCommand.java
        • tajo-common/src/main/java/org/apache/tajo/util/StringUtils.java
        • CHANGES
        • tajo-core/src/main/java/org/apache/tajo/engine/parser/SQLAnalyzer.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #278 (See https://builds.apache.org/job/Tajo-master-build/278/ ) TAJO-902 : Unicode delimiter does not work correctly. (jinho) (jinossy: rev 10caff074e2f00887134f94b0dc918b3cef0e824) tajo-common/src/test/java/org/apache/tajo/util/TestStringUtil.java tajo-client/src/main/java/org/apache/tajo/cli/DescTableCommand.java tajo-common/src/main/java/org/apache/tajo/util/StringUtils.java CHANGES tajo-core/src/main/java/org/apache/tajo/engine/parser/SQLAnalyzer.java
        Hide
        jhkim Jinho Kim added a comment -

        Thank you for the review.
        I’ve committed it.

        Show
        jhkim Jinho Kim added a comment - Thank you for the review. I’ve committed it.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

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

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

        Github user hyunsik commented on the pull request:

        https://github.com/apache/tajo/pull/53#issuecomment-48139546

        +1

        Sounds nice. The patch looks good to me. I leave one comment. Before you commit it, please add a brief explanation about the condition. Thanks!

        Show
        githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/53#issuecomment-48139546 +1 Sounds nice. The patch looks good to me. I leave one comment. Before you commit it, please add a brief explanation about the condition. Thanks!
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user hyunsik commented on a diff in the pull request:

        https://github.com/apache/tajo/pull/53#discussion_r14581009

        — Diff: tajo-client/src/main/java/org/apache/tajo/cli/DescTableCommand.java —
        @@ -84,8 +86,13 @@ protected String toFormattedString(TableDesc desc) {
        }
        sb.append("Options: \n");
        for(Map.Entry<String, String> entry : desc.getMeta().toMap().entrySet()){
        + String value = entry.getValue();
        + String unescaped = StringEscapeUtils.unescapeJava(value);
        + if(unescaped.length() == 1 && CharUtils.isAsciiPrintable(unescaped.charAt(0))){
        — End diff –

        Could you add some comment about the purpose of this condition?

        Show
        githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on a diff in the pull request: https://github.com/apache/tajo/pull/53#discussion_r14581009 — Diff: tajo-client/src/main/java/org/apache/tajo/cli/DescTableCommand.java — @@ -84,8 +86,13 @@ protected String toFormattedString(TableDesc desc) { } sb.append("Options: \n"); for(Map.Entry<String, String> entry : desc.getMeta().toMap().entrySet()){ + String value = entry.getValue(); + String unescaped = StringEscapeUtils.unescapeJava(value); + if(unescaped.length() == 1 && CharUtils.isAsciiPrintable(unescaped.charAt(0))){ — End diff – Could you add some comment about the purpose of this condition?
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user jinossy commented on the pull request:

        https://github.com/apache/tajo/pull/53#issuecomment-48137212

        No, we don't need
        Thanks

        Show
        githubbot ASF GitHub Bot added a comment - Github user jinossy commented on the pull request: https://github.com/apache/tajo/pull/53#issuecomment-48137212 No, we don't need Thanks
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user hyunsik commented on the pull request:

        https://github.com/apache/tajo/pull/53#issuecomment-48136259

        Do we need to change the documentation?
        http://tajo.apache.org/docs/current/table_management/csv.html

        Show
        githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/53#issuecomment-48136259 Do we need to change the documentation? http://tajo.apache.org/docs/current/table_management/csv.html
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user jinossy opened a pull request:

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

        TAJO-902: Unicode delimiter does not work correctly

        I've verified TajoCli, TajoDump

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

        $ git pull https://github.com/jinossy/tajo TAJO-902

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

        https://github.com/apache/tajo/pull/53.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 #53


        commit 0905851881ee8ce4e04b5005c81e05ec5ff3a13a
        Author: jinossy <jinossy@gmail.com>
        Date: 2014-07-03T16:16:47Z

        TAJO-902: Unicode delimiter does not work correctly


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user jinossy opened a pull request: https://github.com/apache/tajo/pull/53 TAJO-902 : Unicode delimiter does not work correctly I've verified TajoCli, TajoDump You can merge this pull request into a Git repository by running: $ git pull https://github.com/jinossy/tajo TAJO-902 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/53.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 #53 commit 0905851881ee8ce4e04b5005c81e05ec5ff3a13a Author: jinossy <jinossy@gmail.com> Date: 2014-07-03T16:16:47Z TAJO-902 : Unicode delimiter does not work correctly

          People

          • Assignee:
            jhkim Jinho Kim
            Reporter:
            jhkim Jinho Kim
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development