dynamobi/dynamobi — Issue #288: [LDB-33] Select on view which references udx generated table fails
Author: dynamobi-build
Created: 2011-12-30 02:26:58+00:00
State: open
Labels: LDB

[reporter="elin", created="Thu, 16 Feb 2006 17:16:15 -0500 (GMT-05:00)"]
0: jdbc:luciddb:> create schema applib;

0: jdbc:luciddb:> set schema 'applib';

0: jdbc:luciddb:> set path 'applib';

0: jdbc:luciddb:>

0: jdbc:luciddb:> call sqlj.install_jar('file:../../../../plugin/applib.jar','applibJar', 0);

+---------+

| EXPR$0 |

+---------+

| |

+---------+

0: jdbc:luciddb:>

0: jdbc:luciddb:> -- define functions

0: jdbc:luciddb:> create function applib.time_dimension(startYr int, startMth int, startDay int, endYr int, endMth int, endDay int)

. . . . . . . . > returns table(

. . . . . . . . > TIME_KEY_SEQ int,

. . . . . . . . > TIME_KEY date,

. . . . . . . . > DAY_OF_WEEK varchar(10),

. . . . . . . . > WEEKEND varchar(1),

. . . . . . . . > DAY_NUMBER_IN_WEEK int,

. . . . . . . . > DAY_NUMBER_IN_MONTH int,

. . . . . . . . > DAY_NUMBER_IN_YEAR int,

. . . . . . . . > DAY_NUMBER_OVERALL int,

. . . . . . . . > WEEK_NUMBER_IN_YEAR int,

. . . . . . . . > WEEK_NUMBER_OVERALL int,

. . . . . . . . > MONTH_NAME varchar(10),

. . . . . . . . > MONTH_NUMBER_IN_YEAR int,

. . . . . . . . > MONTH_NUMBER_OVERALL int,

. . . . . . . . > QUARTER int,

. . . . . . . . > YR int,

. . . . . . . . > CALENDAR_QUARTER varchar(6),

. . . . . . . . > FIRST_DAY_OF_WEEK date)

. . . . . . . . > language java

. . . . . . . . > parameter style system defined java

. . . . . . . . > no sql

. . . . . . . . > external name 'applib.applibJar:com.lucidera.luciddb.applib.TimeDimension.FunctionExecute';

0: jdbc:luciddb:>

0: jdbc:luciddb:> !verbose

0: jdbc:luciddb:> create view td1 as

. . . . . . . . > select *

. . . . . . . . > from table(applib.time_dimension(1997, 1, 1, 1997, 2, 1));

0: jdbc:luciddb:>

0: jdbc:luciddb:> select * from td1;

Error: org.eigenbase.sql.parser.SqlParseException: Encountered "SPECIFIC" at line 2, column 6.

Was expecting one of:

"LATERAL" ...

"TABLE" ...

"UNNEST" ...

"(" ...

...

... (state=,code=0)

net.sf.farrago.util.FarragoUtil$FarragoSqlException: org.eigenbase.sql.parser.SqlParseException: Encountered "SPECIFIC" at line 2, column 6.

Was expecting one of:

"LATERAL" ...

"TABLE" ...

"UNNEST" ...

"(" ...

...

...

at net.sf.farrago.parser.impl.FarragoParserImpl.convertException(FarragoParserImpl.java:5384)

at net.sf.farrago.parser.impl.FarragoParserImpl.normalizeException(FarragoParserImpl.java:57)

at net.sf.farrago.parser.FarragoAbstractParser.parseSqlText(FarragoAbstractParser.java:141)

at net.sf.farrago.query.FarragoPreparingStmt.expandView(FarragoPreparingStmt.java:662)

at net.sf.farrago.query.FarragoView.toRel(FarragoView.java:70)

at org.eigenbase.sql2rel.RelStructuredTypeFlattener.rewriteRel(RelStructuredTypeFlattener.java:634)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.eigenbase.util.ReflectUtil.invokeVisitor(ReflectUtil.java:249)

at org.eigenbase.sql2rel.RelStructuredTypeFlattener$RewriteRelVisitor.visit(RelStructuredTypeFlattener.java:651)

at org.eigenbase.rel.SingleRel.childrenAccept(SingleRel.java:86)

at org.eigenbase.rel.RelVisitor.visit(RelVisitor.java:56)

at org.eigenbase.sql2rel.RelStructuredTypeFlattener$RewriteRelVisitor.visit(RelStructuredTypeFlattener.java:647)

at org.eigenbase.sql2rel.RelStructuredTypeFlattener.rewrite(RelStructuredTypeFlattener.java:100)

at net.sf.farrago.query.FarragoPreparingStmt.flattenTypes(FarragoPreparingStmt.java:610)

at net.sf.farrago.query.FarragoPreparingStmt.optimize(FarragoPreparingStmt.java:584)

at org.eigenbase.oj.stmt.OJPreparingStmt.prepareSql(OJPreparingStmt.java:255)

at net.sf.farrago.query.FarragoPreparingStmt.prepare(FarragoPreparingStmt.java:238)

at net.sf.farrago.db.FarragoDatabase$2.initializeEntry(FarragoDatabase.java:640)

at net.sf.farrago.util.FarragoObjectCache.pin(FarragoObjectCache.java:157)

at net.sf.farrago.db.FarragoDatabase.prepareStmtImpl(FarragoDatabase.java:650)

at net.sf.farrago.db.FarragoDatabase.prepareStmt(FarragoDatabase.java:530)

