Skip to content

Commit bd27edc

Browse files
committed
UNPICK changes to review
1 parent 3d6aaeb commit bd27edc

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

python/datafusion/context.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -731,12 +731,11 @@ def from_polars(self, data: pl.DataFrame, name: str | None = None) -> DataFrame:
731731
"""
732732
return DataFrame(self.ctx.from_polars(data, name))
733733

734+
# https://github.com/apache/datafusion-python/pull/1016#discussion_r1983239116
735+
# is the discussion on how we arrived at adding register_view
734736
def register_view(self, name: str, df: DataFrame) -> None:
735737
"""Register a :py:class: `~datafusion.detaframe.DataFrame` as a view.
736738
737-
The DataFrame is converted into a view before registration so it can be
738-
referenced from SQL without materializing results immediately.
739-
740739
Args:
741740
name (str): The name to register the view under.
742741
df (DataFrame): The DataFrame to be converted into a view and registered.

src/catalog.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,8 @@ impl CatalogProvider for RustWrappedPyCatalogProvider {
496496
name: &str,
497497
schema: Arc<dyn SchemaProvider>,
498498
) -> datafusion::common::Result<Option<Arc<dyn SchemaProvider>>> {
499+
// JRIGHT HERE
500+
// let py_schema: PySchema = schema.into();
499501
Python::with_gil(|py| {
500502
let py_schema = match schema
501503
.as_any()

src/dataframe.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,11 @@ impl PyDataFrame {
430430

431431
/// Convert this DataFrame into a Table that can be used in register_table
432432
/// By convention, into_... methods consume self and return the new object.
433-
/// Here we intentionally borrow to avoid invalidating the Python wrapper.
433+
/// Disabling the clippy lint, so we can use &self
434+
/// because we're working with Python bindings
435+
/// where objects are shared
436+
/// https://github.com/apache/datafusion-python/pull/1016#discussion_r1983239116
437+
/// - we have not decided on the table_provider approach yet
434438
#[allow(clippy::wrong_self_convention)]
435439
fn into_view(&self) -> PyDataFusionResult<PyTable> {
436440
// Call the underlying Rust DataFrame::into_view method.

0 commit comments

Comments
 (0)