Skip to content

Commit

Permalink
feat(python): Add missing .pyi symbols (facebookincubator#12269)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebookincubator#12269

Adding missing symbols required for Python static type checks

Reviewed By: kgpai

Differential Revision: D69196070

fbshipit-source-id: 5981c5cb63353a81371e59471f2f0cd2d339ffa7
  • Loading branch information
pedroerp authored and facebook-github-bot committed Feb 6, 2025
1 parent 8e6e2cc commit 589d657
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
15 changes: 14 additions & 1 deletion velox/py/plan_builder/plan_builder.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,35 @@

# pyre-unsafe

from enum import Enum
from typing import List, Dict, Type

# pyre-fixme[21]: Could not find `velox.py.type`.
from velox.py.type import Type

# pyre-fixme[21]: Could not find `velox.py.type`.
from velox.py.file import File


class JoinType(Enum):
INNER = 1
LEFT = 2
RIGHT = 3
FULL = 4

class PlanNode: ...
class PlanBuilder:
def __init__(self) -> None: ...
def table_scan(
self,
# pyre-fixme[11]: Annotation `Type` is not defined as a type.
output: Type,
output_schema: Type,
aliases: Dict[str, str] = {},
subfields: Dict[str, List[int]] = {},
row_index: str = "",
connector_id: str = "prism",
# pyre-fixme[11]: Annotation `File` is not defined as a type.
input_files: List[File] = [],
) -> PlanBuilder: ...
def get_plan_node(self) -> PlanBuilder: ...
def new_builder(self) -> PlanBuilder: ...
Expand Down
5 changes: 3 additions & 2 deletions velox/py/runner/runner.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@

from typing import Iterator

# pyre-fixme[21]: Could not find `velox.py.type`.
from velox.py.cector import Vector

class Vector:
def size(self) -> int: ...

class LocalRunner:
def __init__(self, PlanNode) -> None: ...
# pyre-fixme[11]: Annotation `Vector` is not defined as a type.
def execute(self) -> Iterator[Vector]: ...
def add_file_split(self, plan_id: str, file_path: str) -> None: ...

0 comments on commit 589d657

Please sign in to comment.