You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/02/17 13:53:51 UTC

[GitHub] [superset] zhaoyongjie opened a new pull request #18782: fix: contribution operator meets nan value

zhaoyongjie opened a new pull request #18782:
URL: https://github.com/apache/superset/pull/18782


   ### SUMMARY
   1. fix: when `NaN` value in contribution operator can't calculate.
   2. add unit test to guarantee `nan` value in contribution.
   
   closes: https://github.com/apache/superset/issues/18774
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### After
   <img width="1445" alt="image" src="https://user-images.githubusercontent.com/2016594/154427809-1e454ab1-2970-4152-a2db-744559bd23c2.png">
   
   ### Before
   <img width="1442" alt="image" src="https://user-images.githubusercontent.com/2016594/154428018-51ff5a3c-e143-4a0d-b039-4ec490d7cd5c.png">
   
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   1. Select **birth_name** as datasource
   2. Select **Line Chart** on explore page. notice that, use **echart** version of Line Chart
   3. Drag `ds` in **x-axis**
   4. Select `sum(num_boys)` in **metrics**
   5. Drag `name` in **group by**
   6. Select `total` in **contribution mode**
   7. You can look at a line chart as before screenshort.
   
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue: https://github.com/apache/superset/issues/18774
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #18782: fix: contribution operator meets nan value

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #18782:
URL: https://github.com/apache/superset/pull/18782#issuecomment-1042996135


   # [Codecov](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#18782](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (48c7006) into [master](https://codecov.io/gh/apache/superset/commit/30a9d14639fe3072a7886ac201777e62077e532a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (30a9d14) will **decrease** coverage by `0.16%`.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head 48c7006 differs from pull request most recent head 0a89166. Consider uploading reports for the commit 0a89166 to get more accurate results
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/18782/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #18782      +/-   ##
   ==========================================
   - Coverage   66.32%   66.15%   -0.17%     
   ==========================================
     Files        1620     1620              
     Lines       63087    63092       +5     
     Branches     6372     6372              
   ==========================================
   - Hits        41840    41738     -102     
   - Misses      19590    19697     +107     
     Partials     1657     1657              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `?` | |
   | mysql | `81.43% <100.00%> (+<0.01%)` | :arrow_up: |
   | postgres | `81.47% <100.00%> (+<0.01%)` | :arrow_up: |
   | presto | `?` | |
   | python | `81.56% <100.00%> (-0.35%)` | :arrow_down: |
   | sqlite | `81.16% <100.00%> (+<0.01%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [superset/common/query\_object.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY29tbW9uL3F1ZXJ5X29iamVjdC5weQ==) | `95.67% <100.00%> (+0.04%)` | :arrow_up: |
   | [...perset/utils/pandas\_postprocessing/contribution.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvcGFuZGFzX3Bvc3Rwcm9jZXNzaW5nL2NvbnRyaWJ1dGlvbi5weQ==) | `100.00% <100.00%> (ø)` | |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.19%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `70.27% <0.00%> (-15.45%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `83.47% <0.00%> (-5.65%)` | :arrow_down: |
   | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `87.33% <0.00%> (-1.44%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `88.38% <0.00%> (-0.37%)` | :arrow_down: |
   | [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.86% <0.00%> (-0.25%)` | :arrow_down: |
   | [superset/utils/core.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `90.15% <0.00%> (-0.13%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [30a9d14...0a89166](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie commented on pull request #18782: fix: contribution operator meets nan value

Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on pull request #18782:
URL: https://github.com/apache/superset/pull/18782#issuecomment-1044594731


   > LGTM with a non-blocking comment to think about (as this PR fixes a clear bug I consider my comment mostly a nit). Also, an unrelated observation: I wonder if we should rename "Total" to something that describes more clearly that it's actually the "row" or "x-axis" that we're calculating the contribution for, not the "total", which I feel would be calculated in relation to the sum of the matrix. <img alt="image" width="316" src="https://user-images.githubusercontent.com/33317356/154644101-ca1c15d7-6f31-410b-a7ae-36de05737311.png">
   
   nice catch! done!


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie commented on a change in pull request #18782: fix: contribution operator meets nan value

Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on a change in pull request #18782:
URL: https://github.com/apache/superset/pull/18782#discussion_r809088951



##########
File path: superset/utils/pandas_postprocessing/contribution.py
##########
@@ -71,5 +73,7 @@ def contribution(
     numeric_df = numeric_df[columns]
     axis = 0 if orientation == PostProcessingContributionOrientation.COLUMN else 1
     numeric_df = numeric_df / numeric_df.values.sum(axis=axis, keepdims=True)
+    # replace infinity and nan with 0 in dataframe
+    numeric_df.replace(to_replace=[np.Inf, -np.Inf, np.nan], value=0, inplace=True)

Review comment:
       There is a Dateframe like above:
   
   ```
       __timestamp      a      b     c
   0 2020-07-16 14:49:00  1.0  1.0 NaN
   1 2020-07-16 14:50:00  3.0  9.0 NaN
   2 2020-07-16 14:51:00  NaN  NaN NaN
   ```
   
   The df will be transformation like following after run `contribution`:
   
   ```
   contribution(
       df, orientation=PostProcessingContributionOrientation.ROW,
   )
   
   __timestamp     a     b    c
   0 2020-07-16 14:49:00  0.50  0.50  0.0
   1 2020-07-16 14:50:00  0.25  0.75  0.0
   2 2020-07-16 14:51:00  0.00  0.00  0.0
   ```
   
   In the other hand, If we didn't replace the `nan` and `inf` values, the row of `2020-07-16` will be filled out nan in every cell, **but**  cell of `row: 2020-07-16 column: c ` have be filled in **0**.
   
   ```
              __timestamp     a     b    c
   0 2020-07-16 14:49:00  0.50  0.50  0.0
   1 2020-07-16 14:50:00  0.25  0.75  0.0
   2 2020-07-16 14:51:00   NaN   NaN  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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie commented on a change in pull request #18782: fix: contribution operator meets nan value

Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on a change in pull request #18782:
URL: https://github.com/apache/superset/pull/18782#discussion_r809088951



##########
File path: superset/utils/pandas_postprocessing/contribution.py
##########
@@ -71,5 +73,7 @@ def contribution(
     numeric_df = numeric_df[columns]
     axis = 0 if orientation == PostProcessingContributionOrientation.COLUMN else 1
     numeric_df = numeric_df / numeric_df.values.sum(axis=axis, keepdims=True)
+    # replace infinity and nan with 0 in dataframe
+    numeric_df.replace(to_replace=[np.Inf, -np.Inf, np.nan], value=0, inplace=True)

Review comment:
       Hi @villebro, this is for you ask in last [PR](https://github.com/apache/superset/pull/18779#discussion_r808829855) 😄
   
   There is a Dateframe like above:
   
   ```
       __timestamp      a      b     c
   0 2020-07-16 14:49:00  1.0  1.0 NaN
   1 2020-07-16 14:50:00  3.0  9.0 NaN
   2 2020-07-16 14:51:00  NaN  NaN NaN
   ```
   
   The df will be transformation like following after run `contribution`:
   
   ```
   contribution(
       df, orientation=PostProcessingContributionOrientation.ROW,
   )
   
   __timestamp     a     b    c
   0 2020-07-16 14:49:00  0.50  0.50  0.0
   1 2020-07-16 14:50:00  0.25  0.75  0.0
   2 2020-07-16 14:51:00  0.00  0.00  0.0
   ```
   
   In the other hand, If we didn't replace the `nan` and `inf` values, the row of `2020-07-16` will be filled out nan in every cell, **but**  cell of `row: 2020-07-16 column: c ` have be filled in **0**.
   
   So I'm filling `inf`, `nan` with 0 here
   
   ```
              __timestamp     a     b    c
   0 2020-07-16 14:49:00  0.50  0.50  0.0
   1 2020-07-16 14:50:00  0.25  0.75  0.0
   2 2020-07-16 14:51:00   NaN   NaN  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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro commented on a change in pull request #18782: fix: contribution operator meets nan value

Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #18782:
URL: https://github.com/apache/superset/pull/18782#discussion_r809763411



##########
File path: superset/utils/pandas_postprocessing/contribution.py
##########
@@ -71,5 +73,7 @@ def contribution(
     numeric_df = numeric_df[columns]
     axis = 0 if orientation == PostProcessingContributionOrientation.COLUMN else 1
     numeric_df = numeric_df / numeric_df.values.sum(axis=axis, keepdims=True)
+    # replace infinity and nan with 0 in dataframe
+    numeric_df.replace(to_replace=[np.Inf, -np.Inf, np.nan], value=0, inplace=True)

Review comment:
       Thanks for the explanation! This is mostly a nit, but please hear me out 😆 I agree that we need to fill nulls with zeros before doing the contribution calculation, but strictly mathematically speaking, after we've done the contribution calculation, I think leaving the infinite values as null seems more appropriate. In the example, I feel this should be the correct result for ROW level contribution, as there strictly speaking isn't anything to contribute to:
   
   ```
              __timestamp     a     b    c
   0 2020-07-16 14:49:00  0.50  0.50  0.0
   1 2020-07-16 14:50:00  0.25  0.75  0.0
   2 2020-07-16 14:51:00   NaN   NaN  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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie commented on a change in pull request #18782: fix: contribution operator meets nan value

Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on a change in pull request #18782:
URL: https://github.com/apache/superset/pull/18782#discussion_r809807039



##########
File path: superset/utils/pandas_postprocessing/contribution.py
##########
@@ -71,5 +73,7 @@ def contribution(
     numeric_df = numeric_df[columns]
     axis = 0 if orientation == PostProcessingContributionOrientation.COLUMN else 1
     numeric_df = numeric_df / numeric_df.values.sum(axis=axis, keepdims=True)
+    # replace infinity and nan with 0 in dataframe
+    numeric_df.replace(to_replace=[np.Inf, -np.Inf, np.nan], value=0, inplace=True)

Review comment:
       Oh! Thanks for the explanation. It makes sense. Updaing......

##########
File path: superset/utils/pandas_postprocessing/contribution.py
##########
@@ -71,5 +73,7 @@ def contribution(
     numeric_df = numeric_df[columns]
     axis = 0 if orientation == PostProcessingContributionOrientation.COLUMN else 1
     numeric_df = numeric_df / numeric_df.values.sum(axis=axis, keepdims=True)
+    # replace infinity and nan with 0 in dataframe
+    numeric_df.replace(to_replace=[np.Inf, -np.Inf, np.nan], value=0, inplace=True)

Review comment:
       Oh! Thanks for the explanation. It makes sense. Updating......




-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie edited a comment on pull request #18782: fix: contribution operator meets nan value

Posted by GitBox <gi...@apache.org>.
zhaoyongjie edited a comment on pull request #18782:
URL: https://github.com/apache/superset/pull/18782#issuecomment-1044594731


   > LGTM with a non-blocking comment to think about (as this PR fixes a clear bug I consider my comment mostly a nit). Also, an unrelated observation: I wonder if we should rename "Total" to something that describes more clearly that it's actually the "row" or "x-axis" that we're calculating the contribution for, not the "total", which I feel would be calculated in relation to the sum of the matrix. <img alt="image" width="316" src="https://user-images.githubusercontent.com/33317356/154644101-ca1c15d7-6f31-410b-a7ae-36de05737311.png">
   
   nice catch! done!
   
   <img width="719" alt="image" src="https://user-images.githubusercontent.com/2016594/154699002-85a905cd-3a06-4cb4-90ba-80b01339b9e4.png">
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #18782: fix: contribution operator meets nan value

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #18782:
URL: https://github.com/apache/superset/pull/18782#issuecomment-1042996135


   # [Codecov](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#18782](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (48c7006) into [master](https://codecov.io/gh/apache/superset/commit/30a9d14639fe3072a7886ac201777e62077e532a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (30a9d14) will **decrease** coverage by `0.16%`.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head 48c7006 differs from pull request most recent head f8e8f73. Consider uploading reports for the commit f8e8f73 to get more accurate results
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/18782/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #18782      +/-   ##
   ==========================================
   - Coverage   66.32%   66.15%   -0.17%     
   ==========================================
     Files        1620     1620              
     Lines       63087    63092       +5     
     Branches     6372     6372              
   ==========================================
   - Hits        41840    41738     -102     
   - Misses      19590    19697     +107     
     Partials     1657     1657              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `?` | |
   | mysql | `81.43% <100.00%> (+<0.01%)` | :arrow_up: |
   | postgres | `81.47% <100.00%> (+<0.01%)` | :arrow_up: |
   | presto | `?` | |
   | python | `81.56% <100.00%> (-0.35%)` | :arrow_down: |
   | sqlite | `81.16% <100.00%> (+<0.01%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [superset/common/query\_object.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY29tbW9uL3F1ZXJ5X29iamVjdC5weQ==) | `95.67% <100.00%> (+0.04%)` | :arrow_up: |
   | [...perset/utils/pandas\_postprocessing/contribution.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvcGFuZGFzX3Bvc3Rwcm9jZXNzaW5nL2NvbnRyaWJ1dGlvbi5weQ==) | `100.00% <100.00%> (ø)` | |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.19%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `70.27% <0.00%> (-15.45%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `83.47% <0.00%> (-5.65%)` | :arrow_down: |
   | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `87.33% <0.00%> (-1.44%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `88.38% <0.00%> (-0.37%)` | :arrow_down: |
   | [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.86% <0.00%> (-0.25%)` | :arrow_down: |
   | [superset/utils/core.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `90.15% <0.00%> (-0.13%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [30a9d14...f8e8f73](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #18782: fix: contribution operator meets nan value

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #18782:
URL: https://github.com/apache/superset/pull/18782#issuecomment-1042996135


   # [Codecov](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#18782](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (48c7006) into [master](https://codecov.io/gh/apache/superset/commit/30a9d14639fe3072a7886ac201777e62077e532a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (30a9d14) will **decrease** coverage by `0.16%`.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head 48c7006 differs from pull request most recent head 320790d. Consider uploading reports for the commit 320790d to get more accurate results
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/18782/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #18782      +/-   ##
   ==========================================
   - Coverage   66.32%   66.15%   -0.17%     
   ==========================================
     Files        1620     1620              
     Lines       63087    63092       +5     
     Branches     6372     6372              
   ==========================================
   - Hits        41840    41738     -102     
   - Misses      19590    19697     +107     
     Partials     1657     1657              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `?` | |
   | mysql | `81.43% <100.00%> (+<0.01%)` | :arrow_up: |
   | postgres | `81.47% <100.00%> (+<0.01%)` | :arrow_up: |
   | presto | `?` | |
   | python | `81.56% <100.00%> (-0.35%)` | :arrow_down: |
   | sqlite | `81.16% <100.00%> (+<0.01%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [superset/common/query\_object.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY29tbW9uL3F1ZXJ5X29iamVjdC5weQ==) | `95.67% <100.00%> (+0.04%)` | :arrow_up: |
   | [...perset/utils/pandas\_postprocessing/contribution.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvcGFuZGFzX3Bvc3Rwcm9jZXNzaW5nL2NvbnRyaWJ1dGlvbi5weQ==) | `100.00% <100.00%> (ø)` | |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.19%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `70.27% <0.00%> (-15.45%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `83.47% <0.00%> (-5.65%)` | :arrow_down: |
   | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `87.33% <0.00%> (-1.44%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `88.38% <0.00%> (-0.37%)` | :arrow_down: |
   | [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.86% <0.00%> (-0.25%)` | :arrow_down: |
   | [superset/utils/core.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `90.15% <0.00%> (-0.13%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [30a9d14...320790d](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie merged pull request #18782: fix: contribution operator meets nan value

Posted by GitBox <gi...@apache.org>.
zhaoyongjie merged pull request #18782:
URL: https://github.com/apache/superset/pull/18782


   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] commented on pull request #18782: fix: contribution operator meets nan value

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #18782:
URL: https://github.com/apache/superset/pull/18782#issuecomment-1042996135


   # [Codecov](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#18782](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (48c7006) into [master](https://codecov.io/gh/apache/superset/commit/30a9d14639fe3072a7886ac201777e62077e532a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (30a9d14) will **decrease** coverage by `0.18%`.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head 48c7006 differs from pull request most recent head 0a89166. Consider uploading reports for the commit 0a89166 to get more accurate results
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/18782/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #18782      +/-   ##
   ==========================================
   - Coverage   66.32%   66.13%   -0.19%     
   ==========================================
     Files        1620     1620              
     Lines       63087    63092       +5     
     Branches     6372     6372              
   ==========================================
   - Hits        41840    41725     -115     
   - Misses      19590    19710     +120     
     Partials     1657     1657              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `?` | |
   | mysql | `?` | |
   | postgres | `81.47% <100.00%> (+<0.01%)` | :arrow_up: |
   | presto | `?` | |
   | python | `81.52% <100.00%> (-0.39%)` | :arrow_down: |
   | sqlite | `81.16% <100.00%> (+<0.01%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [superset/common/query\_object.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY29tbW9uL3F1ZXJ5X29iamVjdC5weQ==) | `95.67% <100.00%> (+0.04%)` | :arrow_up: |
   | [...perset/utils/pandas\_postprocessing/contribution.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvcGFuZGFzX3Bvc3Rwcm9jZXNzaW5nL2NvbnRyaWJ1dGlvbi5weQ==) | `100.00% <100.00%> (ø)` | |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.19%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `70.27% <0.00%> (-15.45%)` | :arrow_down: |
   | [superset/common/utils/dataframe\_utils.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY29tbW9uL3V0aWxzL2RhdGFmcmFtZV91dGlscy5weQ==) | `85.71% <0.00%> (-7.15%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `83.47% <0.00%> (-5.65%)` | :arrow_down: |
   | [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `93.97% <0.00%> (-3.62%)` | :arrow_down: |
   | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `87.33% <0.00%> (-1.44%)` | :arrow_down: |
   | [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.13% <0.00%> (-0.97%)` | :arrow_down: |
   | [superset/views/core.py](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `77.00% <0.00%> (-0.45%)` | :arrow_down: |
   | ... and [2 more](https://codecov.io/gh/apache/superset/pull/18782/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [30a9d14...0a89166](https://codecov.io/gh/apache/superset/pull/18782?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie commented on a change in pull request #18782: fix: contribution operator meets nan value

Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on a change in pull request #18782:
URL: https://github.com/apache/superset/pull/18782#discussion_r809088951



##########
File path: superset/utils/pandas_postprocessing/contribution.py
##########
@@ -71,5 +73,7 @@ def contribution(
     numeric_df = numeric_df[columns]
     axis = 0 if orientation == PostProcessingContributionOrientation.COLUMN else 1
     numeric_df = numeric_df / numeric_df.values.sum(axis=axis, keepdims=True)
+    # replace infinity and nan with 0 in dataframe
+    numeric_df.replace(to_replace=[np.Inf, -np.Inf, np.nan], value=0, inplace=True)

Review comment:
       Hi @villebro, this is for you ask in last [PR](https://github.com/apache/superset/pull/18779#discussion_r808829855) 😄
   
   There is a Dateframe like this:
   
   ```
       __timestamp      a      b     c
   0 2020-07-16 14:49:00  1.0  1.0 NaN
   1 2020-07-16 14:50:00  3.0  9.0 NaN
   2 2020-07-16 14:51:00  NaN  NaN NaN
   ```
   
   The df will be transformation like following after run `contribution`:
   
   ```
   contribution(
       df, orientation=PostProcessingContributionOrientation.ROW,
   )
   
   __timestamp     a     b    c
   0 2020-07-16 14:49:00  0.50  0.50  0.0
   1 2020-07-16 14:50:00  0.25  0.75  0.0
   2 2020-07-16 14:51:00  0.00  0.00  0.0
   ```
   
   In the other hand, If we didn't replace the `nan` and `inf` values, the row of `2020-07-16` will be filled out nan in every cell, **but**  cell of `row: 2020-07-16 column: c ` have be filled in **0**.
   
   So I'm filling `inf`, `nan` with 0 here
   
   ```
              __timestamp     a     b    c
   0 2020-07-16 14:49:00  0.50  0.50  0.0
   1 2020-07-16 14:50:00  0.25  0.75  0.0
   2 2020-07-16 14:51:00   NaN   NaN  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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie commented on a change in pull request #18782: fix: contribution operator meets nan value

Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on a change in pull request #18782:
URL: https://github.com/apache/superset/pull/18782#discussion_r809074376



##########
File path: superset/common/query_object.py
##########
@@ -395,6 +396,7 @@ def exec_post_processing(self, df: DataFrame) -> DataFrame:
         :raises QueryObjectValidationError: If the post processing operation
                  is incorrect
         """
+        logger.debug("post_processing: %s", pformat(self.post_processing))

Review comment:
       logging post-processing when logger set to debug level.




-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org