aminghadersohi commented on code in PR #44739:
URL: https://github.com/apache/superset/pull/44739#discussion_r4151134440


##########
superset/commands/sql_lab/export.py:
##########
@@ -140,6 +141,12 @@ def run(
                 self._query.schema,
             )[:limit]
 
+        # Preserve exact decimals without scientific notation in CSV output.
+        for name, column in df.items():
+            for label, value in column.items():
+                if isinstance(value, Decimal) and value.is_finite():
+                    df.at[label, name] = format(value, "f")

Review Comment:
   Fixed in e1fb34cd87. Moved formatting into a helper using per-column 
Series.map for object columns containing finite Decimals, with the scalar 
formatter shared by streaming export. Mixed-frame tests pin identical CSV bytes 
and preserve numeric columns, None, and Decimal NaN.



-- 
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