Skip to content

Commit

Permalink
DRILL-3268: queries with empty OVER() clause return empty result set
Browse files Browse the repository at this point in the history
  • Loading branch information
adeneche authored and StevenMPhillips committed Jun 18, 2015
1 parent 437706f commit a027f69
Show file tree
Hide file tree
Showing 43 changed files with 1,168 additions and 964 deletions.
Expand Up @@ -190,10 +190,14 @@ public IterOutcome innerNext() {
this.schema = incoming.getSchema(); this.schema = incoming.getSchema();
} }
case OK: case OK:
batches.add(new WindowDataBatch(incoming, context)); if (incoming.getRecordCount() > 0) {
batches.add(new WindowDataBatch(incoming, context));
} else {
logger.trace("incoming has 0 records, it won't be added to batches");
}
break; break;
default: default:
throw new UnsupportedOperationException("Unsupported upstrean state " + upstream); throw new UnsupportedOperationException("Unsupported upstream state " + upstream);
} }
} }


Expand Down Expand Up @@ -241,6 +245,10 @@ protected void buildSchema() throws SchemaChangeException {
} catch (IOException | ClassTransformationException e) { } catch (IOException | ClassTransformationException e) {
throw new SchemaChangeException("Exception when creating the schema", e); throw new SchemaChangeException("Exception when creating the schema", e);
} }

if (incoming.getRecordCount() > 0) {
batches.add(new WindowDataBatch(incoming, getContext()));
}
} }


private WindowFramer createFramer(VectorAccessible batch) throws SchemaChangeException, IOException, ClassTransformationException { private WindowFramer createFramer(VectorAccessible batch) throws SchemaChangeException, IOException, ClassTransformationException {
Expand Down

This file was deleted.

0 comments on commit a027f69

Please sign in to comment.