dangotbanned commented on code in PR #47609:
URL: https://github.com/apache/arrow/pull/47609#discussion_r2408174138


##########
python/pyarrow-stubs/acero.pyi:
##########
@@ -0,0 +1,134 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import sys
+
+if sys.version_info >= (3, 11):
+    from typing import Self
+else:
+    from typing_extensions import Self
+if sys.version_info >= (3, 10):
+    from typing import TypeAlias
+else:
+    from typing_extensions import TypeAlias
+from typing import Literal
+
+from . import lib
+from .compute import Expression, FunctionOptions
+from .dataset import InMemoryDataset, Dataset
+
+_StrOrExpr: TypeAlias = str | Expression
+
+
+class Declaration(lib._Weakrefable):
+    def __init__(
+        self,
+        factory_name: str,
+        options: ExecNodeOptions,
+        inputs: list[Declaration] | None = None,
+    ) -> None: ...
+    @classmethod
+    def from_sequence(cls, decls: list[Declaration]) -> Self: ...
+    def to_reader(self, use_threads: bool = True) -> lib.RecordBatchReader: ...
+    def to_table(self, use_threads: bool = True) -> lib.Table: ...
+
+
+class ExecNodeOptions(lib._Weakrefable):
+    ...
+
+
+class TableSourceNodeOptions(ExecNodeOptions):
+    def __init__(self, table: lib.Table) -> None: ...
+
+
+class FilterNodeOptions(ExecNodeOptions):
+    def __init__(self, filter_expression: Expression) -> None: ...
+
+
+class ProjectNodeOptions(ExecNodeOptions):
+    def __init__(self, expressions: list[Expression],
+                 names: list[str] | None = None) -> None: ...
+
+
+class AggregateNodeOptions(ExecNodeOptions):
+    def __init__(
+        self,
+        aggregates: list[tuple[list[str], str, FunctionOptions, str]],
+        keys: list[_StrOrExpr] | None = None,
+    ) -> None: ...
+
+
+class OrderByNodeOptions(ExecNodeOptions):
+    def __init__(
+        self,
+        sort_keys: tuple[tuple[str, Literal["ascending", "descending"]], ...] 
= (),

Review Comment:
   Oh yeah, what I wrote wouldn't be valid - since it changed from `tuple` 
(where it was needed) into `Iterable`
   
   Well spotted



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to