Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-5620

DruidQuery can not work with RelJson

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.34.0
    • None
    • core, druid-adapter
    • None

    Description

      DruidQuery put intervals property to items in explainTerms function. But RelJson not support serializable Interval type.

      @Override public RelWriter explainTerms(RelWriter pw) {
        for (RelNode rel : rels) {
          if (rel instanceof TableScan) {
            TableScan tableScan = (TableScan) rel;
            pw.item("table", tableScan.getTable().getQualifiedName());
            pw.item("intervals", intervals); 
      java.lang.UnsupportedOperationException: type not serializable: 1900-01-09T00:00:00.000Z/2992-01-10T00:00:00.000Z (type org.joda.time.Interval)
          at org.apache.calcite.rel.externalize.RelJson.toJson(RelJson.java:465)
          at org.apache.calcite.rel.externalize.RelJson.toJson(RelJson.java:444)
          at org.apache.calcite.rel.externalize.RelJsonWriter.put(RelJsonWriter.java:102)
          at org.apache.calcite.rel.externalize.RelJsonWriter.explain_(RelJsonWriter.java:85)
          at org.apache.calcite.rel.externalize.RelJsonWriter.done(RelJsonWriter.java:135)
          at org.apache.calcite.rel.AbstractRelNode.explain(AbstractRelNode.java:251)
          at org.apache.calcite.plan.RelOptUtil.dumpPlan(RelOptUtil.java:2105)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              zongxing.li zongxing.li
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: