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

Beeline query for special character like £ does not give back result

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1.0, 2.3.6
    • Fix Version/s: None
    • Component/s: Beeline
    • Labels:
      None
    • Environment:

      Cloudera 5.15.1 Hive 1.1.0

      beeline and Impala

      Description

      I have a table in hive with a column having special character like £. When I try to a query as simple as 'SELECT * FROM TABLE WHERE COL = "£"; ', the query does not come back with any result. 

      The table data is UTF-8 encoded. The sql file that contains the above sql and run via beeline is also UTF-8 encoded.

      Interestingly, if I try to create the run the same query using impala against the same table, I get back the columns containing the £ symbol.

      Also when the data from the table is exported (SELECT * FROM THE TABLE and save the output to csv file) the column with special character is shown as NULL.

       

      Steps to replicate:

      1. create test.sql file with the below content: 
      2.  CREATE TABLE T1 (test String);
        INSERT INTO T1 VALUES('£');
        
      1. beeline>!run test.sql
      2. create another file test_select.sql with the below content:
      3. SELECT * FROM T1 WHERE test='£';
      1. beeline>!run test_select.sql
      2. No results will be returned back

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sanjurm16 Sanjay Mishra
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: