hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xuefu Zhang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-5446) Hive can CREATE an external table but not SELECT from it when file path have spaces
Date Tue, 07 Jan 2014 02:46:50 GMT

    [ https://issues.apache.org/jira/browse/HIVE-5446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13863850#comment-13863850
] 

Xuefu Zhang commented on HIVE-5446:
-----------------------------------

The fix for HIVE-6048 was not to use URI.decode(). I think this problem is not about the way
that table location is stored, but about the way when table location is used when the table
is accessed. Storing the value of uri.toString() as the table metadata is fine. When the value
is used, the right way should be to deserialize the value back to a URI instance, make a Path
instance out of the URI instance using Path(URI uri), and then use the Path instance to access
the file. This is just my speculation as I didn't check the code, but I suppose it should
fix the problem (plus other encoding/decoding problems as we saw in other JIRAs).

> Hive can CREATE an external table but not SELECT from it when file path have spaces
> -----------------------------------------------------------------------------------
>
>                 Key: HIVE-5446
>                 URL: https://issues.apache.org/jira/browse/HIVE-5446
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Shuaishuai Nie
>            Assignee: Shuaishuai Nie
>         Attachments: HIVE-5446.1.patch, HIVE-5446.2.patch, HIVE-5446.3.patch
>
>
> Create external table table1 (age int, 
> gender string, totBil float, 
> dirBill float, alkphos int,
> sgpt int, sgot int, totProt float, 
> aLB float, aG float, sel int) 
> ROW FORMAT DELIMITED
> FIELDS TERMINATED BY ','
> STORED AS TEXTFILE
> LOCATION 'hdfs://namenodehost:9000/hive newtable';
> select * from table1;
> return nothing even there is file in the target folder



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message