Skip to content

Commit 56f760b

Browse files
committed
fixup! [HSTACK] Delta table support
1 parent e6407b1 commit 56f760b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/context.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use pyo3::prelude::*;
3434
use crate::catalog::{PyCatalog, PyTable, RustWrappedPyCatalogProvider};
3535
use crate::dataframe::PyDataFrame;
3636
use crate::dataset::Dataset;
37-
use crate::errors::{py_datafusion_err, to_datafusion_err, PyDataFusionResult};
37+
use crate::errors::{py_datafusion_err, py_runtime_err, to_datafusion_err, PyDataFusionResult};
3838
use crate::expr::sort_expr::PySortExpr;
3939
use crate::physical_plan::PyExecutionPlan;
4040
use crate::record_batch::PyRecordBatchStream;
@@ -890,6 +890,7 @@ impl PySessionContext {
890890
py: Python,
891891
) -> PyResult<()> {
892892
deltalake::ensure_initialized();
893+
let table_uri = Url::parse(table_uri).map_err(py_runtime_err)?;
893894
let table = deltalake::open_table_with_storage_options(table_uri, storage_opts);
894895
let table = wait_for_future(py, table)?.map_err(py_datafusion_err)?;
895896
self.ctx.register_table(name, Arc::new(table)).map_err(py_datafusion_err)?;

0 commit comments

Comments
 (0)