Skip to content

Commit

Permalink
FEAT-#6398: Improved performance of list-like objects insertion into …
Browse files Browse the repository at this point in the history
…DataFrames

Wrap list-like object into a single-column frame before the insertion.
In case of the HDK backend: if the partition contains either pandas DataFrame or
pyarrow Table, insert the object directly into the frame/table, otherwise create
a single-column frame and join the frames by rowid.

Signed-off-by: Andrey Pavlenko <[email protected]>
  • Loading branch information
AndreyPavlenko committed Jul 27, 2023
1 parent b1e297e commit 9573b3a
Show file tree
Hide file tree
Showing 12 changed files with 481 additions and 90 deletions.
21 changes: 21 additions & 0 deletions modin/core/storage_formats/pandas/query_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2730,6 +2730,7 @@ def getitem_row_array(self, key):
)

def setitem(self, axis, key, value):
value = self._wrap_column_data(value)
return self._setitem(axis=axis, key=key, value=value, how=None)

def _setitem(self, axis, key, value, how="inner"):
Expand Down Expand Up @@ -2895,6 +2896,7 @@ def _compute_duplicated(df): # pragma: no cover
# return a new one from here and let the front end handle the inplace
# update.
def insert(self, loc, column, value):
value = self._wrap_column_data(value)
if isinstance(value, type(self)):
value.columns = [column]
return self.insert_item(axis=1, loc=loc, value=value, how=None)
Expand Down Expand Up @@ -2927,6 +2929,25 @@ def insert(df, internal_indices=[]): # pragma: no cover
)
return self.__constructor__(new_modin_frame)

def _wrap_column_data(self, data):
"""
If the data is list-like, create a single column query compiler.
Parameters
----------
data : any
Returns
-------
data or PandasQueryCompiler
"""
if is_list_like(data):
return self.from_pandas(
pandas.DataFrame(pandas.Series(data, index=self.index)),
data_cls=type(self._modin_frame),
)
return data

# END Insert

def explode(self, column):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
check_cols_to_join,
get_data_for_join_by_index,
build_categorical_from_at,
ensure_supported_dtype,
)
from ..db_worker import DbTable
from ..partitioning.partition_manager import HdkOnNativeDataframePartitionManager
Expand Down Expand Up @@ -201,6 +202,9 @@ def __init__(
self.id = str(type(self)._next_id[0])
type(self)._next_id[0] += 1

if op is None and partitions is not None:
op = FrameNode(self)

Check warning on line 206 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L205-L206

Added lines #L205 - L206 were not covered by tests

self._op = op
self._index_cols = index_cols
self._partitions = partitions
Expand Down Expand Up @@ -484,9 +488,7 @@ def _has_arrow_table(self):
-------
bool
"""
return self._partitions is not None and isinstance(
self._partitions[0][0].get(), pyarrow.Table
)
return self._partitions is not None and self._partitions[0][0].raw

Check warning on line 491 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L491

Added line #L491 was not covered by tests

def _dtypes_for_exprs(self, exprs):
"""
Expand Down Expand Up @@ -1422,12 +1424,7 @@ def _join_arrow_columns(self, other_modin_frames):
and isinstance(f._execute(), (DbTable, pyarrow.Table))
for f in frames
):
tables = [
t
if isinstance(t := f._partitions[0][0].get(), pyarrow.Table)
else t.to_arrow()
for f in frames
]
tables = [f._partitions[0][0].get(True) for f in frames]

Check warning on line 1427 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1427

Added line #L1427 was not covered by tests
column_names = [c for t in tables for c in t.column_names]
if len(column_names) != len(set(column_names)):
raise NotImplementedError("Duplicate column names")
Expand Down Expand Up @@ -1635,6 +1632,13 @@ def insert(self, loc, column, value):
assert column not in self._table_cols
assert 0 <= loc <= len(self.columns)

if is_list_like(value):
if isinstance(value, pd.Series) and not self.index.equals(value.index):

Check warning on line 1636 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1635-L1636

Added lines #L1635 - L1636 were not covered by tests
# Align by index
value = pd.Series(value, index=self.index)
value.reset_index(drop=True, inplace=True)
return self._insert_list(loc, column, value)

Check warning on line 1640 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1638-L1640

Added lines #L1638 - L1640 were not covered by tests

