Specifications for Row Counts in Contour

Hi, I’m experiencing a discrepancy in row counts between a chart and a pivot table in Contour, even though they are based on the same path and data.

Here are the details:

  • Data: 20 million rows table
  • Calculation: Counting rows for each of 10 partitions
  • Issue: The row counts differ between the chart and the pivot table, with discrepancies in the single digits

Could this be a system bug, or does Contour have any specifications regarding row count calculations, such as approximate calculation?

Non-determinism can occur when using certain functions. Take a look at the docs below to see if you have any of the operations mentioned that could lead to non-deterministic behavior:

Non-determinism in Contour

1 Like

Thank you for your advice.

Looking at my Contour processing, I realized there was an operation (array_agg) in an upstream step that could lead to non-deterministic behavior.
Given this, is it possible that the row counts calculated downstream could vary each time they are run?

I would follow the guide here to diagnose non-determinism and then modify the window function to see if you can order by something that will ensure that the code is running deterministically.

1 Like