/** * Specifies a SQL-like filter condition on the table's partition columns. * Filter conditions on non-partition columns are invalid. * A partition filter can significantly reduce the amount of data to be read. * * @param filter A SQL-like filter condition on the table's partition columns. * @return This InputFormat with specified partition filter. * @throws java.io.IOException */ public HCatInputFormatBase<T> withFilter(String filter) throws IOException { // set filter this.hCatInputFormat.setFilter(filter); return this; }
job.setOutputFormatClass(TextOutputFormat.class); HCatInputFormat.setInput(job, dbName, tableName).setFilter(filter);