drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edmon Begoli <ebeg...@gmail.com>
Subject A quick question on the intent for some of the methods in AbstractRecordReader
Date Mon, 07 Sep 2015 03:41:38 GMT
In AbstractRecordReader:

What is the intent of the following methods (my comments or questions
follow #.
I will try to add the answers as javadoc)

# is this a collection of columns specified in the query projection (select

  protected final void setColumns(Collection<SchemaPath> projected) {
    assert Preconditions.checkNotNull(projected, COL_NULL_ERROR).size() > 0
    if (projected instanceof ColumnList) {
      final ColumnList columns = ColumnList.class.cast(projected);
      isSkipQuery = columns.getMode() == ColumnList.Mode.SKIP_ALL;
    isStarQuery = isStarQuery(projected);
    columns = transformColumns(projected);

  # is this returning all columns in the storage or what specified in the
  protected Collection<SchemaPath> getColumns() {

 # what is the intention of this?
  protected Collection<SchemaPath> transformColumns(Collection<SchemaPath>
projected) {

 # where is this actually determined?
  protected boolean isStarQuery() {
    return isStarQuery;

# where is this set? Is it only set inside the setColumns(...) ?
   * Returns true if reader should skip all of the columns, reporting
number of records only. Handling of a skip query
   * is storage plugin-specific.
  protected boolean isSkipQuery() {
    return isSkipQuery;

  # what exactly is a schema path and how it looks like in a query? How it
related to star query?
  public static boolean isStarQuery(Collection<SchemaPath> projected) {
    return Iterables.tryFind(Preconditions.checkNotNull(projected,
COL_NULL_ERROR), new Predicate<SchemaPath>() {

      public boolean apply(SchemaPath path) {
        return Preconditions.checkNotNull(path).equals(STAR_COLUMN);

  # what is the allocation? what drives it? are there any limits or options
for "lazy" allocation?
  public void allocate(Map<Key, ValueVector> vectorMap) throws
OutOfMemoryException {

Thank you,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message