exprs = self._index_exprs()
for i in range(0, loc):
col = self.columns[i]
Expand All @@ -1655,6 +1659,159 @@ def insert(self, loc, column, value):
force_execution_mode=self._force_execution_mode,
)

def _insert_list(self, loc, name, value):

Check warning on line 1662 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1662

Added line #L1662 was not covered by tests
"""
Insert a list-like value.
Parameters
----------
loc : int
name : str
value : list
Returns
-------
HdkOnNativeDataframe
"""
ncols = len(self.columns)

Check warning on line 1676 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1676

Added line #L1676 was not covered by tests

if loc == -1:
loc = ncols

Check warning on line 1679 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1678-L1679

Added lines #L1678 - L1679 were not covered by tests

if ncols == 0:

Check warning on line 1681 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1681

Added line #L1681 was not covered by tests
assert loc == 0
return self._list_to_df(name, value, True)

Check warning on line 1683 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1683

Added line #L1683 was not covered by tests

if self._partitions and self._partitions[0][0].raw:
return self._insert_list_col(loc, name, value)

Check warning on line 1686 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1685-L1686

Added lines #L1685 - L1686 were not covered by tests

if loc == 0 or loc == ncols:
in_idx = 0 if loc == 0 else 1
if (

Check warning on line 1690 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1688-L1690

Added lines #L1688 - L1690 were not covered by tests
isinstance(self._op, JoinNode)
and self._op.by_rowid
and self._op.input[in_idx]._partitions
and self._op.input[in_idx]._partitions[0][0].raw
):
lhs = self._op.input[0]
rhs = self._op.input[1]
if loc == 0:
lhs = lhs._insert_list(0, name, value)
dtype = lhs.dtypes[0]

Check warning on line 1700 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1696-L1700

Added lines #L1696 - L1700 were not covered by tests
else:
rhs = rhs._insert_list(-1, name, value)
dtype = rhs.dtypes[-1]
elif loc == 0:
lhs = self._list_to_df(name, value, False)
rhs = self
dtype = lhs.dtypes[0]

Check warning on line 1707 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1702-L1707

Added lines #L1702 - L1707 were not covered by tests
else:
lhs = self
rhs = self._list_to_df(name, value, False)
dtype = rhs.dtypes[0]
elif isinstance(self._op, JoinNode) and self._op.by_rowid:
left_len = len(self._op.input[0].columns)
if loc < left_len:
lhs = self._op.input[0]._insert_list(loc, name, value)
rhs = self._op.input[1]
dtype = lhs.dtypes[loc]

Check warning on line 1717 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1709-L1717

Added lines #L1709 - L1717 were not covered by tests
else:
lhs = self._op.input[0]
rhs = self._op.input[1]._insert_list(loc - left_len, name, value)
dtype = rhs.dtypes[loc]

Check warning on line 1721 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1719-L1721

Added lines #L1719 - L1721 were not covered by tests
else:
lexprs = self._index_exprs()
rexprs = OrderedDict()
for i, col in enumerate(self.columns):
(lexprs if i < loc else rexprs)[col] = self.ref(col)
lhs = self.__constructor__(

Check warning on line 1727 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1723-L1727

Added lines #L1723 - L1727 were not covered by tests
columns=self.columns[0:loc],
dtypes=self._dtypes_for_exprs(lexprs),
op=TransformNode(self, lexprs),
index=self._index_cache,
index_cols=self._index_cols,
force_execution_mode=self._force_execution_mode,
)._insert_list(loc, name, value)
rhs = self.__constructor__(

Check warning on line 1735 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1735

Added line #L1735 was not covered by tests
columns=self.columns[loc:],
dtypes=self._dtypes_for_exprs(rexprs),
op=TransformNode(self, rexprs),
force_execution_mode=self._force_execution_mode,
)
dtype = lhs.dtypes[loc]

Check warning on line 1741 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1741

Added line #L1741 was not covered by tests

op = self._join_by_rowid_op(lhs, rhs)
return self._insert_list_col(loc, name, value, dtype, op)

Check warning on line 1744 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1743-L1744

Added lines #L1743 - L1744 were not covered by tests

def _insert_list_col(self, idx, name, value, dtype=None, op=None):

Check warning on line 1746 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1746

