Uploaded image for project: 'Hue (READ ONLY)'
  1. Hue (READ ONLY)
  2. HUE-6818

Impossible to display multi line column comment in Hue


    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: 3.11.0
    • Fix Version/s: None
    • Component/s: app.catalog, con.hive
    • Labels:


      Note : the version of Hue in which I have the problem is 3.9.0 (I could not select it)

      I was adding column comments in Hive using Hue. I specifically wanted the comment to be displayed on several lines in Hue when it is too long to be read on a single line.

      I created a table I found in a previous stackoverflow post as an example :

       CREATE TABLE test_table(
         col1 INT COMMENT 'col1 one line comment',
         col2 STRING COMMENT 'col2 two lines comment',
         col3 STRING COMMENT 'col3 three lines comment',
         col4 STRING COMMENT 'col4 very long comment that is greater than 80 chars and is likely to spill into multiple lines',
         col5 STRING COMMENT 'col5 very long multi-line comment where each line is very long by itself and is likely to spill into multiple lines. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin in dolor nisl, sodales adipiscing tortor. Integer venenatis',
         col6 STRING COMMENT 'This comment has a very long single word ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvzxyz123 which will not fit in a line by itself for small column widths.',
         col7_NoComment STRING)
       COMMENT 'table comment two lines';

      You can see the view of the table in Hue with the "Table test_table Hue.PNG" image attached

      As you can see, there is no line break for the comments. No matter how long the comment is, it is still added in a single line.

      To break it into multiple lines in Hue, I thought about using the "\n" character. Here is the result with the query associated when modifying the comment of the column number 6 :

      ALTER TABLE test_table CHANGE COLUMN col6 col6 STRING COMMENT 'This comment has a very long single word ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvzxyz123 \n Line break here because it will not fit in a single line.'

      The view of the metadata of "table_test" in Hue when trying to write a multi-line comment is in the "Table test_table Hue break line comment.PNG" image.

      If you look at the line number 6, you cans see that what is supposed to be a comment is interpreted by Hue (or Hive) as a new column. So now instead of having my 7 columns, I have 8 columns.

      I don't know if it is yet possible to have a multi-line comment for a column displayed in any versions of Hue.

      There is nothing wrong with the metadata : when I create the Hive table "mytable" and execute the command "show create table mytable;" , the metadata shows that I only have on column which is correct.




            • Assignee:
              ABEL BELGHITI
            • Votes:
              1 Vote for this issue
              3 Start watching this issue


              • Created: