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

   `fn main() -> ProfilerResult<()> {
       // tracing_subscriber::fmt()
       //     .with_max_level(tracing::Level::DEBUG)
       //     .init();
       use sqlparser::dialect::GenericDialect;
       use sqlparser::parser::Parser;
   
       let dialect = GenericDialect {}; // or AnsiDialect
   
       let sql = "SELECT a, b, 123, myfunc(b) \
              FROM table_1 FORCE INDEX (idx_name)\
              WHERE a > b AND b < 100 \
              ORDER BY a DESC, b";
   
       let ast = Parser::parse_sql(&dialect, sql).unwrap();
   
       println!("AST: {:?}", ast);
       Ok(())
   }`
   
   throws
   
   `DEBUG sqlparser::dialect: get_next_precedence_full() TokenWithSpan { token: 
Word(Word { value: "FROM", quote_style: None, keyword: FROM }), span: 
Span(Location(1,29)..Location(1,33)) }    
   2025-02-10T19:22:33.781308Z DEBUG sqlparser::parser: next precedence: 0    
   thread 'main' panicked at standalone/src/main.rs:19:48:
   called `Result::unwrap()` on an `Err` value: ParserError("Expected: end of 
statement, found: INDEX at Line: 1, Column: 48")
   stack backtrace:
      0: rust_begin_unwind
                at 
/rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/panicking.rs:665:5
      1: core::panicking::panic_fmt
                at 
/rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/core/src/panicking.rs:76:14
      2: core::result::unwrap_failed
                at 
/rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/core/src/result.rs:1699:5
      3: core::result::Result<T,E>::unwrap
                at 
/Users/jasonhansen/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/result.rs:1104:23
      4: standalone::main
                at ./src/main.rs:19:15
      5: core::ops::function::FnOnce::call_once
                at 
/Users/jasonhansen/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
   note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 
backtrace.` 
   
   


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