You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Oleksiy Sayankin (JIRA)" <ji...@apache.org> on 2016/08/17 06:26:20 UTC

[jira] [Issue Comment Deleted] (HIVE-14544) LOAD DATA statement appends .0 to the partition name

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

Oleksiy Sayankin updated HIVE-14544:
------------------------------------
    Comment: was deleted

(was: Suppose it's better to have a property with partition timestamp format in HiveConf.java (let's say {{hive.partition.timestamp.format}} with default value {{yyyy-MM-dd HH:mm:ss}}). If user wants to have nanos in his partition - he well change the value of property.)

> LOAD DATA statement appends .0 to the partition name
> ----------------------------------------------------
>
>                 Key: HIVE-14544
>                 URL: https://issues.apache.org/jira/browse/HIVE-14544
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>    Affects Versions: 2.1.0
>            Reporter: Oleksiy Sayankin
>            Assignee: Oleksiy Sayankin
>             Fix For: 2.1.0
>
>         Attachments: HIVE-14544.1.patch
>
>
> *STEP 1. Create file with data:*
> {noformat}
> echo 1 > /tmp/data.file
> {noformat}
> *STEP 2. Create table in hive:*
> {noformat}
> CREATE TABLE `issue` (`id` INT) PARTITIONED BY (`ts` TIMESTAMP);
> {noformat}
> *STEP 3. Insert data into table:*
> {noformat}
> SET hive.exec.dynamic.partition.mode=nonstrict;
> INSERT INTO TABLE `issue` PARTITION (`ts`) VALUES (1,'1970-01-01 00:00:00'),(2,'1980-01-01 00:00:00'),(3,'1990-01-01 00:00:00');
> {noformat}
> *STEP 4. Load data into table using hive:*
> {noformat}
> LOAD DATA LOCAL INPATH '/tmp/data.file' OVERWRITE INTO TABLE `issue` PARTITION (`ts`='2000-01-01 00:00:00');
> {noformat}
> *STEP 5. Run show partitions query:*
> {noformat}
> SHOW PARTITIONS `issue`;
> {noformat}
> *EXPECTED RESULT:*
> {noformat}
> ts=1970-01-01 00%3A00%3A00
> ts=1980-01-01 00%3A00%3A00
> ts=1990-01-01 00%3A00%3A00
> ts=2000-01-01 00%3A00%3A00
> {noformat}
> *ACTUAL RESULT*
> We've gotten partitions with different precision
> {noformat}
> ts=1970-01-01 00%3A00%3A00
> ts=1980-01-01 00%3A00%3A00
> ts=1990-01-01 00%3A00%3A00
> ts=2000-01-01 00%3A00%3A00.0
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)