Repository: modin-project/modin

Issue:
``dataframe.sum()`` doesn`t work correctly at MODIN_STORAGE_FORMAT=omnisci
When I run:
```
import modin.pandas as pd
from modin.pandas.test.utils import test_data
import modin.config as cfg
cfg.StorageFormat.put('omnisci')

data = test_data["float_nan_data"]
modin_df = pd.DataFrame(data)
modin_df.T.sum()
```
I have error:
```
TypeError: expected bytes, int found
```


Discussion:

Resolving patch:
diff --git a/modin/experimental/core/execution/native/implementations/omnisci_on_native/dataframe/dataframe.py b/modin/experimental/core/execution/native/implementations/omnisci_on_native/dataframe/dataframe.py
--- a/modin/experimental/core/execution/native/implementations/omnisci_on_native/dataframe/dataframe.py
+++ b/modin/experimental/core/execution/native/implementations/omnisci_on_native/dataframe/dataframe.py
@@ -1927,9 +1927,11 @@ def _set_index(self, new_index):
                 index_at = index_at.append_column(field, at.column(i))
 
             index_names = self._mangle_index_names(new_index.names)
-            index_at = index_at.rename_columns(index_names + list(self.columns))
+            index_at = index_at.rename_columns(
+                index_names + [f"F_{c}" for c in self.columns]
+            )
 
-            return self.from_arrow(index_at, index_names, new_index)
+            return self.from_arrow(index_at, index_names, new_index, self.columns)
 
     def reset_index(self, drop):
         """
@@ -2441,7 +2443,7 @@ def _mangle_index_names(cls, names):
         ]
 
     @classmethod
-    def from_arrow(cls, at, index_cols=None, index=None):
+    def from_arrow(cls, at, index_cols=None, index=None, columns=None):
         """
         Build a frame from an Arrow table.
 
@@ -2455,6 +2457,8 @@ def from_arrow(cls, at, index_cols=None, index=None):
         index : pandas.Index, optional
             An index to be used by the new frame. Should present
             if `index_cols` is not None.
+        columns : Index or array-like, optional
+            Column labels to use for resulting frame.
 
         Returns
         -------
@@ -2468,15 +2472,18 @@ def from_arrow(cls, at, index_cols=None, index=None):
             unsupported_cols,
         ) = cls._partition_mgr_cls.from_arrow(at, return_dims=True)
 
-        if index_cols:
+        if columns is not None:
+            new_columns = columns
+            new_index = pd.RangeIndex(at.num_rows) if index is None else index
+        elif index_cols:
             data_cols = [col for col in at.column_names if col not in index_cols]
+            new_columns = pd.Index(data=data_cols, dtype="O")
             new_index = index
         else:
-            data_cols = at.column_names
             assert index is None
+            new_columns = pd.Index(data=at.column_names, dtype="O")
             new_index = pd.RangeIndex(at.num_rows)
 
-        new_columns = pd.Index(data=data_cols, dtype="O")
         new_dtypes = pd.Series(
             [cls._arrow_type_to_dtype(col.type) for col in at.columns],
             index=at.column_names,


Test patch:
diff --git a/modin/experimental/core/execution/native/implementations/omnisci_on_native/test/test_dataframe.py b/modin/experimental/core/execution/native/implementations/omnisci_on_native/test/test_dataframe.py
--- a/modin/experimental/core/execution/native/implementations/omnisci_on_native/test/test_dataframe.py
+++ b/modin/experimental/core/execution/native/implementations/omnisci_on_native/test/test_dataframe.py
@@ -2156,5 +2156,18 @@ def apply(df1, df2, **kwargs):
         )
 
 
+class TestNonStrCols:
+    data = {0: [1, 2, 3], "1": [3, 4, 5], 2: [6, 7, 8]}
+
+    def test_sum(self):
+        mdf = pd.DataFrame(self.data).sum()
+        pdf = pandas.DataFrame(self.data).sum()
+        df_equals(mdf, pdf)
+
+    def test_set_index(self):
+        df = pd.DataFrame(self.data)
+        df._query_compiler._modin_frame._set_index(pd.Index([1, 2, 3]))
+
+
 if __name__ == "__main__":
     pytest.main(["-v", __file__])