mistercrunch commented on issue #9314: fix: big number to handle NULL as it did in the past URL: https://github.com/apache/incubator-superset/pull/9314#issuecomment-599885216 Definitely was worth taking the time to write the unit test. Pandas is doing some funky things here in `pivot_table`. While clearly `np.isnan(np.sum(np.nan)) == True` `df.pivot_table({...}, aggfunc=np.sum)` of a column that has only `None` returns 0. Anyhow. This here works, I picked `np.min` as no aggregates apply (already at the right grain) and with `np.min` a `None` leads to `nan`, which works well in the end (same as before the original PR). I tested this same unit test on before this PR and it fails (as expected, with the `0` value in place of the `None/nan/NULL`), and tested on before the a commit prior to the PR that created the problem `753aeb482991f0dd3f36373f6d248ce277c67949` and this unit test passes. This gives pretty high confidence that `None` / `NULL` will be treated the same as before.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
