As far as Calcite is concerned, a Druid query is a black box. A blob of JSON sent to a REST service from which comes data. Therefore it is a leaf node, like TableScan and Values.
It has 0 inputs before you copy it, and should still have 0 inputs after you copy it, hence the assert. > On Mar 15, 2018, at 4:25 AM, Muhammad Gelbana <[email protected]> wrote: > > I see that *DruidQuery* intentionally avoids having inputs by not > overriding *AbstractRelNode.getInputs()* and asserting that no inputs are > providing while copying itself: > > @Override >> public RelNode copy(RelTraitSet traitSet, List<RelNode> inputs) { >> *assert inputs.isEmpty();* >> return this; >> } >> > > Would someone please explain the purpose of doing this ? > > Thanks, > Gelbana
