Code Monkey home page Code Monkey logo

calcite-join-issue's Introduction

Calcite DynamicRecordType join issue

https://issues.apache.org/jira/browse/CALCITE-6341

This repo demonstrate an issue with Calcite - using custom schema that has a table with DynamicRecordType will fail to join with another table, the generated code will not get compiled, as it will create this Comparator:

new java.util.Comparator(){
      public int compare(Object v0, Object v1) {
        final int c;
        c = org.apache.calcite.runtime.Utilities.compareNullsLastForMergeJoin((Comparable) v0, (Comparable) v1);
        if (c != 0) {
          return c;
        }
        return 0;
      }

      public int compare(Object o0, Object o1) {
        return this.compare(o0, o1);
      }

    }

The issue will only reproduce with Calcite 1.23 and above, and only with DynamicRecordType rowType.

To reproduce the issue, run the calcite.issue.Run.main() method. It will execute a few queries that works, and one that will fail.

calcite-join-issue's People

Contributors

yonatang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.