LucidDB / luciddb

DEFUNCT: See README
https://github.com/LucidDB/luciddb
Apache License 2.0
53 stars 24 forks source link

[FRG-344] validator should prevent usage of UDX outside of FROM clause, and should also prevent usage of non-UDX inside of FROM clause #528

Open dynamobi-build opened 12 years ago

dynamobi-build commented 12 years ago

[reporter="jvs", created="Fri, 5 Sep 2008 11:40:28 -0500 (GMT-05:00)"] See examples in comments.

dynamobi-build commented 12 years ago

[author="jvs", created="Fri, 5 Sep 2008 11:40:43 -0500 (GMT-05:00)"] 0: jdbc:luciddb:> select applib.split_string_to_rows('yah','a','b',true) from (values(0));
Error: org.codehaus.janino.CompileException: File net/sf/farrago/dynamic/stmt1/ExecutableStmt.java, Line 161, Column 263: Class "net.sf.farrago.dynamic.stmt1.ExecutableStmt$2" has no method named "getResultInserter" (state=,code=0)
net.sf.farrago.jdbc.FarragoJdbcUtil$FarragoSqlException: org.codehaus.janino.CompileException: File net/sf/farrago/dynamic/stmt1/ExecutableStmt.java, Line 161, Column 263: Class "net.sf.farrago.dynamic.stmt1.ExecutableStmt$2" has no method named "getResultInserter"
        at org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:7155)
        at org.codehaus.janino.UnitCompiler.findIMethod(UnitCompiler.java:5206)
        at org.codehaus.janino.UnitCompiler.findIMethod(UnitCompiler.java:5153)
        at org.codehaus.janino.UnitCompiler.getType2(UnitCompiler.java:3915)
        at org.codehaus.janino.UnitCompiler.access$9700(UnitCompiler.java:47)
        at org.codehaus.janino.UnitCompiler$13.visitMethodInvocation(UnitCompiler.java:3586)
        at org.codehaus.janino.Java$MethodInvocation.accept(Java.java:2501)
        at org.codehaus.janino.UnitCompiler.getType(UnitCompiler.java:3605)
        at org.codehaus.janino.UnitCompiler.findMostSpecificIInvocable(UnitCompiler.java:5296)
        at org.codehaus.janino.UnitCompiler.findIMethod(UnitCompiler.java:5198)
        at org.codehaus.janino.UnitCompiler.findIMethod(UnitCompiler.java:5153)
        at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java:2649)
        at org.codehaus.janino.UnitCompiler.access$4600(UnitCompiler.java:47)
        at org.codehaus.janino.UnitCompiler$7.visitMethodInvocation(UnitCompiler.java:2109)
        at org.codehaus.janino.Java$MethodInvocation.accept(Java.java:2502)
        at org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java:2128)
        at org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:3068)
        at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:1643)
        at org.codehaus.janino.UnitCompiler.access$2100(UnitCompiler.java:47)
        at org.codehaus.janino.UnitCompiler$4.visitMethodInvocation(UnitCompiler.java:1618)
        at org.codehaus.janino.Java$MethodInvocation.accept(Java.java:2502)
        at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:1637)
        at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:936)
        at org.codehaus.janino.UnitCompiler.access$400(UnitCompiler.java:47)
        at org.codehaus.janino.UnitCompiler$2.visitExpressionStatement(UnitCompiler.java:491)
        at org.codehaus.janino.Java$ExpressionStatement.accept(Java.java:1278)
        at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:510)
        at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:529)
        at org.codehaus.janino.UnitCompiler.access$300(UnitCompiler.java:47)
        at org.codehaus.janino.UnitCompiler$2.visitBlock(UnitCompiler.java:490)
        at org.codehaus.janino.Java$Block.accept(Java.java:1233)
        at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:510)
        at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:1290)
        at org.codehaus.janino.UnitCompiler.access$800(UnitCompiler.java:47)
        at org.codehaus.janino.UnitCompiler$2.visitTryStatement(UnitCompiler.java:495)
        at org.codehaus.janino.Java$TryStatement.accept(Java.java:1390)
        at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:510)
        at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:529)
        at org.codehaus.janino.UnitCompiler.access$300(UnitCompiler.java:47)
        at org.codehaus.janino.UnitCompiler$2.visitBlock(UnitCompiler.java:490)
        at org.codehaus.janino.Java$Block.accept(Java.java:1233)
        at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:510)
        at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:1529)
        at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:222)
        at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:345)
        at org.codehaus.janino.UnitCompiler$1.visitAnonymousClassDeclaration(UnitCompiler.java:83)
        at org.codehaus.janino.Java$AnonymousClassDeclaration.accept(Java.java:480)
        at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:91)
        at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java:2945)
        at org.codehaus.janino.UnitCompiler.access$4900(UnitCompiler.java:47)
        at org.codehaus.janino.UnitCompiler$7.visitNewAnonymousClassInstance(UnitCompiler.java:2112)
        at org.codehaus.janino.Java$NewAnonymousClassInstance.accept(Java.java:2622)
        at org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java:2128)
        at org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:3068)
        at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:1196)
        at org.codehaus.janino.UnitCompiler.access$1300(UnitCompiler.java:47)
        at org.codehaus.janino.UnitCompiler$2.visitReturnStatement(UnitCompiler.java:500)
        at org.codehaus.janino.Java$ReturnStatement.accept(Java.java:1573)
        at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:510)
        at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:529)
        at org.codehaus.janino.UnitCompiler.access$300(UnitCompiler.java:47)
        at org.codehaus.janino.UnitCompiler$2.visitBlock(UnitCompiler.java:490)
        at org.codehaus.janino.Java$Block.accept(Java.java:1233)
        at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:510)
        at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:1529)
        at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:222)
        at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:112)
        at org.codehaus.janino.UnitCompiler$1.visitPackageMemberClassDeclaration(UnitCompiler.java:85)
        at org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java:676)
        at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:91)
        at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java:69)
        at org.codehaus.janino.JavaSourceClassLoader.generateBytecodes(JavaSourceClassLoader.java:329)
        at org.eigenbase.javac.JaninoCompiler$AccountingClassLoader.generateBytecodes(JaninoCompiler.java:203)
        at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:291)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at org.eigenbase.javac.JaninoCompiler.compileImpl(JaninoCompiler.java:112)
        at org.eigenbase.javac.JaninoCompiler.compile(JaninoCompiler.java:75)
        at org.eigenbase.oj.stmt.OJPreparingStmt.compileClass(OJPreparingStmt.java:833)
        at org.eigenbase.oj.stmt.OJPreparingStmt.compile(OJPreparingStmt.java:751)
        at org.eigenbase.oj.stmt.OJPreparingStmt.compile(OJPreparingStmt.java:735)
        at org.eigenbase.oj.stmt.OJPreparingStmt.compileAndBind(OJPreparingStmt.java:132)
        at net.sf.farrago.query.FarragoPreparingStmt.compileAndBind(FarragoPreparingStmt.java:502)
        at org.eigenbase.oj.stmt.OJPreparingStmt.implement(OJPreparingStmt.java:438)
        at org.eigenbase.oj.stmt.OJPreparingStmt.prepareSql(OJPreparingStmt.java:336)
        at net.sf.farrago.query.FarragoPreparingStmt.prepare(FarragoPreparingStmt.java:334)
        at net.sf.farrago.db.FarragoDatabase$2.initializeEntry(FarragoDatabase.java:920)
        at net.sf.farrago.util.FarragoObjectCache.tryPin(FarragoObjectCache.java:187)
        at net.sf.farrago.util.FarragoObjectCache.pin(FarragoObjectCache.java:146)
        at net.sf.farrago.db.FarragoDatabase.prepareStmtImpl(FarragoDatabase.java:949)
        at net.sf.farrago.db.FarragoDatabase.prepareStmt(FarragoDatabase.java:787)
        at net.sf.farrago.db.FarragoDbSession.prepareImpl(FarragoDbSession.java:1177)
        at net.sf.farrago.db.FarragoDbSession.prepare(FarragoDbSession.java:1102)
        at net.sf.farrago.db.FarragoDbStmtContext.prepare(FarragoDbStmtContext.java:129)
        at net.sf.farrago.jdbc.engine.FarragoJdbcEngineStatement.execute(FarragoJdbcEngineStatement.java:109)
        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 sqlline.SqlLine.main(Unknown Source)

