Skip to content

panic when deal with @ operator #3137

@syheliel

Description

@syheliel

Describe the bug

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions