[jira] [Commented] (HIVE-15728) Empty table returns result when querying partitioned field with a function

2017-08-09 Thread Jared Leable (JIRA)

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

Jared Leable commented on HIVE-15728:
-

What version did you test? It is still an issue in Hive version 1.1.0

> Empty table returns result when querying partitioned field with a function
> --
>
> Key: HIVE-15728
> URL: https://issues.apache.org/jira/browse/HIVE-15728
> Project: Hive
>  Issue Type: Bug
>  Components: Hive
>Affects Versions: 1.1.0
>Reporter: Jared Leable
>Assignee: Fei Hui
>
> If a partitioned table contained data and is then truncated a query will 
> still return a result when using a function on a partitioned field.
> create table test1 (
>   field string
> )
> partitioned by(dt string);
> set hive.exec.dynamic.partition.mode=nonstrict;
> insert into test1 
> partition(dt)
> select 'a','2017-01-01';
> -- to view inserted records
> select * from test1;
> -- to delete all records from the table
> truncate table test1;
> -- to view 0 records in the table
> select * from test1;
> -- still returns a result of '2017-01-01'
> select max(dt) from test1;



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (HIVE-15728) Empty table returns result when querying partitioned field with a function

2017-01-26 Thread Jared Leable (JIRA)

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

Jared Leable updated HIVE-15728:

Description: 
If a partitioned table contained data and is then truncated a query will still 
return a result when using a function on a partitioned field.

create table test1 (
field string
)
partitioned by(dt string);

set hive.exec.dynamic.partition.mode=nonstrict;
insert into test1 
partition(dt)
select 'a','2017-01-01';

-- to view inserted records
select * from test1;

-- to delete all records from the table
truncate table test1;

-- to view 0 records in the table
select * from test1;

-- still returns a result of '2017-01-01'
select max(dt) from test1;

  was:
If a partitioned table contained data and is then truncated a query will still 
return a result when using a function on a partitioned field.

create table test1 (
field string
)
partitioned by(dt string);

set hive.exec.dynamic.partition.mode=nonstrict;
insert into test1 
partition(dt)
select 'a','2017-01-01';

-- to view inserted records
select * from test1;

-- to delete all records from the table
truncate table test1;

-- to view 0 records in the table
select * from test1;

-- still returns a result for the partitioned field
select max(dt) from test1;


> Empty table returns result when querying partitioned field with a function
> --
>
> Key: HIVE-15728
> URL: https://issues.apache.org/jira/browse/HIVE-15728
> Project: Hive
>  Issue Type: Bug
>  Components: Hive
>Affects Versions: 1.1.0
>Reporter: Jared Leable
>
> If a partitioned table contained data and is then truncated a query will 
> still return a result when using a function on a partitioned field.
> create table test1 (
>   field string
> )
> partitioned by(dt string);
> set hive.exec.dynamic.partition.mode=nonstrict;
> insert into test1 
> partition(dt)
> select 'a','2017-01-01';
> -- to view inserted records
> select * from test1;
> -- to delete all records from the table
> truncate table test1;
> -- to view 0 records in the table
> select * from test1;
> -- still returns a result of '2017-01-01'
> select max(dt) from test1;



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