at net.sf.farrago.db.FarragoDbSession.prepareImpl(FarragoDbSession.java:769)

at net.sf.farrago.db.FarragoDbSession.prepare(FarragoDbSession.java:720)

at net.sf.farrago.db.FarragoDbStmtContext.prepare(FarragoDbStmtContext.java:154)

at net.sf.farrago.jdbc.engine.FarragoJdbcEngineStatement.execute(FarragoJdbcEngineStatement.java:104)

at sqlline.SqlLine$Commands.execute(Unknown Source)

at sqlline.SqlLine$Commands.sql(Unknown Source)

at sqlline.SqlLine.dispatch(Unknown Source)

at sqlline.SqlLine.begin(Unknown Source)

at sqlline.SqlLine.mainWithInputRedirection(Unknown Source)

at com.lucidera.luciddb.test.bh.SqlTest.testSql(SqlTest.java:124)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.eigenbase.blackhawk.compose.AutoTest.runOne(AutoTest.java:947)

at org.eigenbase.blackhawk.compose.AutoTest.runOne(AutoTest.java:887)

at org.eigenbase.blackhawk.compose.AutoTest.runOneWrapper(AutoTest.java:899)

at org.eigenbase.blackhawk.compose.AutoTest.runNamedTests(AutoTest.java:829)

at org.eigenbase.blackhawk.compose.AutoTest.runAll(AutoTest.java:742)

at org.eigenbase.blackhawk.compose.AutoTest.run(AutoTest.java:681)

at org.eigenbase.blackhawk.compose.internal.context.AtomicTestContext.runNoTimeout(AtomicTestContext.java:199)

at org.eigenbase.blackhawk.compose.internal.context.AtomicTestContext.run(AtomicTestContext.java:128)

at org.eigenbase.blackhawk.extension.exectask.javatest.JavatestTestLogicTask.run(JavatestTestLogicTask.java:52)

at org.eigenbase.blackhawk.core.test.AbstractTestLogicTask.runtask(AbstractTestLogicTask.java:169)

at org.eigenbase.blackhawk.core.test.vehicle.LocalTestVehicle.runTask(LocalTestVehicle.java:64)

at org.eigenbase.blackhawk.core.test.vehicle.LocalTestVehicle.runTask(LocalTestVehicle.java:58)

at org.eigenbase.blackhawk.core.test.vehicle.LocalTestVehicle.run(LocalTestVehicle.java:39)

at org.eigenbase.blackhawk.core.ExecutionTaskHelper.runTestLogic(ExecutionTaskHelper.java:141)

at org.eigenbase.blackhawk.core.AbstractExecutionTask.runWithoutTimeout(AbstractExecutionTask.java:660)

at org.eigenbase.blackhawk.core.AbstractExecutionTask.run(AbstractExecutionTask.java:601)

at org.eigenbase.blackhawk.core.BaseTwoPassTask.callHooks(BaseTwoPassTask.java:85)

at org.eigenbase.blackhawk.core.BaseTwoPassTask.execute(BaseTwoPassTask.java:56)

at org.apache.tools.ant.Task.perform(Task.java:364)

at org.eigenbase.blackhawk.util.AntUtils.perform(AntUtils.java:33)

at org.eigenbase.blackhawk.core.BaseTaskContainer.preAlwaysDo(BaseTaskContainer.java:196)

at org.eigenbase.blackhawk.core.BaseTwoPassTask.callHooks(BaseTwoPassTask.java:83)

at org.eigenbase.blackhawk.core.BaseTwoPassTask.execute(BaseTwoPassTask.java:56)

at org.apache.tools.ant.Task.perform(Task.java:364)

at org.eigenbase.blackhawk.util.AntUtils.perform(AntUtils.java:33)

at org.eigenbase.blackhawk.core.BaseTaskContainer.preAlwaysDo(BaseTaskContainer.java:196)

at org.eigenbase.blackhawk.core.BaseTwoPassTask.callHooks(BaseTwoPassTask.java:83)

at org.eigenbase.blackhawk.core.BaseTwoPassTask.execute(BaseTwoPassTask.java:56)

at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)

at org.apache.tools.ant.Task.perform(Task.java:364)

at org.apache.tools.ant.Target.execute(Target.java:341)

at org.apache.tools.ant.Target.performTasks(Target.java:369)

at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)

at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37)

at org.apache.tools.ant.Project.executeTargets(Project.java:1068)

at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)

at org.eigenbase.blackhawk.core.TestSuiteCallTask.executeAntCall(TestSuiteCallTask.java:275)

at org.eigenbase.blackhawk.core.TestSuiteCallTask.alwaysDo(TestSuiteCallTask.java:210)

at org.eigenbase.blackhawk.core.BaseTwoPassTask.callHooks(BaseTwoPassTask.java:90)

at org.eigenbase.blackhawk.core.BaseTwoPassTask.execute(BaseTwoPassTask.java:56)

at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)

at org.apache.tools.ant.Task.perform(Task.java:364)

at org.apache.tools.ant.Target.execute(Target.java:341)

at org.apache.tools.ant.Target.performTasks(Target.java:369)

at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)

at org.apache.tools.ant.Project.executeTarget(Project.java:1185)

at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)

at org.apache.tools.ant.Project.executeTargets(Project.java:1068)

at org.apache.tools.ant.Main.runBuild(Main.java:668)

at org.apache.tools.ant.Main.startAnt(Main.java:187)

at org.apache.tools.ant.Main.start(Main.java:150)

at org.apache.tools.ant.Main.main(Main.java:240)

0: jdbc:luciddb:>