luth2 commented on code in PR #45823:
URL: https://github.com/apache/superset/pull/45823#discussion_r4431521802


##########
superset/utils/pandas_postprocessing/pivot.py:
##########
@@ -404,8 +404,6 @@ def pivot(  # pylint: disable=too-many-arguments  # noqa: 
C901
         df = _apply_show_values_as(df, percent_mode)
 
     if combine_value_with_metric:
-        # dropna=False preserves restored all-NaN metric rows that would 
otherwise
-        # be silently dropped by stack's default dropna=True behavior.
-        df = df.stack(level=0, dropna=False).unstack()
+        df = df.stack(level=0, future_stack=True).unstack()

Review Comment:
   Validated as fixed; audit commit e8e1b5cf85. Pivot reshaping reorders 
existing MultiIndex column levels instead of stack/unstack, so absent 
metric/category pairs are not recreated. The complete pivot module, including 
drop_missing_columns regressions, passed on Python 3.11/pandas 3.0.6 and Python 
3.15/pandas 3.1.0.



##########
superset/utils/pandas_postprocessing/boxplot.py:
##########
@@ -135,7 +135,7 @@ def outliers(series: Series) -> set[float]:
     # nanpercentile needs numeric values, otherwise the isnan function
     # that's used in the underlying function will fail
     for column in metrics:
-        if is_object_dtype(df[column]):
-            df.loc[:, column] = to_numeric(df[column], errors="coerce")
+        if is_object_dtype(df[column]) or is_string_dtype(df[column]):
+            df[column] = to_numeric(df[column], errors="coerce")

Review Comment:
   Validated as fixed; audit commit e8e1b5cf85. Non-numeric metrics use 
to_numeric(errors="raise"); malformed values raise InvalidPostProcessingError 
instead of silently becoming NaN. The complete boxplot module passed on Python 
3.11/pandas 3.0.6 and Python 3.15/pandas 3.1.0.



##########
tests/unit_tests/db_engine_specs/test_databricks.py:
##########
@@ -151,6 +151,7 @@ def test_parameters_json_schema() -> None:
 
     assert json_schema == {
         "type": "object",
+        "additionalProperties": False,

Review Comment:
   Validated as fixed; audit commit e8e1b5cf85. Object and Dict expectations 
are derived from the installed MarshmallowPlugin converter in the Databricks, 
PostgreSQL and available-databases assertions. The Databricks schema unit test 
passed on both baselines. The existing PostgreSQL test_base_parameters_mixin 
assertion also passed in isolation with apispec 6.6.1 and 6.10.0. The 
available-databases assertion was inspected, not run as a full database 
integration test.



##########
Dockerfile:
##########
@@ -303,7 +303,8 @@ COPY requirements/base.txt requirements/
 COPY superset-core superset-core
 
 RUN --mount=type=cache,target=${SUPERSET_HOME}/.cache/uv \
-    /app/docker/pip-install.sh --requires-build-essential -r 
requirements/base.txt
+    --mount=type=bind,source=.,target=/src \

Review Comment:
   Validated as fixed; audit commit e8e1b5cf85. The lockfile install is in a 
separate RUN without a source bind mount and runs only before Python 3.15. The 
source-mounted metadata install is in its own subsequent RUN and runs only on 
Python 3.15+. Source edits therefore do not invalidate the earlier Python 3.11 
dependency-install layer. Both branches are exercised by 
test_docker_dependency_layers_preserve_legacy_cache; all 9 Docker contract 
tests pass. No full Docker build/cache benchmark is claimed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to