Package org.apache.drill.exec.rpc.user

Examples of org.apache.drill.exec.rpc.user.QueryResultBatch.release()


            System.out.print(accessor.getObject(r));
          }
          if (!first) System.out.println();
        }
        batchLoader.clear();
        batch.release();
      }

      assertEquals(2, recordCount);
    }
  }
View Full Code Here


    assertTrue(batchLoader.load(batch.getHeader().getDef(), batch.getData()));
    assertEquals(3, batchLoader.getSchema().getFieldCount());
    testExistentColumns(batchLoader, batch);

    batch.release();
    batchLoader.clear();
  }

  @Test
  public void testNullWhereListExpected() throws Exception {
View Full Code Here

    assertNull(vw.getValueVector().getAccessor().getObject(0));
    assertNull(vw.getValueVector().getAccessor().getObject(1));
    assertNull(vw.getValueVector().getAccessor().getObject(2));

    vw.getValueVector().clear();
    batch.release();
    batchLoader.clear();
  }

  private void testExistentColumns(RecordBatchLoader batchLoader, QueryResultBatch batch) throws SchemaChangeException {
View Full Code Here

        QueryResultBatch batch = results.get(i);
        if (i == 1) {
          assertTrue(batch.hasData());
        } else {
          assertFalse(batch.hasData());
          batch.release();
          continue;
        }

        assertTrue(batchLoader.load(batch.getHeader().getDef(), batch.getData()));
        boolean firstColumn = true;
View Full Code Here

          if (!first) {
            System.out.println();
          }
        }
        batchLoader.clear();
        batch.release();
      }

      assertEquals(2, recordCount);
    }
  }
View Full Code Here

          }
          combinedVectors.get(field).add(obj);
        }
      }
      records.remove(0);
      batch.release();
      loader.clear();
    }
    return combinedVectors;
  }
View Full Code Here

          record.put(w.getField().toExpr(), obj);
        }
        materializedRecords.add(record);
      }
      records.remove(0);
      batch.release();
      loader.clear();
    }
  }

  public void compareValues(Object expected, Object actual, int counter, String column) throws Exception {
View Full Code Here

            batchLoader.getValueVectorId(new SchemaPath(new PathSegment.NameSegment("sum"))).getFieldIds()[0]
        );
        assertEquals(sumArr[r], wrapper.getValueVector().getAccessor().getObject(r));
      }
      batchLoader.clear();
      batch.release();

      assertEquals(4, recordCount);
    }
  }
View Full Code Here

        assertEquals("Count, Row " + r, groupCounter, cnt.getObject(r - 1));
        assertEquals("Sum, Row " + r, s, sum.getObject(r - 1));
        assertEquals("Output, Row " + r, s, output.getObject(r - 1));
      }
      batchLoader.clear();
      batch.release();

      assertEquals(1000, recordCount);
    }
  }
View Full Code Here

            batchLoader.getValueVectorId(new SchemaPath(new PathSegment.NameSegment("sum"))).getFieldIds()[0]
        );
        assertEquals(sumArr[r], wrapper.getValueVector().getAccessor().getObject(r));
      }
      batchLoader.clear();
      batch.release();

      assertEquals(8, recordCount);
    }
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.