@Test(expected = IllegalStateException.class) public void emitAggObjectCountStatsNotInitialized() { accessor.emitAggObject(); }
@Override public OneRow emitAggObject() { if (!statsInitialized) { throw new IllegalStateException("retrieveStats() should be called before calling emitAggObject()"); } OneRow row = null; if (context.getAggType() == null) throw new UnsupportedOperationException("Aggregate operation is required"); if (context.getAggType() != EnumAggregationType.COUNT) throw new UnsupportedOperationException("Aggregation operation is not supported."); if (objectsEmitted < count) { objectsEmitted++; row = rowToEmitCount; } return row; }
HiveORCAccessor extends HiveAccessor implements StatsAccessor { @Override public OneRow emitAggObject() { if (!statsInitialized) { throw new IllegalStateException("retrieveStats() should be called before calling emitAggObject()"); } OneRow row = null; if (context.getAggType() == null) throw new UnsupportedOperationException("Aggregate operation is required"); if (context.getAggType() != EnumAggregationType.COUNT) throw new UnsupportedOperationException("Aggregation operation is not supported."); if (objectsEmitted < count) { objectsEmitted++; row = rowToEmitCount; } return row; } }
HiveORCAccessor extends HiveAccessor implements StatsAccessor { @Override public OneRow emitAggObject() { if (!statsInitialized) { throw new IllegalStateException("retrieveStats() should be called before calling emitAggObject()"); } OneRow row = null; if (context.getAggType() == null) throw new UnsupportedOperationException("Aggregate operation is required"); if (context.getAggType() != EnumAggregationType.COUNT) throw new UnsupportedOperationException("Aggregation operation is not supported."); if (objectsEmitted < count) { objectsEmitted++; row = rowToEmitCount; } return row; } HiveORCAccessor(); }
HiveORCAccessor extends HiveAccessor implements StatsAccessor { @Override public OneRow emitAggObject() { if (!statsInitialized) { throw new IllegalStateException("retrieveStats() should be called before calling emitAggObject()"); } OneRow row = null; if (context.getAggType() == null) throw new UnsupportedOperationException("Aggregate operation is required"); if (context.getAggType() != EnumAggregationType.COUNT) throw new UnsupportedOperationException("Aggregation operation is not supported."); if (objectsEmitted < count) { objectsEmitted++; row = rowToEmitCount; } return row; } HiveORCAccessor(); @Override void initialize(RequestContext requestContext); @Override boolean openForRead(); @Override void retrieveStats(); @Override OneRow emitAggObject(); }
HiveORCAccessor extends HiveAccessor implements StatsAccessor { @Override public OneRow emitAggObject() { if (!statsInitialized) { throw new IllegalStateException("retrieveStats() should be called before calling emitAggObject()"); } OneRow row = null; if (context.getAggType() == null) throw new UnsupportedOperationException("Aggregate operation is required"); if (context.getAggType() != EnumAggregationType.COUNT) throw new UnsupportedOperationException("Aggregation operation is not supported."); if (objectsEmitted < count) { objectsEmitted++; row = rowToEmitCount; } return row; } HiveORCAccessor(); @Override void initialize(RequestContext requestContext); @Override boolean openForRead(); @Override void retrieveStats(); @Override OneRow emitAggObject();  }