8000 update license · chenkovsky/datafusion-python@a933fdb · GitHub
[go: up one dir, main page]

Skip to content

Commit a933fdb

Browse files
committed
update license
1 parent 124d3ea commit a933fdb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+887
-78
lines changed

python/datafusion/_internal/__init__.pyi

Lines changed: 41 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
118
from pathlib import Path
219
from typing import Any, Callable, Dict, List, Optional, Set, Tuple
320
import pyarrow as pa
@@ -92,7 +109,7 @@ class SessionContext:
92109
def enable_url_table(self) -> SessionContext: ...
93110

94111
def register_object_store(self, schema: str, storage: Any, host: Optional[str] = None): ...
95-
112+
96113
def register_listing_table(self, name: str, path: str, table_partition_cols: List[Tuple[str, str]] = [], file_extension: str = ".parquet", schema: Optional[pa.Schema] = None, file_sort_order: Optional[List[List[SortExpr]]] = None): ...
97114< 10000 /code>

98115
def sql(self, query: str) -> DataFrame: ...
@@ -122,9 +139,9 @@ class SessionContext:
122139
def register_record_batches(self, name: str, partitions: List[List[pa.RecordBatch]]): ...
123140

124141
def register_parquet(
125-
self,
126-
name: str,
127-
path: str,
142+
self,
143+
name: str,
144+
path: str,
128145
table_partition_cols: List[Tuple[str, str]] = [],
129146
parquet_pruning: bool = True,
130147
file_extension: str = ".parquet",
@@ -134,7 +151,7 @@ class SessionContext:
134151
**kwargs
135152
):
136153
...
137-
154+
138155
def register_csv(
139156
self,
140157
name: str,
@@ -198,7 +215,7 @@ class SessionContext:
198215
def session_id(self) -> str: ...
199216

200217
def read_json(
201-
self,
218+
self,
202219
path: str | List[str],
203220
schema: Optional[pa.Schema] = None,
204221
schema_infer_max_records: int = 1000,
@@ -210,7 +227,7 @@ class SessionContext:
210227
...
211228

212229
def read_csv(
213-
self,
230+
self,
214231
path: str | List[str],
215232
schema: Optional[pa.Schema] = None,
216233
head_header: bool = True,
@@ -224,7 +241,7 @@ class SessionContext:
224241
...
225242

226243
def read_parquet(
227-
self,
244+
self,
228245
path: str | List[str],
229246
table_partition_cols: List[Tuple[str, str]] = [],
230247
parquet_pruning: bool = True,
@@ -245,12 +262,12 @@ class SessionContext:
245262
**kwargs
246263
):
247264
...
248-
265+
249266
def read_table(self, table: Table) -> DataFrame: ...
250267

251268
def execute(self, plan: ExecutionPlan, part: int) -> RecordBatchStream:
252269
...
253-
270+
254271

255272
class DataFrame:
256273
def __getitem__(self, key: str | List[str] | Tuple[str, ...]) -> DataFrame: ...
@@ -306,7 +323,7 @@ class DataFrame:
306323
def repartition(self, num: int) -> DataFrame: ...
307324

308325
def repartition_by_hash(self, *args: Expr, num: int) -> DataFrame: ...
309-
326+
310327
def union(self, py_df: DataFrame, distinct: bool = False) -> DataFrame: ...
311328

312329
def union_distinct(self, py_df: DataFrame) -> DataFrame: ...
@@ -355,7 +372,7 @@ class ScalarUDF:
355372
return_type: pa.DataType,
356373
volatility: str
357374
) -> None: ...
358-
375+
359376
def __call__(self, *args: Expr) -> Expr: ...
360377

361378
class AggregateUDF:
@@ -368,7 +385,7 @@ class AggregateUDF:
368385
state_type: List[pa.DataType],
369386
volatility: str,
370387
) -> None: ...
371-
388+
372389
def __call__(self, *arg 10000 s: Expr) -> Expr: ...
373390

374391
class WindowUDF:
@@ -380,7 +397,7 @@ class WindowUDF:
380397
return_type: pa.DataType,
381398
volatility: str,
382399
) -> None: ...
383-
400+
384401
def __call__(self, *args: Expr) -> Expr: ...
385402

386403
class Config:
@@ -394,18 +411,18 @@ class Config:
394411

395412
def set(self, key: str, value: object):
396413
...
397-
414+
398415
def get_all(self) -> Dict[str, Optional[str]]:
399416
...
400-
401-
417+
418+
402419
class LogicalPlan:
403420
def to_variant(self) -> Any:
404421
...
405-
422+
406423
def inputs(self) -> List[LogicalPlan]:
407424
...
408-
425+
409426
def display(self) -> str:
410427
...
411428

