Skip to content

Commit

Permalink
SNOW-1347394: Remove BaseQueryCompiler + error in QC default to pandas (
Browse files Browse the repository at this point in the history
#1454)

Please answer these questions before submitting your pull requests.
Thanks!

1. What GitHub issue is this PR addressing? Make sure that there is an
accompanying issue to your PR.

   Fixes SNOW-1347394

2. Fill out the following pre-review checklist:

- [ ] I am adding a new automated test(s) to verify correctness of my
new code
   - [ ] I am adding new logging messages
   - [ ] I am adding a new telemetry message
   - [ ] I am adding new credentials
   - [ ] I am adding a new dependency

3. Please describe how your code solves the related issue.

This PR removes our vendored copy of the `BaseQueryCompiler` class,
inheriting the class from upstream Modin instead. Similarly, it removes
all the operator registration classes defined in
`snowflake.snowpark.modin.core.dataframe.algebra.default2pandas`, with
one exception. Upstream Modin does not properly render the names of
`property` objects (modin-project/modin#7233),
so we should override `DataFrameDefault.register` to fix this until this
issue is fixed upstream.

This PR incidentally removes `Series.dt.week` + `Series.dt.weekofyear`,
which were already removed in pandas 2.0.

---------

Co-authored-by: Naren Krishna <[email protected]>
  • Loading branch information
sfc-gh-joshi and sfc-gh-nkrishna authored May 1, 2024
1 parent 0892d52 commit f0205f3
Show file tree
Hide file tree
Showing 27 changed files with 123 additions and 5,729 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,46 +21,10 @@

"""Module default2pandas provides templates for a query compiler default-to-pandas methods."""

from snowflake.snowpark.modin.core.dataframe.algebra.default2pandas.binary import (
BinaryDefault,
)
from snowflake.snowpark.modin.core.dataframe.algebra.default2pandas.cat import (
CatDefault,
)
from snowflake.snowpark.modin.core.dataframe.algebra.default2pandas.dataframe import (
DataFrameDefault,
)
from snowflake.snowpark.modin.core.dataframe.algebra.default2pandas.datetime import (
DateTimeDefault,
)
from snowflake.snowpark.modin.core.dataframe.algebra.default2pandas.default import (
DefaultMethod,
)
from snowflake.snowpark.modin.core.dataframe.algebra.default2pandas.groupby import (
GroupByDefault,
)
from snowflake.snowpark.modin.core.dataframe.algebra.default2pandas.resample import (
ResampleDefault,
)
from snowflake.snowpark.modin.core.dataframe.algebra.default2pandas.rolling import (
RollingDefault,
)
from snowflake.snowpark.modin.core.dataframe.algebra.default2pandas.series import (
SeriesDefault,
)
from snowflake.snowpark.modin.core.dataframe.algebra.default2pandas.str import (
StrDefault,
)

__all__ = [
"DataFrameDefault",
"DateTimeDefault",
"SeriesDefault",
"StrDefault",
"BinaryDefault",
"ResampleDefault",
"RollingDefault",
"DefaultMethod",
"CatDefault",
"GroupByDefault",
]

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit f0205f3

Please sign in to comment.