dynamobi-build commented 12 years ago

[author="jvs", created="Fri, 5 Sep 2008 11:41:03 -0500 (GMT-05:00)"] 0: jdbc:luciddb:> select * from table(applib.rand(10,20));
Error: java.lang.AssertionError: null (state=,code=0)
net.sf.farrago.jdbc.FarragoJdbcUtil$FarragoSqlException: java.lang.AssertionError: null
        at org.eigenbase.reltype.RelDataTypeImpl.getFields(RelDataTypeImpl.java:122)
        at org.eigenbase.sql.validate.SqlValidatorImpl.expandSelectItem(SqlValidatorImpl.java:331)
        at org.eigenbase.sql.validate.SqlValidatorImpl.validateSelectList(SqlValidatorImpl.java:2832)
        at org.eigenbase.sql.validate.SqlValidatorImpl.validateSelect(SqlValidatorImpl.java:2623)
        at org.eigenbase.sql.validate.SelectNamespace.validateImpl(SelectNamespace.java:63)
        at org.eigenbase.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:86)
        at org.eigenbase.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:757)
        at org.eigenbase.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:745)
        at org.eigenbase.sql.SqlSelect.validate(SqlSelect.java:158)
        at org.eigenbase.sql.validate.SqlValidatorImpl.validateScopedExpression(SqlValidatorImpl.java:710)
        at org.eigenbase.sql.validate.SqlValidatorImpl.validate(SqlValidatorImpl.java:424)
        at net.sf.farrago.query.FarragoSqlValidator.validate(FarragoSqlValidator.java:100)
        at net.sf.farrago.db.FarragoDatabase.prepareStmtImpl(FarragoDatabase.java:867)
        at net.sf.farrago.db.FarragoDatabase.prepareStmt(FarragoDatabase.java:787)
        at net.sf.farrago.db.FarragoDbSession.prepareImpl(FarragoDbSession.java:1177)
        at net.sf.farrago.db.FarragoDbSession.prepare(FarragoDbSession.java:1102)
        at net.sf.farrago.db.FarragoDbStmtContext.prepare(FarragoDbStmtContext.java:129)
        at net.sf.farrago.jdbc.engine.FarragoJdbcEngineStatement.execute(FarragoJdbcEngineStatement.java:109)
        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 sqlline.SqlLine.main(Unknown Source)