The top node of a plan converts from drill convention to enumerable convention. When implemented, it is a piece of generated code that can be compiled by janino and executed to create an object that implements the Enumerable interface.
Put a break point in the constructor of OptiqResultSet. When it hits, look up the stack to executeQueryInternal. You'll see that inside the "OptiqPrepare.PrepareResult query" object there is an enumerable. This is the object created by janino. It gets wrapped in a Cursor, and that is the source for the columns in the ResultSet. There are different implementations of Cursor, depending on whether the Enumerable is returning Object, synthetic records, or just objects.
As we discussed in the meeting, if there are bugs in the generated code, run the unit test with -Doptiq.debug=true and it will print the generated code to stdout. You can then run that code with a "public static void main" method.
Hope that helps. I'm at Hadoop Summit today and tomorrow, so I won't be at the 9am pacific hangout. Drop me an email if you need more help.
On Jun 24, 2013, at 2:51 PM, Jason Altekruse <[EMAIL PROTECTED]> wrote:
> Hello Julian,
> I successfully modified the generated code and my EnumerableDrill implementation to accept the root DataContext object. I believe we might have discussed this at the meeting, but I do not know where the generated code is being called from. I assume this is where I will need to pass an alternative implementation of DataContext to include the Drill connection information.
> Thank for the help,
> Jason Altekruse