spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "fengchaoge (JIRA)" <>
Subject [jira] [Created] (SPARK-21010) Spark-Sql Can't Handle char() type Well
Date Wed, 07 Jun 2017 13:31:18 GMT
fengchaoge created SPARK-21010:

             Summary: Spark-Sql Can't  Handle char() type Well
                 Key: SPARK-21010
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 2.1.1, 2.1.0, 1.6.1
         Environment: spark1.6.1 hadoop-2.6.0-cdh5.4.2
            Reporter: fengchaoge
             Fix For: 2.1.1

we create table in spark-sql like this :
1. create table cid_test (name string,id char(20)) ROW FORMAT DELIMITED FIELDS TERMINATED
BY ' ' stored as textfile;

2. LOAD DATA LOCAL INPATH '/home/hadoop/id.txt' OVERWRITE INTO TABLE  cid_test;

content for id.txt:
fengchaoge 413022199908088888

3. select * from cid_test where id='413022199908088888'; 

4. select * from cid_test where id='413022199908088888  ';

In third step,we got nothing ,but in four step we got the right ring. we must add two spaces
in id if we want  the right value.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message