ext-data-source/test/src/main/java/com/cloudera/impala/extdatasource/AllTypesDataSource.java
/**
   * Accepts every other conjunct and returns the constant number of rows that
   * is always returned.
   */
Accepts every other conjunct and returns the constant number of rows that
is always returned.
Accepts every other conjunct and returns the constant number of rows that is always returned .
@Override
  public TPrepareResult prepare(TPrepareParams params) {
    Preconditions.checkState(state_ == DataSourceState.CREATED);
    List<Integer> accepted = Lists.newArrayList();
    for (int i = 0; i < params.getPredicatesSize(); ++i) {
      if (i % 2 == 0) accepted.add(i);
    }
    return new TPrepareResult(STATUS_OK)
      .setAccepted_conjuncts(accepted)
      .setNum_rows_estimate(NUM_ROWS_RETURNED);
  }
@ Override public TPrepareResult prepare ( TPrepareParams params ) { Preconditions . checkState ( state_ == DataSourceState . CREATED ) ; List < Integer > accepted = Lists . newArrayList ( ) ; for ( int i = 0 ; i < params . getPredicatesSize ( ) ; ++ i ) { if ( i % 2 == 0 ) accepted . add ( i ) ; } return new TPrepareResult ( STATUS_OK ) . setAccepted_conjuncts ( accepted ) . setNum_rows_estimate ( NUM_ROWS_RETURNED ) ; }
Accepts every other conjunct and returns the constant number of rows that
 is always returned.
Accepts every other conjunct and returns the constant number of rows that is always returned .