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 example does not run correctly. #11

Open
RuiSiJia opened this issue Mar 22, 2023 · 1 comment
Open

The example does not run correctly. #11

RuiSiJia opened this issue Mar 22, 2023 · 1 comment

Comments

@RuiSiJia
Copy link

let ctx = SessionContext::new();
ctx.runtime_env().register_object_store("hdfs", "", Arc::new(HadoopFileSystem));
let table_name = "line_item";
println!(
    "Register table {} with parquet file {}",
    table_name, hdfs_file_uri
);
ctx.register_parquet(table_name, &hdfs_file_uri, ParquetReadOptions::default()).await?;

let sql = "SELECT count(*) FROM line_item";
let result = ctx.sql(sql).await?.collect().await?;

The above code cannot be run. HadoopFileSystem maybe is not correct.

@yahoNanJing
Copy link
Collaborator

Thanks @RuiSiJia for reporting this issue. It's caused by the API change of SessionContext. I'll fixed.

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

2 participants