Added line #L1746 was not covered by tests
"""
Insert a list-like column.
Parameters
----------
idx : int
name : str
value : list
dtype : dtype, default: None
op : DFAlgNode, default: None
Returns
-------
HdkOnNativeDataframe
"""
cols = self.columns.tolist()
cols.insert(idx, name)
if self._index_cols:
idx += len(self._index_cols)
if dtype is None:
part, dtype = self._partitions[0][0].insert(idx, name, value)
part = np.array([[part]])

Check warning on line 1768 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1762-L1768

Added lines #L1762 - L1768 were not covered by tests
else:
part = None
dtypes = self._dtypes.tolist()
dtypes.insert(idx, dtype)
return self.copy(partitions=part, columns=cols, dtypes=dtypes, op=op)

Check warning on line 1773 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1770-L1773

Added lines #L1770 - L1773 were not covered by tests

def _list_to_df(self, name, value, add_index):

Check warning on line 1775 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1775

Added line #L1775 was not covered by tests
"""
Create a single-column frame from the list-like value.
Parameters
----------
name : str
value : list
add_index : bool
Returns
-------
HdkOnNativeDataframe
"""
df = pd.DataFrame({name: value}, index=self.index if add_index else None)
ensure_supported_dtype(df.dtypes[0])
return self.from_pandas(df)

Check warning on line 1791 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1789-L1791

Added lines #L1789 - L1791 were not covered by tests

@staticmethod
def _join_by_rowid_op(lhs, rhs):

Check warning on line 1794 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1793-L1794

Added lines #L1793 - L1794 were not covered by tests
"""
Create a JoinNode for join by rowid.
Parameters
----------
lhs : HdkOnNativeDataframe
rhs : HdkOnNativeDataframe
Returns
-------
JoinNode
"""
exprs = lhs._index_exprs() if lhs._index_cols else rhs._index_exprs()
exprs.update((c, lhs.ref(c)) for c in lhs.columns)
exprs.update((c, rhs.ref(c)) for c in rhs.columns)
condition = lhs._build_equi_join_condition(

Check warning on line 1810 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1807-L1810

Added lines #L1807 - L1810 were not covered by tests
rhs, [ROWID_COL_NAME], [ROWID_COL_NAME]
)
return JoinNode(lhs, rhs, exprs=exprs, condition=condition)

Check warning on line 1813 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L1813

Added line #L1813 was not covered by tests

