Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-8544

Beeline SeparatedValuesOutputFormat (csv/tsv/dsv) wraps the results with extra double quotes

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Done
    • 0.14.0
    • None
    • CLI, JDBC
    • None

    Description

      Noticed additional double quotes in select * <complex datatypes> output while running it through HiveServer2/Beeline

      Actual

      [18,19]	"{""col1"":""alice brown"",""col2"":18}"	"{""alice brown"":18}"
      [18,19]	"{""col1"":""alice garcia"",""col2"":18}"	"{""alice garcia"":18}"
      [18,19]	"{""col1"":""alice garcia"",""col2"":18}"	"{""alice garcia"":18}"
      [18,19]	"{""col1"":""alice thompson"",""col2"":18}"	"{""alice thompson"":18}"
      [18,19]	"{""col1"":""alice xylophone"",""col2"":18}"	"{""alice xylophone"":18}"
      [18,19]	"{""col1"":""bob hernandez"",""col2"":18}"	"{""bob hernandez"":18}"
      [18,19]	"{""col1"":""bob ichabod"",""col2"":18}"	"{""bob ichabod"":18}"
      

      Expected

      [18,19]	{"col1":"alice brown","col2":18}	{"alice brown":18}
      [18,19]	{"col1":"alice garcia","col2":18}	{"alice garcia":18}
      [18,19]	{"col1":"alice garcia","col2":18}	{"alice garcia":18}
      [18,19]	{"col1":"alice thompson","col2":18}	{"alice thompson":18}
      [18,19]	{"col1":"alice xylophone","col2":18}	{"alice xylophone":18}
      [18,19]	{"col1":"bob hernandez","col2":18}	{"bob hernandez":18}
      [18,19]	{"col1":"bob ichabod","col2":18}	{"bob ichabod":18}
      

      Run these queries through HiveServer2 to reproduce the issue:

      create table insert_9 (a array<int>, b struct<col1:string,col2:int>, c map<string, int>);
       insert overwrite table insert_9 select array(age, age+1), struct(name, age), map(name, age) from studenttab10k;
      select * from insert_9;
      

      Attachments

        1. HIVE-8544.1.patch
          1 kB
          Vaibhav Gumashta

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            vgumashta Vaibhav Gumashta Assign to me
            vgumashta Vaibhav Gumashta
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment