You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thread 'main' panicked at 'byte index 2 is out of bounds of `@`', library/core/src/str/mod.rs:107:9
To Reproduce
main.rs
use async_std;
use datafusion;
use datafusion::prelude::*;
fn main() {
let data = "SElECT @= X#=?!~ 5";
let a = async {
let ctx = SessionContext::new();
let df = ctx.sql(data).await;
};
async_std::task::block_on(a);
}
Cargo.toml
[package]
name = "crash-example"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
datafusion = "10"
async-std = "1"
Expected behavior
return an Error instead of panic.
The text was updated successfully, but these errors were encountered:
In src/execution/context.rs:1444-1448, the program doesn't check the length of variable_names[0](in my cause the value is "@") and lead to fetching invalid address for variable_names[0][0..2].
let provider_type = if &variable_names[0][0..2] == "@@" {
VarType::System
} else {
VarType::UserDefined
};
alamb
changed the title
panic when deal with @
panic when deal with @ operator
Aug 15, 2022
Describe the bug
To Reproduce
main.rs
Cargo.toml
Expected behavior
return an Error instead of panic.
The text was updated successfully, but these errors were encountered: