Dimchikkk opened a new issue, #1898:
URL: https://github.com/apache/datafusion-sqlparser-rs/issues/1898

   
   ```toml
   [package]
   name = "sqlparsertest"
   version = "0.1.0"
   edition = "2024"
   
   [dependencies]
   sqlparser055 = { package = "sqlparser", version = "0.55.0" }
   sqlparser056 = { package = "sqlparser", version = "0.56.0" }
   ```
   
   ```rs
   fn main() {
       let sql = "SELECT t1_id, t1_name FROM t1 WHERE t1_id in (SELECT t2_id 
FROM t2 where t1_name = t2_name limit 10)";
   
       {
           use sqlparser055 as sqlparser;
           match 
sqlparser::parser::Parser::parse_sql(&sqlparser::dialect::GenericDialect {}, 
sql) {
               Ok(ast) => println!("0.55 AST: {:?}", ast),
               Err(err) => eprintln!("0.55 Error: {}", err),
           }
       }
   
       {
           use sqlparser056 as sqlparser;
           match 
sqlparser::parser::Parser::parse_sql(&sqlparser::dialect::GenericDialect {}, 
sql) {
               Ok(ast) => println!("0.56 AST: {:?}", ast),
               Err(err) => eprintln!("0.56 Error: {}", err),
           }
       }
   }
   ```
   ```
   ~\dev\sqlparsertest> cargo run                                               
                                                                                
         06/20/2025 06:20:36 PM
       Blocking waiting for file lock on build directory
      Compiling sqlparsertest v0.1.0 (C:\Users\anakh\dev\sqlparsertest)
       Finished `dev` profile [optimized + debuginfo] target(s) in 2.88s
        Running `C:/Users/anakh/dev/.cargo-target\debug\sqlparsertest.exe`
   0.55 AST: [Query(Query { with: None, body: Select(Select { select_token: 
TokenWithSpan { token: Word(Word { value: "SELECT", quote_style: None, keyword: 
SELECT }), span: Span(Location(1,1)..Location(1,7)) }, distinct: None, top: 
None, top_before_distinct: false, projection: [UnnamedExpr(Identifier(Ident { 
value: "t1_id", quote_style: None, span: Span(Location(1,8)..Location(1,13)) 
})), UnnamedExpr(Identifier(Ident { value: "t1_name", quote_style: None, span: 
Span(Location(1,15)..Location(1,22)) }))], into: None, from: [TableWithJoins { 
relation: Table { name: ObjectName([Identifier(Ident { value: "t1", 
quote_style: None, span: Span(Location(1,28)..Location(1,30)) })]), alias: 
None, args: None, with_hints: [], version: None, with_ordinality: false, 
partitions: [], json_path: None, sample: None, index_hints: [] }, joins: [] }], 
lateral_views: [], prewhere: None, selection: Some(InSubquery { expr: 
Identifier(Ident { value: "t1_id", quote_style: None, span: 
Span(Location(1,37)..Locati
 on(1,42)) }), ....................................
   0.56 Error: sql parser error: Expected: ), found: limit at Line: 1, Column: 
92
   ```


-- 
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.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

Reply via email to