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

feat: Adds daft-catalog, daft-table and daft-session for catalog integrations. #3805

Closed
wants to merge 10 commits into from
589 changes: 312 additions & 277 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 4 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ common-tracing = {path = "src/common/tracing", default-features = false}
common-version = {path = "src/common/version", default-features = false}
daft-algebra = {path = "src/daft-algebra", default-features = false}
daft-catalog = {path = "src/daft-catalog", default-features = false}
daft-catalog-python-catalog = {path = "src/daft-catalog/python-catalog", optional = true}
daft-compression = {path = "src/daft-compression", default-features = false}
daft-connect = {path = "src/daft-connect", optional = true}
daft-context = {path = "src/daft-context", default-features = false}
Expand Down Expand Up @@ -50,15 +49,17 @@ sysinfo = {workspace = true}
[features]
# maturin will turn this on
python = [
"dep:pyo3",
"dep:pyo3-log",
"common-daft-config/python",
"common-display/python",
"common-partitioning/python",
"common-resource-request/python",
"common-file-formats/python",
"common-scan-info/python",
"common-system-info/python",
"daft-catalog-python-catalog/python",
"daft-catalog/python",
"daft-connect/python",
"daft-context/python",
"daft-core/python",
"daft-csv/python",
Expand All @@ -74,18 +75,13 @@ python = [
"daft-micropartition/python",
"daft-parquet/python",
"daft-physical-plan/python",
"daft-recordbatch/python",
"daft-scan/python",
"daft-scheduler/python",
"daft-sql/python",
"daft-session/python",
"daft-stats/python",
"daft-recordbatch/python",
"daft-writers/python",
"dep:daft-catalog-python-catalog",
"dep:daft-connect",
"daft-connect/python",
"dep:pyo3",
"dep:pyo3-log"
]

[lib]
Expand Down
25 changes: 19 additions & 6 deletions daft/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,10 @@ def refresh_logger() -> None:
###

from daft.catalog import (
Catalog,
Identifier,
read_table,
register_table,
Table,
)
from daft.context import set_execution_config, set_planning_config, execution_config_ctx, planning_config_ctx
from daft.convert import (
from_arrow,
from_dask_dataframe,
Expand Down Expand Up @@ -91,16 +90,27 @@ def refresh_logger() -> None:
read_lance,
)
from daft.series import Series
from daft.session import Session, current_session, set_session
from daft.session import (
Session,
create_catalog,
create_temp_table,
current_catalog,
current_session,
set_session,
set_catalog,
)
from daft.sql import sql, sql_expr
from daft.udf import udf
from daft.viz import register_viz_hook

to_struct = Expression.to_struct

__all__ = [
"Catalog",
# !! – move to daft-table
"DataCatalogTable",
"DataCatalogType",
# !! --------------------
"DataFrame",
"DataType",
"Expression",
Expand All @@ -111,9 +121,13 @@ def refresh_logger() -> None:
"Schema",
"Series",
"Session",
"Table",
"TimeUnit",
"coalesce",
"col",
"create_catalog",
"create_temp_table",
"current_catalog",
"current_session",
"execution_config_ctx",
"from_arrow",
Expand All @@ -135,13 +149,12 @@ def refresh_logger() -> None:
"read_lance",
"read_parquet",
"read_sql",
"read_table",
"refresh_logger",
"register_table",
"register_viz_hook",
"set_execution_config",
"set_planning_config",
"set_session",
"set_catalog",
"sql",
"sql_expr",
"struct",
Expand Down
Loading
Loading