Eason0729 commented on issue #12518: URL: https://github.com/apache/datafusion/issues/12518#issuecomment-2368595027
I spent some time on tracing code but found unable to fix it. Maybe we need to change some code in `sqlparser`, correct me if I am wrong. <details open> <summary>Detail</summary> To be specific, I run following with debugger attached <pre> let df = ctx.sql("SELECT 1 as col0").await?; let expr = df.parse_sql_expr("1 + 3 * col0 as new_col0")?; </pre> And found [this line](https://github.com/apache/datafusion/blob/1e31093fc96d70f27d79935f616af31f1994b2e1/datafusion/sql/src/parser.rs#L388), whose value return from `sqlparser` to be following. > It doesn't contain `new_col0`. <pre> BinaryOp { left: Value(Number("1", false)), op: Plus, right: BinaryOp { left: Value(Number("3", false)), op: Multiply, right: Identifier(Ident { value: "col0", quote_style: None }) } } </pre> </details> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org