Skip to content

Commit

Permalink
add back comment
Browse files Browse the repository at this point in the history
  • Loading branch information
rjzamora committed Jul 26, 2024
1 parent 77b963c commit acb1688
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions merlin/dag/executors.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ def transform(
# If so, we should perform column selection at the ddf level.
# Otherwise, Dask will not push the column selection into the
# IO function.

if not nodes:
return ddf[_get_unique(additional_columns)] if additional_columns else ddf

Expand All @@ -390,6 +391,13 @@ def transform(

def empty_like(df, cols):
# Construct an empty DataFrame with the same dtypes as df

# TODO: constructing meta like this can loose dtype information for
# columns that are arbitrarily set to 'float64'. We should propagate
# dtype information along with column names in the columngroup graph.
# This currently only happens during intermediate 'fit' transforms,
# so as long as statoperators don't require dtype information on the
# DDF this doesn't matter all that much
return df._constructor(
{
col: df._constructor_sliced(
Expand Down

0 comments on commit acb1688

Please sign in to comment.