hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Doubrovkine (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HIVE-16351) Hive confused by CR/LFs
Date Sat, 01 Apr 2017 15:40:41 GMT
Daniel Doubrovkine created HIVE-16351:
-----------------------------------------

             Summary: Hive confused by CR/LFs
                 Key: HIVE-16351
                 URL: https://issues.apache.org/jira/browse/HIVE-16351
             Project: Hive
          Issue Type: Bug
          Components: Hive, Serializers/Deserializers
    Affects Versions: 1.2.1
         Environment: Hadoop 2.7.3
            Reporter: Daniel Doubrovkine


>From https://github.com/rcongiu/Hive-JSON-Serde/issues/65

This happens with both JSON and MongoDB connector Serde, so I don't believe this is a Serde
bug.

Using http://www.congiu.net/hive-json-serde/1.3.6/cdh4/json-serde-1.3.6-jar-with-dependencies.jar
placed into /usr/local/Cellar/apache-hive-1.2.1/lib

A dummy test.json with a CR/LF

```
$ cat /tmp/test.json
{"text":"foo\nbar","number":123}

$ hadoop fs -mkdir /user/data

$ hive
hive> CREATE DATABASE test;

hive> CREATE EXTERNAL TABLE test ( text string )
    > ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'
    > LOCATION '/user/data';

hive> SELECT * FROM test;

foo
bar	123
NULL	NULL
```

You can see how that's totally wrong, there's only one row of data.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message