This is how hive handles empty tables/empty partitions. A dummy file is created in the scratch dir and the map reduce job will reference that file. I believe map reduce will throw an error if there are no files to process, but hive still needs to do process the query (i.e.: select count(*) from empty_table needs to return 0).
Thanks, Gunther. On Mon, Feb 10, 2014 at 2:58 AM, Sreenath <sreenaths1...@gmail.com> wrote: > hi all, > > i was going through the hive source code and felt one thing pretty weird. > in org.apache.hadoop.hive.ql.exec.Utilities.java in the function > getInputPaths() it checks whether a path returned by metastore is a valid > one or not or else it creates > an empty file. why is this empty file created? > -- > Sreenath S Kamath > Bangalore > Ph No:+91-9590989106 > -- CONFIDENTIALITY NOTICE NOTICE: This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential, privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any printing, copying, dissemination, distribution, disclosure or forwarding of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. Thank You.