Closed pkommoju closed 3 years ago
This is what I get:
''' select a.a1 from b; ERROR[Optimizer]: can't bind column 'a1' to table Unhandled exception. qpmodel.logic.SemanticAnalyzeException: can't bind column 'a1' to table at qpmodel.expr.ColExpr.Bind(BindContext context) in D:\qpmodel\qpmodel\Expr.cs:line 987 at qpmodel.expr.Expr.BindAndNormalize(BindContext context) in D:\qpmodel\qpmodel\Expr.cs:line 762 at qpmodel.logic.SelectStmt.bindSelectionList(BindContext context) in D:\qpmodel\qpmodel\Plan.cs:line 665 at qpmodel.logic.SelectStmt.BindWithContext(BindContext context) in D:\qpmodel\qpmodel\Plan.cs:line 693 at qpmodel.logic.SelectStmt.Bind(BindContext parent) in D:\qpmodel\qpmodel\Plan.cs:line 602 at qpmodel.Program.Main(String[] args) in D:\qpmodel\qpmodel\Program.cs:line 293 '''
It looks right to me.
That's is what I expect but how did it return null?
That's is what I expect but how did it return null?
I think @9DemonFox may confused with this output vs. ExecSQL() API's return result, which returns null upon error.
I was in the middle of a debug session, which is why I couldn't verify it and instead opened an issue. I will close it as a "Not A Bug".
Not a bug. It returns error correctly.
select a.a1 from b; b doesn't have a1 and a is not an alias of b so this should raise error, but instead returns "null" as result.