Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the 5_queryer error happened with the polars 0.26 AND sqlparser = 0.30 #16

Open
eruca opened this issue Jan 7, 2023 · 0 comments
Open

Comments

@eruca
Copy link

eruca commented Jan 7, 2023

升级了依赖后,出现了一些错误,能fix 一下吗?

error[E0308]: mismatched types
   --> queryer/src/convert.rs:95:39
    |
95  |                 Box::new(Expr::Column(Arc::new(id.to_string()))),
    |                          ------------ ^^^^^^^^^^^^^^^^^^^^^^^^ expected `str`, found struct `std::string::String`
    |                          |
    |                          arguments to this enum variant are incorrect
    |
    = note: expected struct `std::sync::Arc<str>`
               found struct `std::sync::Arc<std::string::String>`
note: tuple variant defined here
   --> /Users/nick/.cargo/registry/src/github.com-1ecc6299db9ec823/polars-plan-0.26.1/src/dsl/expr.rs:280:5
    |
280 |     Column(Arc<str>),
    |     ^^^^^^

error[E0308]: mismatched types
   --> queryer/src/convert.rs:96:17
    |
94  |             } => Ok(Expr::Alias(
    |                     ----------- arguments to this enum variant are incorrect
95  |                 Box::new(Expr::Column(Arc::new(id.to_string()))),
96  |                 Arc::new(alias.to_string()),
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `str`, found struct `std::string::String`
    |
    = note: expected struct `std::sync::Arc<str>`
               found struct `std::sync::Arc<std::string::String>`
note: tuple variant defined here
   --> /Users/nick/.cargo/registry/src/github.com-1ecc6299db9ec823/polars-plan-0.26.1/src/dsl/expr.rs:279:5
    |
279 |     Alias(Box<Expr>, Arc<str>),
    |     ^^^^^

error[E0599]: no variant or associated item named `Wildcard` found for enum `sqlparser::ast::Expr` in the current scope
   --> queryer/src/convert.rs:116:22
    |
116 |             SqlExpr::Wildcard => Ok(Self::Wildcard),
    |                      ^^^^^^^^ variant or associated item not found in `sqlparser::ast::Expr`

error[E0599]: no variant or associated item named `IsNull` found for enum `polars::prelude::Expr` in the current scope
   --> queryer/src/convert.rs:117:47
    |
117 |             SqlExpr::IsNull(expr) => Ok(Self::IsNull(Box::new(Expression(expr).try_into()?))),
    |                                               ^^^^^^ variant or associated item not found in `polars::prelude::Expr`

error[E0599]: no variant or associated item named `IsNotNull` found for enum `polars::prelude::Expr` in the current scope
   --> queryer/src/convert.rs:118:50
    |
118 |             SqlExpr::IsNotNull(expr) => Ok(Self::IsNotNull(Box::new(Expression(expr).try_into()?))),
    |                                                  ^^^^^^^^^ variant or associated item not found in `polars::prelude::Expr`

error[E0308]: mismatched types
   --> queryer/src/convert.rs:119:56
    |
119 |             SqlExpr::Identifier(id) => Ok(Self::Column(Arc::new(id.value))),
    |                                           ------------ ^^^^^^^^^^^^^^^^^^ expected `str`, found struct `std::string::String`
    |                                           |
    |                                           arguments to this enum variant are incorrect
    |
    = note: expected struct `std::sync::Arc<str>`
               found struct `std::sync::Arc<std::string::String>`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant