[jira] [Commented] (BEAM-8307) NPE in Calcite dialect when input PCollection has logical type in schema, from JdbcIO Transform

2020-08-25 Thread Beam JIRA Bot (Jira)


[ 
https://issues.apache.org/jira/browse/BEAM-8307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17184354#comment-17184354
 ] 

Beam JIRA Bot commented on BEAM-8307:
-

This issue was marked "stale-P2" and has not received a public comment in 14 
days. It is now automatically moved to P3. If you are still affected by it, you 
can comment and move it back to P2.

> NPE in Calcite dialect when input PCollection has logical type in schema, 
> from JdbcIO Transform
> ---
>
> Key: BEAM-8307
> URL: https://issues.apache.org/jira/browse/BEAM-8307
> Project: Beam
>  Issue Type: Bug
>  Components: dsl-sql, io-java-jdbc
>Affects Versions: 2.15.0
>Reporter: Rahul Patwari
>Priority: P3
> Attachments: exception_sqlTransform.txt
>
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> 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)


[jira] [Commented] (BEAM-8307) NPE in Calcite dialect when input PCollection has logical type in schema, from JdbcIO Transform

2020-08-10 Thread Beam JIRA Bot (Jira)


[ 
https://issues.apache.org/jira/browse/BEAM-8307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17174641#comment-17174641
 ] 

Beam JIRA Bot commented on BEAM-8307:
-

This issue is P2 but has been unassigned without any comment for 60 days so it 
has been labeled "stale-P2". If this issue is still affecting you, we care! 
Please comment and remove the label. Otherwise, in 14 days the issue will be 
moved to P3.

Please see https://beam.apache.org/contribute/jira-priorities/ for a detailed 
explanation of what these priorities mean.


> NPE in Calcite dialect when input PCollection has logical type in schema, 
> from JdbcIO Transform
> ---
>
> Key: BEAM-8307
> URL: https://issues.apache.org/jira/browse/BEAM-8307
> Project: Beam
>  Issue Type: Bug
>  Components: dsl-sql, io-java-jdbc
>Affects Versions: 2.15.0
>Reporter: Rahul Patwari
>Priority: P2
>  Labels: stale-P2
> Attachments: exception_sqlTransform.txt
>
>  Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> 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)


[jira] [Commented] (BEAM-8307) NPE in Calcite dialect when input PCollection has logical type in schema, from JdbcIO Transform

2020-06-10 Thread Beam JIRA Bot (Jira)


[ 
https://issues.apache.org/jira/browse/BEAM-8307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17131223#comment-17131223
 ] 

Beam JIRA Bot commented on BEAM-8307:
-

This issue was marked "stale-assigned" and has not received a public comment in 
7 days. It is now automatically unassigned. If you are still working on it, you 
can assign it to yourself again. Please also give an update about the status of 
the work.

> NPE in Calcite dialect when input PCollection has logical type in schema, 
> from JdbcIO Transform
> ---
>
> Key: BEAM-8307
> URL: https://issues.apache.org/jira/browse/BEAM-8307
> Project: Beam
>  Issue Type: Bug
>  Components: dsl-sql, io-java-jdbc
>Affects Versions: 2.15.0
>Reporter: Rahul Patwari
>Priority: P2
> Attachments: exception_sqlTransform.txt
>
>  Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> 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)


[jira] [Commented] (BEAM-8307) NPE in Calcite dialect when input PCollection has logical type in schema, from JdbcIO Transform

2020-06-01 Thread Kenneth Knowles (Jira)


[ 
https://issues.apache.org/jira/browse/BEAM-8307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17121873#comment-17121873
 ] 

Kenneth Knowles commented on BEAM-8307:
---

This issue is assigned but has not received an update in 30 days so it has been 
labeled "stale-assigned". If you are still working on the issue, please give an 
update and remove the label. If you are no longer working on the issue, please 
unassign so someone else may work on it. In 7 days the issue will be 
automatically unassigned.

> NPE in Calcite dialect when input PCollection has logical type in schema, 
> from JdbcIO Transform
> ---
>
> Key: BEAM-8307
> URL: https://issues.apache.org/jira/browse/BEAM-8307
> Project: Beam
>  Issue Type: Bug
>  Components: dsl-sql, io-java-jdbc
>Affects Versions: 2.15.0
>Reporter: Rahul Patwari
>Assignee: Rahul Patwari
>Priority: P2
>  Labels: stale-assigned
> Attachments: exception_sqlTransform.txt
>
>  Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> 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)


[jira] [Commented] (BEAM-8307) NPE in Calcite dialect when input PCollection has logical type in schema, from JdbcIO Transform

2020-03-25 Thread Rahul Patwari (Jira)


[ 
https://issues.apache.org/jira/browse/BEAM-8307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17066902#comment-17066902
 ] 

Rahul Patwari commented on BEAM-8307:
-

Hi [~kenn] ,

I am interested to contribute the fix.

I think we should expose a general API to convert Beam Types to Calcite Types, 
as this issue can occur for IOs other than JdbcIO. If we do this, then any user 
defined logical type can be used in the BeamSql query.

What can be a better way of resolving this bug, in general, for any IO?

> NPE in Calcite dialect when input PCollection has logical type in schema, 
> from JdbcIO Transform
> ---
>
> Key: BEAM-8307
> URL: https://issues.apache.org/jira/browse/BEAM-8307
> Project: Beam
>  Issue Type: Bug
>  Components: dsl-sql, io-java-jdbc
>Affects Versions: 2.15.0
>Reporter: Rahul Patwari
>Assignee: Kishor Joshi
>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)


[jira] [Commented] (BEAM-8307) NPE in Calcite dialect when input PCollection has logical type in schema, from JdbcIO Transform

2020-03-25 Thread Kenneth Knowles (Jira)


[ 
https://issues.apache.org/jira/browse/BEAM-8307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17066881#comment-17066881
 ] 

Kenneth Knowles commented on BEAM-8307:
---

Working on this? If not, we can unassign and let someone else pick up the work.

> NPE in Calcite dialect when input PCollection has logical type in schema, 
> from JdbcIO Transform
> ---
>
> Key: BEAM-8307
> URL: https://issues.apache.org/jira/browse/BEAM-8307
> Project: Beam
>  Issue Type: Bug
>  Components: dsl-sql, io-java-jdbc
>Affects Versions: 2.15.0
>Reporter: Rahul Patwari
>Assignee: Kishor Joshi
>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)