In general, one types ‘mvn install’ and maven populates the local repository with a snapshot. Another project using that version of that component will get the version from the local maven repo rather than the Apache repo.
But in this case, my development is on a version of Calcite that has changed significantly from the one the Drill team are using. I’ve re-named the packages from net.hydromatic.optiq to org.apache.calcite, renamed classes (e.g. AggregateRelBase is now Aggregate) and quite a lot else. You should wait for someone else in Drill to upgrade to that version before trying it. But you could take the fork of Optiq/Calcite that Drill is currently using, and add a ‘public List<BitSet> groupSets’ field to AggregateRelBase, and manually populate it to the groupSet and some of its subsets (e.g. [(0, 1, 2), (0, 1), ()]). The work you do on that branch should be portable to the newer Calcite after Drill upgrade. Someone on the Drill team should be able to tell you which repo holds their fork of Optiq/Calcite. Julian On Nov 10, 2014, at 8:52 PM, Michael Johnson <[email protected]> wrote: > Thanks! I'll take a look at building on your work. I'm not very familiar > with Maven; how can I set up the Drill build to use a custom version of > Calcite? > > Michael > > On Sun, Nov 9, 2014 at 11:15 AM, Julian Hyde <[email protected]> wrote: > >> FYI, I've started work on CALCITE-370 in branch >> https://github.com/julianhyde/incubator-calcite/tree/calcite-370. I've >> only done the parser changes so far; I haven't changed the relational >> algebra. >> >> My plan is to generalize the Aggregate class to have a list of grouping >> sets. If you use simple GROUP BY x, y you will get just one grouping set as >> if you had written GROUP BY GROUPING SETS (x, y). The output row type will >> include indicator columns, one for each distinct grouping expression (see >> the GROUPING function, >> https://docs.oracle.com/cd/B19306_01/server.102/b14223/aggreg.htm#i1007434 >> ). >> >> public class Aggregate extends SingleRel { >> public final BitSet groupKey; >> public final List<BitSet> groupSets; >> public final GroupingType groupingType; >> >> enum GroupingType { >> SINGLE, // one grouping set >> ROLLUP, // roll up leading edge: (x, y, z), (x, y), (x), () >> CUBE, // the full 2^n grouping sets >> OTHER // not one of the above >> } >> >> The row type for 'select k0, k1, sum(c) as a0, sum(d) as a1, sum(e) as a2 >> from t group k0, k1' would be (k0, g0, k1, g1, a0, a1, a2). Note the >> indicator columns g0, g1. g0 evaluates GROUPING(k0), saying whether this >> row is a roll up over all g0 values. >> >> Existing rules will have to be changed to only fire if groupingType == >> SINGLE, and skip over the indicator columns. >> >> Julian
