Details
-
Bug
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
2.1.0
-
None
-
None
Description
STEP 1. Create file with data:
echo 1 > /tmp/data.file
STEP 2. Create table in hive:
CREATE TABLE `issue` (`id` INT) PARTITIONED BY (`ts` TIMESTAMP);
STEP 3. Insert data into table:
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');
STEP 4. Load data into table using hive:
LOAD DATA LOCAL INPATH '/tmp/data.file' OVERWRITE INTO TABLE `issue` PARTITION (`ts`='2000-01-01 00:00:00');
STEP 5. Run show partitions query:
SHOW PARTITIONS `issue`;
EXPECTED RESULT:
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
ACTUAL RESULT
We've gotten partitions with different precision
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