Yeah,  I had much the same spinning.   Looks like optiq trunk moved forward
and we need to update sqlparser to incorporate latest ops
On Jul 21, 2013 7:18 PM, "Ted Dunning" <[email protected]> wrote:

> I am going to leave these out of the workshop.
>
>
> On Sun, Jul 21, 2013 at 6:13 PM, Jacques Nadeau <[email protected]>
> wrote:
>
> > I just realized that somehow we didn't merge all of the operators from
> > Julian's branch.   Join and union are missing. You might work with the
> tip
> > of his optiq branch until we get those merged.
> > On Jul 21, 2013 5:18 PM, "Jacques Nadeau" <[email protected]> wrote:
> >
> > > maybe try with a mvn clean install and let all tests run.
> > >
> > > I did a clean checkout and query worked.
> > >
> > > Also, we haven't added syntactic sugar yet so you need to do:
> > >
> > > >>select _MAP['type'] from donuts
> > >
> > > instead of
> > >
> > > >>select type from donuts
> > >
> > >
> > > Note that you can use subqueries to clean things up a bit.
> > >
> > > SELECT ppu, count(1) AS cnt FROM
> > >   (SELECT _MAP['ppu'] AS ppu, _MAP['type'] AS type FROM donuts)y
> > > GROUP BY ppu
> > > ORDER BY ppu DESC;
> > >
> > > If I recall, Julian has worked on adding views but I don't think we
> > > have that available in Drill yet.  (Julian will be able to confirm).
> > > I also thought we had added limit but I trying it reveals it isn't in
> > > yet.
> > >
> > > Jacques
> > >
> > >
> > > On Sun, Jul 21, 2013 at 2:32 PM, Ted Dunning <[email protected]>
> > > wrote:
> > > > I am prepping for a workshop and it appears that sql line is a bit
> > > broken.
> > > >
> > > > Steps that I did:
> > > >
> > > > installed protoc 2.5.0
> > > > git pull and checkout of pre_exec_merge
> > > >
> > > >
> > > > This seems all in order.
> > > >
> > > > Then I run sqlline and connect to the donuts table which seems to
> work
> > > well
> > > > (I added a -q in sqlline to minimize mvn squawking)
> > > >
> > > > $ cd incubator-drill/sandbox/prototype
> > > > $ mvn install -DskipTests
> > > > $ rm .classpath
> > > > $ ./sqlline
> > > > /Users/tdunning/.sqlline/sqlline.properties (No such file or
> directory)
> > > > sqlline version ??? by Marc Prud'hommeaux
> > > > sqlline> !connect
> > > > jdbc:optiq:model=common/target/test-classes/donuts-model.json admin
> > admin
> > > > Connecting to
> > > jdbc:optiq:model=common/target/test-classes/donuts-model.json
> > > >  ... lots of messages about logback being configured poorly ...
> > > >
> > > > Connected to: Optiq (version 0.4.2)
> > > > Driver: Optiq JDBC Driver (version 0.4.2)
> > > > Autocommit status: true
> > > > Transaction isolation: TRANSACTION_REPEATABLE_READ
> > > >
> > > >
> > > > Here is the exciting part.  I enter a simple query:
> > > >
> > > > 0: jdbc:optiq:model=common/target/test-classe> select * from donuts;
> > > >
> > > > What pops out is a reasonable logical plan:
> > > >
> > > >     {
> > > >         "head":{
> > > >         "type":"apache_drill_logical_plan",
> > > >         "version":"1",
> > > >         "generator":{"type":"manual","info":"na"}
> > > >         },
> > > >         "storage":[
> > > >              {"name":"donuts-json","type":"classpath"},
> > > >              {"name":"queue","type":"queue"}],
> > > >         "query":[
> > > >         {"op":"sequence","do":[
> > > >
> > > >
> > >
> >
> {"op":"scan","memo":"initial_scan","ref":"_MAP","storageengine":"donuts-json","selection":{"path":"/donuts.json","type":"JSON"}},
> > > >
> > > > {"op":"project","projections":[{"expr":"_MAP","ref":"output._MAP"}]},
> > > >             {"op":"store","storageengine":"queue","memo":"output
> > > > sink","target":{"number":0}}
> > > >         ]
> > > >         }
> > > >         ]
> > > >     }
> > > >
> > > > And then problems start:
> > > >
> > > > 14:24:55.515 [main] DEBUG o.a.drill.common.config.DrillConfig -
> Loading
> > > > configs at the following URLs
> > > >
> > >
> >
> [jar:file:/Users/tdunning/.m2/repository/org/apache/drill/exec/ref/1.0-SNAPSHOT/ref-1.0-SNAPSHOT.jar!/drill-module.conf,
> > > >
> > >
> >
> jar:file:/Users/tdunning/.m2/repository/org/apache/drill/common/1.0-SNAPSHOT/common-1.0-SNAPSHOT.jar!/drill-module.conf,
> > > >
> > >
> >
> file:/Users/tdunning/Apache/Drill/incubator-drill/sandbox/prototype/exec/ref/target/classes/drill-module.conf,
> > > >
> > >
> >
> file:/Users/tdunning/Apache/Drill/incubator-drill/sandbox/prototype/exec/java-exec/target/classes/drill-module.conf]
> > > > 14:24:55.527 [main] DEBUG o.a.d.c.l.data.LogicalOperatorBase - Adding
> > > > Logical Operator sub types: [class
> > > > org.apache.drill.common.logical.data.Join, class
> > > > org.apache.drill.common.logical.data.Project, class
> > > > org.apache.drill.common.logical.data.Limit, class
> > > > org.apache.drill.common.logical.data.Order, class
> > > > org.apache.drill.common.logical.data.Transform, class
> > > > org.apache.drill.common.logical.data.Filter, class
> > > > org.apache.drill.common.logical.data.Constant, class
> > > > org.apache.drill.common.logical.data.Flatten, class
> > > > org.apache.drill.common.logical.data.Sequence, class
> > > > org.apache.drill.common.logical.data.Store, class
> > > > org.apache.drill.common.logical.data.Union, class
> > > > org.apache.drill.common.logical.data.Segment, class
> > > > org.apache.drill.common.logical.data.RunningAggregate, class
> > > > org.apache.drill.common.logical.data.WindowFrame, class
> > > > org.apache.drill.common.logical.data.Scan, class
> > > > org.apache.drill.common.logical.data.CollapsingAggregate]
> > > > 14:24:55.529 [main] DEBUG o.a.d.c.l.StorageEngineConfigBase - Adding
> > > > Storage Engine Configs including [class
> > > > org.apache.drill.exec.ref.rse.ClasspathRSE$ClasspathRSEConfig, class
> > > > org.apache.drill.exec.ref.rse.FileSystemRSE$FileSystemRSEConfig,
> class
> > > > org.apache.drill.exec.ref.rse.ConsoleRSE$ConsoleRSEConfig, class
> > > > org.apache.drill.exec.ref.rse.QueueRSE$QueueRSEConfig]
> > > > 14:24:55.550 [main] DEBUG o.a.drill.common.logical.JSONOptions -
> > Creating
> > > > Deserializer.
> > > > 14:24:55.553 [main] DEBUG o.a.drill.common.logical.JSONOptions -
> > Creating
> > > > Deserializer.
> > > > java.lang.NoClassDefFoundError:
> > > > org/apache/drill/common/expression/NoArgValidator
> > > > at
> > > >
> > >
> >
> org.apache.drill.exec.expr.fn.impl.Alternator$Provider.getFunctionDefintions(Alternator.java:43)
> > > >  at
> > > >
> > >
> >
> org.apache.drill.common.expression.FunctionRegistry.<init>(FunctionRegistry.java:44)
> > > > at
> > > >
> > >
> >
> org.apache.drill.common.expression.LogicalExpression$De.deserialize(LogicalExpression.java:74)
> > > >  at
> > > >
> > >
> >
> org.apache.drill.common.expression.LogicalExpression$De.deserialize(LogicalExpression.java:54)
> > > > at
> > > >
> > >
> >
> com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:375)
> > > >  at
> > > >
> > >
> >
> com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:5
> > > >
> > > >
> > > > The query [select donuts._map from donuts] works identically ... good
> > > plan,
> > > > big stack trace.
> > > >
> > > > Anybody have suggestions here?  It looks like Jackson is unable to
> read
> > > and
> > > > parse the logical plan.
> > > >
> > > > In related issues, if I try [select type from donuts] or [select
> > > > donuts.type from donuts] I get this error and no logical plan:
> > > >
> > > > Jul 21, 2013 2:29:52 PM
> > org.eigenbase.sql.validate.SqlValidatorException
> > > > <init>
> > > >
> > > > SEVERE: org.eigenbase.sql.validate.SqlValidatorException: Column
> 'TYPE'
> > > not
> > > > found in table 'DONUTS'
> > >
> >
>

Reply via email to