问题描述
开发环境
- Microsoft Windows 10 家庭版 10.0.19042 内部版本 19042
- rustc 1.49.0 (e1884a8e3 2020-12-29)
- VScode 1.54.3
- CodeLLDB v1.6.1
// Cargo.toml
//[dependencies]
//datafusion = "3.0.0"
//arrow = "3.0.0"
//tokio = { version = "0.2",features = ["macros","blocking","rt-core","rt-threaded","sync"] }
use std::time::{Duration,Instant};
use arrow::util::pretty;
use datafusion::error::Result;
use datafusion::prelude::*;
/// This example demonstrates executing a simple query against an Arrow data source (CSV) and
/// fetching results
#[tokio::main]
async fn main() -> Result<()> {
println!("======== Start Program ========");
let start = Instant::Now();
// let res_path = r"/root/workspace/project/hello_arrow/res/sample_01.csv";
// http://insideairbnb.com/get-the-data.html
// listing_id,id,date,reviewer_id,reviewer_name,comments
// Boston,Massachusetts,United States
let res_path = r"D:\workspace\vscode\arrow_rust\res\review.01.csv";
// create local execution context
let mut ctx = ExecutionContext::new();
// register csv file with the execution context
ctx.register_csv("datatable_01",res_path,CsvReadOptions::new())?;
// execute the query
let sql = "SELECT count(id) from datatable_01";
let df = ctx.sql(sql)?;
let results = df.collect().await?;
// print the results
pretty::print_batches(&results)?;
let duration = start.elapsed();
println!("Time elapsed in expensive_function() is: {:?}",duration);
println!("======== End Program ========");
Ok(())
}
configuration: {
type: 'lldb',request: 'launch',name: 'Debug Window',program: '${workspaceRoot}/target/debug/arrow_rust.exe',args: [],cwd: '${workspaceRoot}',sourceLanguages: [ 'rust' ],__configurationTarget: 5,relativePathBase: 'd:\\workspace\\vscode\\arrow_rust'
}
Listening on port 8541
error: arrow_rust.exe :: Class 'arrow::datatypes::DataType' has a member '__0' of type 'alloc::vec::Vec<arrow::datatypes::Field>' which does not have a complete deFinition.
Debug adapter exit code=3221225620,signal=null.
程序运行正常。在 Linux 上调试相同的代码。
有没有其他方法可以在 Windows 上进行调试?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)