talatuyarer commented on code in PR #34605: URL: https://github.com/apache/beam/pull/34605#discussion_r2038536835
########## sdks/python/apache_beam/transforms/sql_test.py: ########## @@ -209,6 +209,49 @@ def test_map(self): | SqlTransform("SELECT * FROM PCOLLECTION WHERE shopper = 'alice'")) assert_that(out, equal_to([('alice', {'apples': 2, 'bananas': 3})])) + def test_sql_transform_schema_parameter(self): + # Define the schema using the actual SqlTransformSchema + from apache_beam.transforms.sql import SqlTransformSchema + schema = SqlTransformSchema( + query="""SELECT + CAST(2 AS INT) AS `id`, + CAST('bar' AS VARCHAR) AS `str`, + CAST(1.618 AS DOUBLE) AS `flt`""", + dialect=None, + ddl=None Review Comment: @liferoad Could you also add a test case for DDL ? You can leverage exists test on Java: https://github.com/apache/beam/blob/46c3f26db916a92fd64719f89a87fc41ac9b40ea/sdks/java/extensions/sql/src/test/java/org/apache/beam/sdk/extensions/sql/impl/parser/BeamDDLTest.java#L47 -- 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: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org