-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate expressions to pylibcudf (#16056)
xref #15162 Migrates expresions to use pylibcudf. Authors: - Thomas Li (https://github.com/lithomas1) Approvers: - Vyas Ramasubramani (https://github.com/vyasr) - Lawrence Mitchell (https://github.com/wence-) URL: #16056
- Loading branch information
Showing
18 changed files
with
335 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
======= | ||
copying | ||
======= | ||
======== | ||
datetime | ||
======== | ||
|
||
.. automodule:: cudf._lib.pylibcudf.datetime | ||
:members: |
6 changes: 6 additions & 0 deletions
6
docs/cudf/source/user_guide/api_docs/pylibcudf/expressions.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
=========== | ||
expressions | ||
=========== | ||
|
||
.. automodule:: cudf._lib.pylibcudf.expressions | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ from . cimport ( | |
concatenate, | ||
copying, | ||
datetime, | ||
expressions, | ||
filling, | ||
groupby, | ||
join, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
concatenate, | ||
copying, | ||
datetime, | ||
expressions, | ||
filling, | ||
groupby, | ||
interop, | ||
|
29 changes: 12 additions & 17 deletions
29
python/cudf/cudf/_lib/expressions.pxd → .../cudf/cudf/_lib/pylibcudf/expressions.pxd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,31 @@ | ||
# Copyright (c) 2022-2024, NVIDIA CORPORATION. | ||
|
||
from libc.stdint cimport int32_t, int64_t | ||
# Copyright (c) 2024, NVIDIA CORPORATION. | ||
from libcpp.memory cimport unique_ptr | ||
from libcpp.string cimport string | ||
|
||
from cudf._lib.pylibcudf.libcudf.expressions cimport ( | ||
column_reference, | ||
ast_operator, | ||
expression, | ||
literal, | ||
operation, | ||
) | ||
from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport ( | ||
numeric_scalar, | ||
scalar, | ||
string_scalar, | ||
timestamp_scalar, | ||
table_reference, | ||
) | ||
|
||
from .scalar cimport Scalar | ||
|
||
|
||
cdef class Expression: | ||
cdef unique_ptr[expression] c_obj | ||
|
||
|
||
cdef class Literal(Expression): | ||
cdef unique_ptr[scalar] c_scalar | ||
|
||
# Hold on to input scalar so it doesn't get gc'ed | ||
cdef Scalar scalar | ||
|
||
cdef class ColumnReference(Expression): | ||
pass | ||
|
||
|
||
cdef class Operation(Expression): | ||
pass | ||
# Hold on to the input expressions so | ||
# they don't get gc'ed | ||
cdef Expression right | ||
cdef Expression left | ||
|
||
cdef class ColumnNameReference(Expression): | ||
pass |
Oops, something went wrong.