def cat_codes(self):
"""
Extract codes for a category column.
Expand Down Expand Up @@ -2122,6 +2279,11 @@ def to_arrow(result, op=frame._op, tables=[], frames=iter(input)):

def _build_index_cache(self):
"""Materialize index and store it in the cache."""
if self._partitions and not self._index_cols:
nrows = self._partitions[0][0]._length_cache
self.set_index_cache(Index.__new__(RangeIndex, data=range(nrows)))
return

Check warning on line 2285 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/dataframe.py#L2282-L2285

Added lines #L2282 - L2285 were not covered by tests

obj = self._execute()

if self._index_cols is None:
Expand Down Expand Up @@ -2591,8 +2753,8 @@ def to_pandas(self):
assert len(df.columns) == len(self.columns)
else:
assert self._index_cols is None
assert df.index.name is None or isinstance(
self._partitions[0][0].get(), pd.DataFrame
assert (
df.index.name is None or self._has_unsupported_data
), f"index name '{df.index.name}' is not None"
if self.has_materialized_index:
df.index = self._index_cache.get().copy()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,52 @@ def get_common_arrow_type(t1: pa.lib.DataType, t2: pa.lib.DataType) -> pa.lib.Da
return pa.from_numpy_dtype(np.promote_types(t1, t2))


def is_supported_arrow_type(dtype: pa.lib.DataType) -> bool:

Check warning on line 539 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/utils.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/utils.py#L539

Added line #L539 was not covered by tests
"""
Return True if the specified arrow type is supported by HDK.
Parameters
----------
dtype : pa.lib.DataType
Returns
-------
bool
"""
if (

Check warning on line 551 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/utils.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/utils.py#L551

Added line #L551 was not covered by tests
pa.types.is_string(dtype)
or pa.types.is_time(dtype)
or pa.types.is_dictionary(dtype)
or pa.types.is_null(dtype)
):
return True
if isinstance(dtype, pa.ExtensionType) or pa.types.is_duration(dtype):
return False
try:
pandas_dtype = dtype.to_pandas_dtype()
return pandas_dtype != np.dtype("O")
except NotImplementedError:
return False

Check warning on line 564 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/utils.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/utils.py#L557-L564

Added lines #L557 - L564 were not covered by tests


def ensure_supported_dtype(dtype: pa.lib.DataType):

Check warning on line 567 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/utils.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/utils.py#L567

Added line #L567 was not covered by tests
"""
Check if the specified `dtype` is supported by HDK.
If `dtype` is not supported, `NotImplementedError` is raised.
Parameters
----------
dtype : dtype
"""
try:
if is_supported_arrow_type(pa.from_numpy_dtype(dtype)):
return
except pa.ArrowNotImplementedError:
...

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.

Check warning on line 581 in modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/utils.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/dataframe/utils.py#L577-L581

Added lines #L577 - L581 were not covered by tests
raise NotImplementedError(f"Type {dtype}")


def arrow_to_pandas(at: pa.Table) -> pandas.DataFrame:
"""
Convert the specified arrow table to pandas.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,9 @@ def execute_arrow(self, ignore=None) -> Union[DbTable, pa.Table, pandas.DataFram
"""
frame = self.modin_frame
if frame._partitions is not None:
return frame._partitions[0][0].get()
part = frame._partitions[0][0]
to_arrow = part.raw and not frame._has_unsupported_data
return part.get(to_arrow)

Check warning on line 439 in modin/experimental/core/execution/native/implementations/hdk_on_native/df_algebra.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/df_algebra.py#L437-L439

Added lines #L437 - L439 were not covered by tests
if frame._has_unsupported_data:
return pandas.DataFrame(
index=frame._index_cache, columns=frame._columns_cache
Expand Down Expand Up @@ -836,6 +838,48 @@ def __init__(
self.exprs = exprs
self.condition = condition

@property
def by_rowid(self):

Check warning on line 842 in modin/experimental/core/execution/native/implementations/hdk_on_native/df_algebra.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/df_algebra.py#L841-L842

Added lines #L841 - L842 were not covered by tests
"""
Return True if this is a join by the rowid column.
Returns
-------
bool
"""
return (

Check warning on line 850 in modin/experimental/core/execution/native/implementations/hdk_on_native/df_algebra.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/df_algebra.py#L850

Added line #L850 was not covered by tests
isinstance(self.condition, OpExpr)
and self.condition.op == "="
and all(
isinstance(o, InputRefExpr) and o.column == ColNameCodec.ROWID_COL_NAME
for o in self.condition.operands
)
)

@_inherit_docstrings(DFAlgNode.require_executed_base)
def require_executed_base(self) -> bool:
return self.by_rowid and any(

Check warning on line 861 in modin/experimental/core/execution/native/implementations/hdk_on_native/df_algebra.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/df_algebra.py#L859-L861

Added lines #L859 - L861 were not covered by tests
not isinstance(i._op, FrameNode) for i in self.input
)

@_inherit_docstrings(DFAlgNode.can_execute_arrow)
def can_execute_arrow(self) -> bool:
return self.by_rowid and all(

Check warning on line 867 in modin/experimental/core/execution/native/implementations/hdk_on_native/df_algebra.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/df_algebra.py#L865-L867

Added lines #L865 - L867 were not covered by tests
isinstance(e, InputRefExpr) for e in self.exprs.values()
)

@_inherit_docstrings(DFAlgNode.execute_arrow)
def execute_arrow(self, tables: List[pa.Table]) -> pa.Table:
t1 = tables[0]
t2 = tables[1]
cols1 = t1.column_names
cols = [

Check warning on line 876 in modin/experimental/core/execution/native/implementations/hdk_on_native/df_algebra.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/df_algebra.py#L871-L876

Added lines #L871 - L876 were not covered by tests
(t1 if (col := ColNameCodec.encode(e.column)) in cols1 else t2).column(col)
for e in self.exprs.values()
]
names = [ColNameCodec.encode(c) for c in self.exprs]
return pa.table(cols, names)

Check warning on line 881 in modin/experimental/core/execution/native/implementations/hdk_on_native/df_algebra.py

View check run for this annotation

Codecov / codecov/patch

modin/experimental/core/execution/native/implementations/hdk_on_native/df_algebra.py#L880-L881

Added lines #L880 - L881 were not covered by tests

def copy(self):
"""
Make a shallow copy of the node.
Expand Down
Loading

0 comments on commit 9573b3a

Please sign in to comment.