I've modeled my Calcite adapter after the Mongo adapter, and I'm wondering what the purpose is of representing the call to MongoMethod.MONGO_QUERYABLE_AGGREGATE.method as a linq4j expression here [1]? I'm having a hard time encoding the projection data I need to get into my Enumerator, particularly since I'm using Scala. It seems like this is a really hard roundabout way to essentially create a lambda. Or are there reasons besides delayed execution for using linq4j? Does some part of Calcite need to be able to walk the expression tree?
Thanks, Trevor [1] https://github.com/apache/incubator-calcite/blob/master/mongodb%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fcalcite%2Fadapter%2Fmongodb%2FMongoToEnumerableConverter.java#L100-L137
