everyone. here are the interactions with the hive:
hive> show partitions TABLENAME
pt=2012.07.28.08/is_complete=1
pt=2012.07.28.09/is_complete=1
pt=2012.07.28.10/is_complete=1
pt=2012.07.28.11/is_complete=1
hive> select * from TABLENAME where pt='2012.07.28.10/is_complete=1' limit 1;
OK
Time taken: 2.807 seconds
hive> select * from TABLENAME where pt='2012.07.28.10' limit 1;
OK
61806fd3-5535-42a1-9ca5-91676d0e783f 1.160.243.215.1343401203879.1 2012-07-28 23:36:37
Time taken: 3.8 seconds
hive>
My question is that why the first select can't get the data?
"is_complete" is a column just like "pt" so the correct query is:
select * from TABLENAME where pt='2012.07.28.10' and is_complete='1' limit 1;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With