|
26 | 26 | from datafusion.dataframe import DataFrame |
27 | 27 | from datafusion.expr import Expr |
28 | 28 |
|
29 | | -from ._internal import SessionContext as SessionContextInternal |
| 29 | +from datafusion.context import SessionContext |
30 | 30 |
|
31 | 31 |
|
32 | 32 | def read_parquet( |
@@ -65,7 +65,7 @@ def read_parquet( |
65 | 65 | if table_partition_cols is None: |
66 | 66 | table_partition_cols = [] |
67 | 67 | return DataFrame( |
68 | | - SessionContextInternal._global_ctx().read_parquet( |
| 68 | + SessionContext.global_ctx().read_parquet( |
69 | 69 | str(path), |
70 | 70 | table_partition_cols, |
71 | 71 | parquet_pruning, |
@@ -107,7 +107,7 @@ def read_json( |
107 | 107 | if table_partition_cols is None: |
108 | 108 | table_partition_cols = [] |
109 | 109 | return DataFrame( |
110 | | - SessionContextInternal._global_ctx().read_json( |
| 110 | + SessionContext.global_ctx().read_json( |
111 | 111 | str(path), |
112 | 112 | schema, |
113 | 113 | schema_infer_max_records, |
@@ -158,7 +158,7 @@ def read_csv( |
158 | 158 | path = [str(p) for p in path] if isinstance(path, list) else str(path) |
159 | 159 |
|
160 | 160 | return DataFrame( |
161 | | - SessionContextInternal._global_ctx().read_csv( |
| 161 | + SessionContext.global_ctx().read_csv( |
162 | 162 | path, |
163 | 163 | schema, |
164 | 164 | has_header, |
@@ -195,7 +195,7 @@ def read_avro( |
195 | 195 | if file_partition_cols is None: |
196 | 196 | file_partition_cols = [] |
197 | 197 | return DataFrame( |
198 | | - SessionContextInternal._global_ctx().read_avro( |
| 198 | + SessionContext.global_ctx().read_avro( |
199 | 199 | str(path), schema, file_partition_cols, file_extension |
200 | 200 | ) |
201 | 201 | ) |
0 commit comments