use of org.apache.hadoop.hive.ql.plan.mapper.PlanMapper in project hive by apache.
the class TestStatEstimations method testFilterStringNotIn.
// FIXME: right now not in is transformed into AND( NE(...) , NE(...) )
@Ignore
@Test
public void testFilterStringNotIn() throws CommandProcessorException {
IDriver driver = createDriver();
String query = "explain select a from t2 where b NOT IN ('XXX', 'UUU') order by a";
PlanMapper pm = getMapperForQuery(driver, query);
List<FilterOperator> fos = pm.getAll(FilterOperator.class);
// the same operator is present 2 times
fos.sort(TestCounterMapping.OPERATOR_ID_COMPARATOR.reversed());
assertEquals(1, fos.size());
FilterOperator fop = fos.get(0);
// any estimation near 10 is ok...currently 10
assertEquals(10, fop.getStatistics().getNumRows());
}
Aggregations