ilovesoup / hyracks

Automatically exported from code.google.com/p/hyracks
Apache License 2.0
0 stars 0 forks source link

A plan with a scan flagged as leaf in the metadata should not require (nor have) any other logical operator as input #117

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Checkout kereno/algebricks2hadoop or write an Algebricks plan with a 
write<-select<-data_scan<-ets
2.execute the query

What is the expected output? What do you see instead?
You will hit a NPE unless you set:

//Flags the data_scan operator as the leaf
public boolean scannerOperatorIsLeaf(IDataSource<S> dataSource) {
  return true;
}

and add Empty-Tuple-Source to Datascan as follow:
dataScan.getInputs().add(new MutableObject<ILogicalOperator>(new 
EmptyTupleSourceOperator()));

If you don't add ETS, then you will get an NPE!!

Original issue reported on code.google.com by ker...@gmail.com on 28 Jun 2013 at 9:00