Repository: modin-project/modin

Issue:
BUG: Unsupported aggregate median is not currently supported by ExperimentalHdkOnNative
### Modin version checks

- [X] I have checked that this issue has not already been reported.

- [X] I have confirmed this bug exists on the latest released version of Modin.

- [X] I have confirmed this bug exists on the main branch of Modin. (In order to do this you can follow [this guide](https://modin.readthedocs.io/en/stable/getting_started/installation.html#installing-from-the-github-master-branch).)


### Reproducible Example

```python
import modin.pandas as pd

df = pd.DataFrame({"A": [1, 2, 3, 4, 5], "B": [6, 7, 8, 9, 10]})
print(df.groupby("A").agg({"A": ["median"]}))
```


### Issue Description

The code above defaults to pandas, because the `median` aggregation is not currently supported.

### Expected Behavior

The aggregation should be performed by HDK.

### Error Logs

<details>

```python-traceback

Replace this line with the error backtrace (if applicable).

```

</details>


### Installed Versions

<details>

Replace this line with the output of pd.show_versions()

</details>



Discussion:

Resolving patch:
diff --git a/modin/experimental/core/execution/native/implementations/hdk_on_native/calcite_builder.py b/modin/experimental/core/execution/native/implementations/hdk_on_native/calcite_builder.py
--- a/modin/experimental/core/execution/native/implementations/hdk_on_native/calcite_builder.py
+++ b/modin/experimental/core/execution/native/implementations/hdk_on_native/calcite_builder.py
@@ -342,6 +342,7 @@ class InputContext:
             "min": "MIN",
             "size": "COUNT",
             "count": "COUNT",
+            "median": "APPROX_QUANTILE",
         }
         _no_arg_aggregates = {"size"}
 
diff --git a/modin/experimental/core/execution/native/implementations/hdk_on_native/expr.py b/modin/experimental/core/execution/native/implementations/hdk_on_native/expr.py
--- a/modin/experimental/core/execution/native/implementations/hdk_on_native/expr.py
+++ b/modin/experimental/core/execution/native/implementations/hdk_on_native/expr.py
@@ -72,7 +72,7 @@ def _get_common_dtype(lhs_dtype, rhs_dtype):
 
 _aggs_preserving_numeric_type = {"sum", "min", "max"}
 _aggs_with_int_result = {"count", "size"}
-_aggs_with_float_result = {"mean", "std", "skew"}
+_aggs_with_float_result = {"mean", "median", "std", "skew"}
 
 
 def _agg_dtype(agg, dtype):


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
@@ -939,7 +939,7 @@ def groupby(df, **kwargs):
         run_and_compare(groupby, data=self.data)
 
     @pytest.mark.parametrize("by", [["a"], ["a", "b", "c"]])
-    @pytest.mark.parametrize("agg", ["sum", "size", "mean"])
+    @pytest.mark.parametrize("agg", ["sum", "size", "mean", "median"])
     @pytest.mark.parametrize("as_index", [True, False])
     def test_groupby_agg_by_col(self, by, agg, as_index):
         def simple_agg(df, **kwargs):