KevinGG commented on a change in pull request #15647:
URL: https://github.com/apache/beam/pull/15647#discussion_r721807778
##########
File path: sdks/python/apache_beam/runners/interactive/sql/beam_sql_magics.py
##########
@@ -194,45 +220,72 @@ def beam_sql(self, line: str, cell: Optional[str] = None)
-> Optional[PValue]:
pcoll.element_type)
return
register_coder_for_schema(pcoll.element_type, verbose=verbose)
-
- output_name, output = apply_sql(query, output_name, found)
+ # Only care about schemas defined by the user in the main module.
+ if hasattr(main_session, pcoll.element_type.__name__):
+ schemas.add(pcoll.element_type)
+
+ if runner and runner != 'DirectRunner':
Review comment:
Let me switch the order of conditions to make it cleaner.
--
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]