You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Kai Jiang (Jira)" <ji...@apache.org> on 2020/01/10 10:42:00 UTC

[jira] [Comment Edited] (BEAM-8331) Vendored calcite breaks if another calcite is on the class path

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

Kai Jiang edited comment on BEAM-8331 at 1/10/20 10:41 AM:
-----------------------------------------------------------

I have built a vendored calcite with rewriting jdbc url locally. However,  I have tested the issue mentioned BEAM-3386. (ran a Beam SQL job on Spark runner)

Vendored calcite with rewriting JDBC url or without rewriting JDBC url both works for Beam SQL job on Spark runner. (ran successfully)

 

[~apilloud] Would you mind sharing how to reproduce this issue in your case? so that I can validate vendored calcite with rewriting jdbc url.


was (Author: vectorijk):
I have built a vendored calcite with rewriting jdbc url locally. However,  I have tested the issue mentioned BEAM-3386. (ran a Beam SQL job on Spark runner)

Vendored calcite with rewriting JDBC url or without rewriting JDBC url both works for Beam SQL job on Spark runner

 

[~apilloud] Would you mind sharing how to reproduce this issue in your case? so that I can validate vendored calcite with rewriting jdbc url.

> Vendored calcite breaks if another calcite is on the class path
> ---------------------------------------------------------------
>
>                 Key: BEAM-8331
>                 URL: https://issues.apache.org/jira/browse/BEAM-8331
>             Project: Beam
>          Issue Type: Bug
>          Components: dsl-sql
>    Affects Versions: 2.15.0, 2.16.0
>            Reporter: Andrew Pilloud
>            Assignee: Kai Jiang
>            Priority: Major
>
> If the beam vendored calcite and a non-vendored calcite are both on the classpath, neither version works. This is because the non-JDBC calcite path uses JDBC as a easy way to perform reflection. (This affects the non-JDBC version of calcite.) We need to rewrite the calcite JDBC urls as part of our vendoring (for example 'jdbc:calcite:' to 'jdbc:beam-vendor-calcite:'). Example of where this happens: [https://github.com/apache/calcite/blob/0cce229903a845a7b8ed36cf86d6078fd82d73d3/core/src/main/java/org/apache/calcite/tools/Frameworks.java#L175]
>  
> {code:java}
> java.lang.RuntimeException: java.lang.RuntimeException: Property 'org.apache.beam.sdk.extensions.sql.impl.planner.BeamRelDataTypeSystem' not valid for plugin type org.apache.calcite.rel.type.RelDataTypeSystem
> 	at org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:160)
> 	at org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:115)
> 	at org.apache.beam.sdk.extensions.sql.zetasql.ZetaSQLPlannerImpl.<init>(ZetaSQLPlannerImpl.java:86)
> 	at org.apache.beam.sdk.extensions.sql.zetasql.ZetaSQLQueryPlanner.<init>(ZetaSQLQueryPlanner.java:55){code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)