You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Kenneth Knowles (Jira)" <ji...@apache.org> on 2022/01/12 03:50:04 UTC

[jira] [Updated] (BEAM-13269) Data exceeds database column capacity error while inserting in fixed length string column

     [ https://issues.apache.org/jira/browse/BEAM-13269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kenneth Knowles updated BEAM-13269:
-----------------------------------

This Jira ticket has a pull request attached to it, but is still open. Did the pull request resolve the issue? If so, could you please mark it resolved? This will help the project have a clear view of its open issues.

> Data exceeds database column capacity error while inserting in fixed length string column
> -----------------------------------------------------------------------------------------
>
>                 Key: BEAM-13269
>                 URL: https://issues.apache.org/jira/browse/BEAM-13269
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-jdbc
>    Affects Versions: 2.33.0
>            Reporter: Vitaly Ivanov
>            Assignee: Vitaly Ivanov
>            Priority: P1
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
>  
> The bug in org.apache.beam.sdk.io.jdbc.JdbcUtil#validateLogicalTypeLength
> {code:java}
> if (length >= maxLimit) {
>   throw new RuntimeException(
>       String.format(
>           "Length of Schema.Field[%s] data exceeds database column capacity",
>           field.getName()));
> }{code}
> Should be
> {code:java}
> if (length > maxLimit) { {code}
> How to reproduce:
>  * Create column with type VARCHAR(4).
>  * Try to insert "Test"
> ER: Success
> AR: Error "Length of Schema.Field[%s] data exceeds database column capacity"



--
This message was sent by Atlassian Jira
(v8.20.1#820001)