You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jesus Camacho Rodriguez (JIRA)" <ji...@apache.org> on 2018/11/28 19:58:00 UTC
[jira] [Commented] (CALCITE-2713) JDBC adapter may generate casts
on PostgreSQL for VARCHAR type exceeding max length
[ https://issues.apache.org/jira/browse/CALCITE-2713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16702337#comment-16702337 ]
Jesus Camacho Rodriguez commented on CALCITE-2713:
--------------------------------------------------
I cannot execute the tests that I added on postgresql version in calcite-test-dataset, I am getting an exception:
{noformat}
[ERROR] testCastLongVarchar1(org.apache.calcite.test.JdbcAdapterTest) Time elapsed: 1.367 s <<< ERROR!
java.lang.AbstractMethodError: org.postgresql.jdbc3g.Jdbc3gConnection.isValid(I)Z
at org.apache.calcite.test.JdbcAdapterTest.testCastLongVarchar1(JdbcAdapterTest.java:496)
{noformat}
[~julianhyde], [~chris-baynes], had you seen this before? I tried changing the driver version to jdbc4, still seeing same issue.
> JDBC adapter may generate casts on PostgreSQL for VARCHAR type exceeding max length
> -----------------------------------------------------------------------------------
>
> Key: CALCITE-2713
> URL: https://issues.apache.org/jira/browse/CALCITE-2713
> Project: Calcite
> Issue Type: Bug
> Components: jdbc-adapter
> Reporter: Jesus Camacho Rodriguez
> Assignee: Jesus Camacho Rodriguez
> Priority: Major
>
> Varchar length in PostgreSQL cannot exceed 10485760, however Calcite may generate a cast with length larger than that number, resulting in an exception.
> {noformat}
> org.postgresql.util.PSQLException: ERROR: length for type varchar cannot exceed 10485760
> {noformat}
> From {{htup_details.h}} in postgresql:
> {noformat}
> * MaxAttrSize is a somewhat arbitrary upper limit on the declared size of
> * data fields of char(n) and similar types. It need not have anything
> * directly to do with the *actual* upper limit of varlena values, which
> * is currently 1Gb (see TOAST structures in postgres.h). I've set it
> * at 10Mb which seems like a reasonable number --- tgl 8/6/00. */
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)