@@ -414,10 +431,10 @@ class LogicalPlan:
414431

415432
def display_indent_schema(self) -> str:
416433
...
417-
434+
418435
def display_graphviz(self) -> str:
419436
...
420-
437+
421438
def to_proto(self) -> bytes:
422439
...
423440

@@ -431,7 +448,7 @@ class ExecutionPlan:
431448

432449
def display(self) -> str:
433450
...
434-
451+
435452
def display_indent(self) -> str:
436453
...
437454

@@ -441,7 +458,7 @@ class ExecutionPlan:
441458
@staticmethod
442459
def from_proto(ctx: SessionContext, proto_msg: bytes) -> ExecutionPlan:
443460
...
444-
461+
445462
@property
446463
def partition_count(self) -> int: ...
447464

@@ -459,7 +476,7 @@ class RecordBatchStream:
459476

460477
async def __anext__(self) -> RecordBatch:
461478
...
462-
479+
463480
def __iter__(self) -> RecordBatch:
464481
...
465482

python/datafusion/_internal/common.pyi

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
118
import enum
219
from typing import List, Optional, Tuple
320

421
class DFSchema:
522
@staticmethod
623
def empty() -> DFSchema:
724
...
8-
25+
926
def field_names(self) -> List[str]:
1027
...
1128

@@ -111,13 +128,13 @@ class DataTypeMap:
111128

112129
@property
113130
def python_type(self) -> PythonType: ...
114-
131+
115132
@python_type.setter
116133
def python_type(self, python_type: PythonType): ...
117134

118135
@property
119136
def sql_type(self) -> SqlType: ...
120-
137+
121138
@sql_type.setter
122139
def sql_type(self, sql_type: SqlType): ...
123140

@@ -139,28 +156,28 @@ class SqlSchema:
139156

140157
@property
141158
def name(self) -> str: ...
142-
159+
143160
@name.setter
144161
def name(self, name: str): ...
145162

146163
@property
147164
def tables(self) -> List[SqlTable]: ...
148-
165+
149166
@tables.setter
150167
def tables(self, tables: List[SqlTable]): ...
151168

152169
@property
153170
def views(self) -> List[SqlView]: ...
154-
171+
155172
@views.setter
156173
def views(self, views: List[SqlView]): ...
157174

158175
@property
159176
def functions(self) -> List[SqlFunction]: ...
160-
177+
161178
@functions.setter
162179
def functions(self, functions: List[SqlFunction]): ...
163-
180+
164181

165182
class SqlTable:
166183
def __init__(
@@ -173,13 +190,13 @@ class SqlTable:
173190

174191
@property
175192
def name(self) -> str: ...
176-
193+
177194
@name.setter
178195
def name(self, name: str): ...
179196

180197
@property
181198
def columns(self) -> List[Tuple[str, DataTypeMap]]: ...
182-
199+
183200
@columns.setter
184201
def columns(self, columns: List[Tuple[str, DataTypeMap]]): ...
185202

@@ -224,13 +241,13 @@ class SqlView:
224241

225242
@property
226243
def name(self) -> str: ...
227-
244+
228245
@name.setter
229246
def name(self, name: str): ...
230247

231248
@property
232249
def definition(self) -> str: ...
233-
250+
234251
@definition.setter
235252
def definition(self, definition: str): ...
236253

@@ -242,4 +259,4 @@ class SqlStatistics:
242259

243260

244261
class SqlFunction:
245-
...
262+
...

python/datafusion/_internal/expr/__init__.pyi

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
118
from .base import Expr as Expr, ExprFuncBuilder as ExprFuncBuilder
219
from .column import Column as Column
320
from .literal import Literal as Literal
@@ -40,4 +57,4 @@ from .sort_expr import SortExpr as SortExpr
4057
from .subquery_alias import SubqueryAlias as SubqueryAlias
4158
from .drop_table import DropTable as DropTable
4259
from .repartition import Partitioning as Partitioning, Repartition as Repartition
43-
from .window import WindowExpr as WindowExpr, WindowFrame as WindowFrame, WindowFrameBound as WindowFrameBound
60+
from .window import WindowExpr as WindowExpr, WindowFrame as WindowFrame, WindowFrameBound as WindowFrameBound

python/datafusion/_internal/expr/aggregate.pyi

Lines changed: 17 additions & 0 deletions
Original file line numberDiff l 10000 ine numberDiff line change
@@ -1,3 +1,20 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
118
from typing import List
219
from .. import LogicalPlan
320
from ..common import DFSchema

python/datafusion/_internal/expr/aggregate_expr.pyi

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
118
from typing import List
219
from .base import Expr
320

0 commit comments

Comments
 (0)
0