Julian,

In FieldTrimmer::trimFields(setOp) there is

       newInput = CalcRel.projectMapping(newInput, remaining, null);

This returns CalcRel. While factorizing FieldTrimmer in OPTIQ-392, I left
this and didn't factorize it.

I am wondering if we need to handle this. This can potentially introduce a
CalcRel in Hive's version of Optiq plan. Harish suggested it may not be a
problem after all, because after coming out of HepPlanner, this would be
gone, so hive's ASTConverter will never encounter this. If thats true, than
nothing needs to be done and we are good. Else, following are the options:

a) Eliminate this CalcRel and have a ProjectRel there in FieldTrimmer.

b) Factorize this and introduce HiveCalcRel which Hive factory needs to
generate.

c) Keep HiveRelFieldTrimmer which overrides trimFields(setOp) and generates
HiveProjectRel there.

d) Any other options?


For me, it seems a) is preferable unless there is an inherent advantage of
having CalcRel there, else we have to do b) and need to introduce
HiveCalcRel, which I don't know if it serves any purpose other than
satisfying type system.

c) is also not very attractive since whole point of this exercise is to
throw away HiveRelFieldTrimmer and use Optiq's rule implementation.

Suggestions?


Thanks,

Ashutosh

Reply via email to