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
{{ message }}
Repository navigation
Make it easier to create ScalarValue from String and &str #8380
currently when I'm trying to pass a String into ScalarValue::from(), the compiler is telling me that the trait bound ScalarValue: Fromstd::string::String is not satisfied
Let's make it easier for people to get started with DataFusioN!
Describe the solution you'd like
Make it so the following code works
let scalar = ScalarValue::from("foo");let scalar = ScalarValue::from("foo".to_string());
Describe alternatives you've considered
No response
Additional context
I think this is a good first issue as it is well specified and would be a nice usability improvement
Related PR: #8378 (it would be nice to add an example of creating ScalarValue from a string there too)
I met some question in scalar.rs. when adding a test case for it, it can't compiled in vscode. It seems to have something to do with parquet.
error[E0433]: failed to resolve: use of undeclared crate or module `parquet`
--> datafusion/common/src/file_options/mod.rs:302:9
|
302 | use parquet::{
| ^^^^^^^ use of undeclared crate or module `parquet`
error[E0432]: unresolved import `super::parquet_writer`
--> datafusion/common/src/file_options/mod.rs:316:17
|
316 | use super::{parquet_writer::ParquetWriterOptions, StatementOptions};
| ^^^^^^^^^^^^^^ could not find `parquet_writer` in `super`
error[E0599]: no variant or associated item named `PARQUET` found for enum `file_type::FileType` in the current scope
--> datafusion/common/src/file_options/file_type.rs:120:35
|
45 | pub enum FileType {
| ----------------- variant or associated item `PARQUET` not found for this enum
...
120 | ("parquet", FileType::PARQUET),
| ^^^^^^^ variant or associated item not found in `FileType`
error[E0599]: no variant or associated item named `PARQUET` found for enum `file_type::FileType` in the current scope
--> datafusion/common/src/file_options/file_type.rs:121:35
|
45 | pub enum FileType {
| ----------------- variant or associated item `PARQUET` not found for this enum
...
121 | ("PARQUET", FileType::PARQUET),
| ^^^^^^^ variant or associated item not found in `FileType`
error[E0425]: cannot find function `parquet_test_data` in this scope
--> datafusion/common/src/test_util.rs:292:19
|
161 | pub fn arrow_test_data() -> String {
| ---------------------------------- similarly named function `arrow_test_data` defined here
...
292 | let res = parquet_test_data();
| ^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `arrow_test_data`
Some errors have detailed explanations: E0425, E0432, E0433, E0599.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `datafusion-common` (lib test) due to 5 previous errors
Activity
QuenKar commentedon Dec 1, 2023
Hi, I want to do this issue
QuenKar commentedon Dec 1, 2023
I met some question in
scalar.rs. when adding a test case for it, it can't compiled in vscode. It seems to have something to do with parquet.alamb commentedon Dec 1, 2023
THanks @QuenKar -- I think this is #8250 (also noticed by @jayzhan211 )
Here is the workaround: #8250 (comment)
It would be great for someone to fix this