Repository: modin-project/modin

Issue:
``series.___getitem__`` doesn`t work correctly at MODIN_STORAGE_FORMAT=omnisci
When I run:
```
import pandas
import modin.pandas as pd
from modin.pandas.test.utils import df_equals
import modin.config as cfg
cfg.StorageFormat.put('omnisci')

df_equals(pd.Series([])[:30], pandas.Series([])[:30])
```
I have error:
```
KeyError: 'Column F___reduced__ does not exist in schema'
```
``dataframe_empty`` doesn`t work correctly at MODIN_STORAGE_FORMAT=omnisci
When I run:
```
import modin.pandas as pd
import modin.config as cfg
cfg.StorageFormat.put('omnisci')

df = pd.DataFrame()
df["a"] = [1, 2, 3, 4, 5]
```
I have error:
```
ValueError: Shape of passed values is (5, 1), indices imply (0, 1)
```


Discussion:
@modin-project/modin-omnisci  could someone please check if this still happens?
@modin-project/modin-omnisci  could someone please check if this still happens?

Resolving patch:
diff --git a/modin/core/dataframe/pandas/partitioning/partition_manager.py b/modin/core/dataframe/pandas/partitioning/partition_manager.py
--- a/modin/core/dataframe/pandas/partitioning/partition_manager.py
+++ b/modin/core/dataframe/pandas/partitioning/partition_manager.py
@@ -671,10 +671,16 @@ def to_pandas(cls, partitions):
             axis = 1
         else:
             ErrorMessage.catch_bugs_and_request_email(True)
+
+        def is_part_empty(part):
+            return part.empty and (
+                not isinstance(part, pandas.DataFrame) or (len(part.columns) == 0)
+            )
+
         df_rows = [
             pandas.concat([part for part in row], axis=axis)
             for row in retrieved_objects
-            if not all(part.empty for part in row)
+            if not all(is_part_empty(part) for part in row)
         ]
         if len(df_rows) == 0:
             return pandas.DataFrame()
diff --git a/modin/pandas/dataframe.py b/modin/pandas/dataframe.py
--- a/modin/pandas/dataframe.py
+++ b/modin/pandas/dataframe.py
@@ -1228,8 +1228,11 @@ def insert(
                 value, index=new_index, columns=new_columns
             )._query_compiler
         elif len(self.columns) == 0 and loc == 0:
+            new_index = self.index
             new_query_compiler = self.__constructor__(
-                data=value, columns=[column], index=self.index
+                data=value,
+                columns=[column],
+                index=None if len(new_index) == 0 else new_index,
             )._query_compiler
         else:
             if (


Test patch:
diff --git a/modin/experimental/core/execution/native/implementations/hdk_on_native/test/test_dataframe.py b/modin/experimental/core/execution/native/implementations/hdk_on_native/test/test_dataframe.py
--- a/modin/experimental/core/execution/native/implementations/hdk_on_native/test/test_dataframe.py
+++ b/modin/experimental/core/execution/native/implementations/hdk_on_native/test/test_dataframe.py
@@ -1722,9 +1722,6 @@ def filter(df, **kwargs):
 
         run_and_compare(filter, data=self.cmp_data)
 
-    @pytest.mark.xfail(
-        reason="Requires fix in OmniSci: https://github.com/intel-ai/omniscidb/pull/178"
-    )
     def test_filter_empty_result(self):
         def filter(df, **kwargs):
             return df[df.a < 0]
@@ -2435,5 +2432,35 @@ def test_sparse_series(self):
         df_equals(mds, pds)
 
 
+class TestEmpty:
+    def test_frame_insert(self):
+        def insert(df, **kwargs):
+            df["a"] = [1, 2, 3, 4, 5]
+            return df
+
+        run_and_compare(
+            insert,
+            data=None,
+        )
+        run_and_compare(
+            insert,
+            data=None,
+            constructor_kwargs={"index": ["a", "b", "c", "d", "e"]},
+        )
+        run_and_compare(
+            insert,
+            data=None,
+            constructor_kwargs={"columns": ["a", "b", "c", "d", "e"]},
+            # Do not force lazy since setitem() defaults to pandas
+            force_lazy=False,
+        )
+
+    def test_series_getitem(self):
+        df_equals(pd.Series([])[:30], pandas.Series([])[:30])
+
+    def test_series_to_pandas(self):
+        df_equals(pd.Series([])._to_pandas(), pandas.Series([]))
+
+
 if __name__ == "__main__":
     pytest.main(["-v", __file__])