hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zheng Shao (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HIVE-274) User cannot specify schema of the script output, only the column names can be specified
Date Fri, 10 Apr 2009 07:49:12 GMT

     [ https://issues.apache.org/jira/browse/HIVE-274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Zheng Shao updated HIVE-274:
----------------------------

    Description: 
Consider the test: mapreduce1.q:

FROM src
INSERT OVERWRITE TABLE dest1
MAP src.key, CAST(src.key / 10 AS INT), CAST(src.key % 10 AS INT), src.value
USING '/bin/cat' AS (tkey, ten, one, tvalue)
DISTRIBUTE BY tvalue, tkey
SORT BY ten, one;


Although, in the MAP input, the user is casting the inputs as INT (ten, one), the reduce output
('/bin/cat') still treats them as string, and the sorting happens assuming them as strings
- even if the
user wanted to have integer sorting, the output has lexicographic sorting (look at the output
mapreduce1.q.out).


In the AS, the user should be able to specify the schema in the same way as CREATE TABLE.




  was:

Consider the test: mapreduce1.q:

FROM src
INSERT OVERWRITE TABLE dest1
MAP src.key, CAST(src.key / 10 AS INT), CAST(src.key % 10 AS INT), src.value
USING '/bin/cat' AS (tkey, ten, one, tvalue)
DISTRIBUTE BY tvalue, tkey
SORT BY ten, one;


Although, in the MAP input, the user is casting the inputs as INT (ten, one), the reduce output
('/bin/cat') still treats them as string, and the sorting happens assuming them as strings
- even if the
user wanted to have integer sorting, the output has lexicographic sorting (look at the output
mapreduce1.q.out).


In the AS, the user should be able to specify the schema in the same way as CREATE TABLE.




        Summary: User cannot specify schema of the script output, only the column names can
be specified  (was: User cannot specify schema of the reduce output, only the column names
can be specified)

> User cannot specify schema of the script output, only the column names can be specified
> ---------------------------------------------------------------------------------------
>
>                 Key: HIVE-274
>                 URL: https://issues.apache.org/jira/browse/HIVE-274
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>            Reporter: Namit Jain
>
> Consider the test: mapreduce1.q:
> FROM src
> INSERT OVERWRITE TABLE dest1
> MAP src.key, CAST(src.key / 10 AS INT), CAST(src.key % 10 AS INT), src.value
> USING '/bin/cat' AS (tkey, ten, one, tvalue)
> DISTRIBUTE BY tvalue, tkey
> SORT BY ten, one;
> Although, in the MAP input, the user is casting the inputs as INT (ten, one), the reduce
output ('/bin/cat') still treats them as string, and the sorting happens assuming them as
strings - even if the
> user wanted to have integer sorting, the output has lexicographic sorting (look at the
output mapreduce1.q.out).
> In the AS, the user should be able to specify the schema in the same way as CREATE TABLE.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message