[ https://issues.apache.org/jira/browse/BEAM-8307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rahul Patwari updated BEAM-8307: -------------------------------- Description: An exception is thrown when SqlTransform is used with JdbcIO. Schema of the Source Table: _CREATE TABLE actor (_ _actor_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,_ _first_name VARCHAR(45) NOT NULL,_ _last_name VARCHAR(45) NOT NULL,_ _last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,_ _PRIMARY KEY (actor_id),_ _KEY idx_actor_last_name (last_name)_ _)ENGINE=InnoDB DEFAULT CHARSET=utf8;_ Many of the Jdbc Types are converted to Logical_Types in Beam. Refer: [https://github.com/apache/beam/blob/113461a4275eb28a101e416897ccd607aa51f83f/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/SchemaUtil.java#L102] The initial observation is that this code: [https://github.com/apache/beam/blob/113461a4275eb28a101e416897ccd607aa51f83f/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/utils/CalciteUtils.java#L207] is returning null. PFA [^exception_sqlTransform.txt] was: An exception is thrown when SqlTransform is used with JdbcIO. Schema of the Source Table: _CREATE TABLE actor (_ _actor_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,_ _first_name VARCHAR(45) NOT NULL,_ _last_name VARCHAR(45) NOT NULL,_ _last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,_ _PRIMARY KEY (actor_id),_ _KEY idx_actor_last_name (last_name)_ _)ENGINE=InnoDB DEFAULT CHARSET=utf8;_ Many of the Jdbc Types are converted to Logical_Types in Beam. Refer: [https://github.com/apache/beam/blob/113461a4275eb28a101e416897ccd607aa51f83f/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/SchemaUtil.java#L102] The initial observation is that this code: [https://github.com/apache/beam/blob/113461a4275eb28a101e416897ccd607aa51f83f/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/utils/CalciteUtils.java#L207] is returning null. Exception StackTrace: PFA [^exception_sqlTransform.txt] > Support for Logical types introduced by JdbcIO Transform in SqlTransform > ------------------------------------------------------------------------ > > Key: BEAM-8307 > URL: https://issues.apache.org/jira/browse/BEAM-8307 > Project: Beam > Issue Type: Bug > Components: dsl-sql > Affects Versions: 2.15.0 > Reporter: Rahul Patwari > Assignee: Rahul Patwari > Priority: Major > Attachments: exception_sqlTransform.txt > > > An exception is thrown when SqlTransform is used with JdbcIO. > Schema of the Source Table: > _CREATE TABLE actor (_ > _actor_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,_ > _first_name VARCHAR(45) NOT NULL,_ > _last_name VARCHAR(45) NOT NULL,_ > _last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE > CURRENT_TIMESTAMP,_ > _PRIMARY KEY (actor_id),_ > _KEY idx_actor_last_name (last_name)_ > _)ENGINE=InnoDB DEFAULT CHARSET=utf8;_ > > Many of the Jdbc Types are converted to Logical_Types in Beam. > Refer: > [https://github.com/apache/beam/blob/113461a4275eb28a101e416897ccd607aa51f83f/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/SchemaUtil.java#L102] > The initial observation is that this code: > [https://github.com/apache/beam/blob/113461a4275eb28a101e416897ccd607aa51f83f/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/utils/CalciteUtils.java#L207] > is returning null. > > PFA [^exception_sqlTransform.txt] -- This message was sent by Atlassian Jira (v8.3.4#803005)