TheNeuralBit commented on a change in pull request #16615:
URL: https://github.com/apache/beam/pull/16615#discussion_r806077829



##########
File path: sdks/python/apache_beam/dataframe/transforms_test.py
##########
@@ -73,29 +74,52 @@ def df_equal_to(expected):
 
 
 class TransformTest(unittest.TestCase):
-  def run_scenario(self, input, func):
+  def run_scenario(self, input, func, check_subset=False):
+    """
+    In order for us to perform non-deferred operations, we have
+    to enumerate all possible categories, even if they are
+    unobserved. The default Pandas implementation on the other hand
+    does not produce unobserved columns. This means when conducting
+    tests, we need to account for the fact that the Beam result may
+    be a superset of that of the Pandas result.
+
+    When ``check_subset`` is set to ``True``, we will only
+    check that all of the columns in the Pandas implementation is
+    contained in that of the Beam implementation.

Review comment:
       I misspoke, a column wth all 0s is what I'd expect in the Beam result. 
So sorry I sent you on this wild goose chase




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


Reply via email to