Open guspower opened 2 days ago
Hello! Thank you for reporting the issue. I think this is a duplicate of https://github.com/lovasoa/SQLpage/issues/403. I have already submitted a patch for it upstream, and it was accepted, we are just waiting for a new release of sqlparser.
The new sqlparser with the fix is scheduled for release today: https://github.com/sqlparser-rs/sqlparser-rs/issues/1296
That's great news. And of course I should have picked up that while sqlparser
did parse the SQL statement without error, what it produced was wrong, i.e. I should have run and inspected
println!("{}", ast[0].to_string());
not just
println!("AST: {:?}", ast);
Introduction
A update using subselect query that succeeds when run directly against postgreSQL, and parses successfully using
sqlparser
, fails to run in SQLPage with errorerror returned from database: subquery must return only one column
.To Reproduce
Expectation: a 3 column table output with the first row as
1, 100, 10000
Actual behavior
You can see that the
SET won_customers.total_deposits
looks incorrect. A related example from the postgreSQL docs is:Screenshots
N/A
Expected behavior
The SQL should execute successfully
Version information
Additional context
I verified that sqlparser is ok with it by modifying the parse example on the README.md