calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hartman, Trevor" <thart...@ebay.com>
Subject RuntimeException: while resolving method 'project'
Date Thu, 30 Oct 2014 19:13:25 GMT
Hello,

I'm trying to write my first RelOptRule to handle projection for a custom Scala-based distributed
columnar database.

In my ColumnarTableScan#implement method:

    implementor.result(
      physType,
      Blocks.toBlock(
        Expressions.call(table.getExpression(classOf[ColumnarTable[S]]),
          "project",
          Expressions.constant(fields))))

Results in:

|| Caused by: java.lang.RuntimeException: while resolving method 'project' in class class
c.e.s.c.query.sql.ColumnarTable
|| at net.hydromatic.linq4j.expressions.Expressions.call(Expressions.java:408)
|| at net.hydromatic.linq4j.expressions.Expressions.call(Expressions.java:419)
|| at c.e.s.c.query.sql.ColumnarTableScan.implement(ColumnarTableScan.scala:49)
|| at net.hydromatic.optiq.rules.java.EnumerableRelImplementor.visitChild(EnumerableRelImplementor.java:59)
|| at net.hydromatic.optiq.rules.java.JavaRules$EnumerableCalcRel.implement(JavaRules.java:773)
|| at net.hydromatic.optiq.rules.java.EnumerableRelImplementor.visitChild(EnumerableRelImplementor.java:59)
|| at net.hydromatic.optiq.rules.java.JavaRules$EnumerableAggregateRel.implement(JavaRules.java:1004)
|| at net.hydromatic.optiq.rules.java.EnumerableRelImplementor.implementRoot(EnumerableRelImplementor.java:64)
|| at net.hydromatic.optiq.prepare.OptiqPrepareImpl$OptiqPreparingStmt.implement(OptiqPrepareImpl.java:759)
|| at net.hydromatic.optiq.prepare.Prepare.prepareSql(Prepare.java:265)
|| at net.hydromatic.optiq.prepare.Prepare.prepareSql(Prepare.java:164)
|| at net.hydromatic.optiq.prepare.OptiqPrepareImpl.prepare2_(OptiqPrepareImpl.java:377)
|| at net.hydromatic.optiq.prepare.OptiqPrepareImpl.prepare_(OptiqPrepareImpl.java:285)
|| at net.hydromatic.optiq.prepare.OptiqPrepareImpl.prepareSql(OptiqPrepareImpl.java:254)
|| at net.hydromatic.optiq.jdbc.OptiqConnectionImpl.parseQuery(OptiqConnectionImpl.java:150)
|| at net.hydromatic.optiq.jdbc.MetaImpl.prepare(MetaImpl.java:617)
|| at net.hydromatic.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:76)
|| ... 42 more
|| Caused by: java.lang.NoSuchMethodException: c.e.s.c.query.sql.ColumnarTable.project(scala.collection.immutable.$colon$colon)
|| at java.lang.Class.getMethod(Class.java:1665)
|| at net.hydromatic.linq4j.expressions.Expressions.call(Expressions.java:405)
|| ... 58 more

To be clear, I don't actually understand what's going on with the Linq4j expression above;
I'm slowly learning calcite by example via the csv and mongo adapters. But from what I understand,
"project" should be a public method on ColumnarTable which takes a Seq[String]. It's there,
so not sure what the problem is. Could it be that there's some scala/java interop issues with
dynamically creating a class (or whatever Linq4j is doing)? Is there a way to do this without
linq4j?

Thanks,
Trevor
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message