You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/07/28 09:59:39 UTC

[GitHub] [beam] lifesucks6000 opened a new issue, #22486: [Bug]: java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String issue with Boolean field

lifesucks6000 opened a new issue, #22486:
URL: https://github.com/apache/beam/issues/22486

   ### What happened?
   
   **Beam version: 2.30**
   **Flink version: 1.12.5**
   
   When I tried to run my beam pipeline with **FlinkRunner**, I got this error -
   `java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String`
   
   Although when I ran it with beam **DirectRunner**, it ran fine with no error.
   
   The field type on which this issue is occurring is of **Boolean** type. While reading from SQLServer 2008 DB, a Boolean field is treated as **Logical** type field. Here we are building the schema with the help of this method - 
   
   `Schema.Field booleanField  = Schema.Field.nullable(name,Schema.FieldType.BOOLEAN);`
   
   I managed to find a work around for this error with a slight change in the way I was building my schema : 
   
   `Schema.Field booleanField = Schema.Field.nullable(name,Schema.FieldType.of(Schema.TypeName.BOOLEAN));`
   
   But shouldn't both of these code changes would have worked in the same way? The former has worked for me in previous versions.
   I think there is some compatibility issue with Apache Beam and FlinkRunner on Boolean data type
   
   ### Issue Priority
   
   Priority: 2
   
   ### Issue Component
   
   Component: runner-flink


-- 
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-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] kennknowles commented on issue #22486: [Bug]: java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String issue with Boolean field

Posted by GitBox <gi...@apache.org>.
kennknowles commented on issue #22486:
URL: https://github.com/apache/beam/issues/22486#issuecomment-1335957751

   Yes, or even a full stack trace so we know where this is occurring. But code to reproduce would be best if we are to address this.


-- 
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-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] je-ik commented on issue #22486: [Bug]: java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String issue with Boolean field

Posted by GitBox <gi...@apache.org>.
je-ik commented on issue #22486:
URL: https://github.com/apache/beam/issues/22486#issuecomment-1298217936

   Can you attach some simple code to reproduce this?


-- 
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-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org