villebro commented on code in PR #40677:
URL: https://github.com/apache/superset/pull/40677#discussion_r3359369588
##########
superset/result_set.py:
##########
@@ -174,8 +174,13 @@ def __init__( # pylint: disable=too-many-locals # noqa:
C901
array = np.array(data, dtype=numpy_dtype)
for column in column_names:
+ raw = array[column].tolist()
+ if db_engine_spec.requires_column_value_normalization:
+ col_values = db_engine_spec.normalize_column_values(raw)
+ else:
+ col_values = raw
Review Comment:
Simplification (unless types change):
```suggestion
col_values = array[column].tolist()
if db_engine_spec.requires_column_value_normalization:
col_values =
db_engine_spec.normalize_column_values(col_values)
```
While we're at it, that variable named `array` is pretty unpythonic and
looks like a reserved keyword/built-in function or similar. Could we rename it
to something more descriptive, like `columns` to at least be a plural of the
later introduced `column`?
--
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]