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

AssertionError in RexToLixTranslator comparing to date literal

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.9.0-incubating
    • None
    • None

    Description

      Query comparing a DATE column (based on a java.sql.Date in a reflective table) gives the following error.

      Caused by: java.lang.AssertionError: value 0 does not match type class java.sql.Date
      	at net.hydromatic.linq4j.expressions.ConstantExpression.<init>(ConstantExpression.java:47)
      	at net.hydromatic.linq4j.expressions.Expressions.constant(Expressions.java:569)
      	at net.hydromatic.optiq.rules.java.RexToLixTranslator.translateLiteral(RexToLixTranslator.java:509)
      	at net.hydromatic.optiq.rules.java.RexToLixTranslator.translate0(RexToLixTranslator.java:369)
      	at net.hydromatic.optiq.rules.java.RexToLixTranslator.translate(RexToLixTranslator.java:168)
      	at net.hydromatic.optiq.rules.java.RexToLixTranslator.translate0(RexToLixTranslator.java:364)
      	at net.hydromatic.optiq.rules.java.RexToLixTranslator.translate(RexToLixTranslator.java:168)
      	at net.hydromatic.optiq.rules.java.RexToLixTranslator.translate(RexToLixTranslator.java:163)
      	at net.hydromatic.optiq.rules.java.RexToLixTranslator.translateList(RexToLixTranslator.java:562)
      	at net.hydromatic.optiq.rules.java.RexToLixTranslator.translateList(RexToLixTranslator.java:535)
      	at net.hydromatic.optiq.rules.java.RexImpTable.implementCall(RexImpTable.java:666)
      	at net.hydromatic.optiq.rules.java.RexImpTable.implementNullSemantics(RexImpTable.java:656)
      	at net.hydromatic.optiq.rules.java.RexImpTable.implementNullSemantics0(RexImpTable.java:582)
      	at net.hydromatic.optiq.rules.java.RexImpTable.access$800(RexImpTable.java:56)
      	at net.hydromatic.optiq.rules.java.RexImpTable$2.implement(RexImpTable.java:264)
      	at net.hydromatic.optiq.rules.java.RexImpTable$CastOptimizedImplementor.implement(RexImpTable.java:1407)
      	at net.hydromatic.optiq.rules.java.RexToLixTranslator.translateCall(RexToLixTranslator.java:396)
      	at net.hydromatic.optiq.rules.java.RexToLixTranslator.translate0(RexToLixTranslator.java:381)
      	at net.hydromatic.optiq.rules.java.RexToLixTranslator.translate(RexToLixTranslator.java:168)
      	at net.hydromatic.optiq.rules.java.RexToLixTranslator.translate(RexToLixTranslator.java:163)
      	at net.hydromatic.optiq.rules.java.RexToLixTranslator.translateList(RexToLixTranslator.java:562)
      	at net.hydromatic.optiq.rules.java.RexToLixTranslator.translateList(RexToLixTranslator.java:535)
      	at net.hydromatic.optiq.rules.java.RexImpTable.implementCall(RexImpTable.java:666)
      	at net.hydromatic.optiq.rules.java.RexImpTable.implementNullSemantics(RexImpTable.java:633)
      	at net.hydromatic.optiq.rules.java.RexImpTable.implementNullSemantics0(RexImpTable.java:582)
      	at net.hydromatic.optiq.rules.java.RexImpTable.access$800(RexImpTable.java:56)
      	at net.hydromatic.optiq.rules.java.RexImpTable$2.implement(RexImpTable.java:264)
      	at net.hydromatic.optiq.rules.java.RexToLixTranslator.translateCall(RexToLixTranslator.java:396)
      	at net.hydromatic.optiq.rules.java.RexToLixTranslator.translate0(RexToLixTranslator.java:381)
      	at net.hydromatic.optiq.rules.java.RexToLixTranslator.translate(RexToLixTranslator.java:168)
      	at net.hydromatic.optiq.rules.java.RexToLixTranslator.translate0(RexToLixTranslator.java:364)
      	at net.hydromatic.optiq.rules.java.RexToLixTranslator.translate(RexToLixTranslator.java:168)
      	at net.hydromatic.optiq.rules.java.RexToLixTranslator.translate(RexToLixTranslator.java:157)
      	at net.hydromatic.optiq.rules.java.RexToLixTranslator.translateCondition(RexToLixTranslator.java:586)
      	at net.hydromatic.optiq.rules.java.JavaRules$EnumerableCalcRel.implement(JavaRules.java:700)
      	at net.hydromatic.optiq.rules.java.EnumerableRelImplementor.implementRoot(EnumerableRelImplementor.java:65)
      	at net.hydromatic.optiq.prepare.OptiqPrepareImpl$OptiqPreparingStmt.implement(OptiqPrepareImpl.java:754)
      	at net.hydromatic.optiq.prepare.Prepare.prepareSql(Prepare.java:293)
      

      Attachments

        Activity

          People

            julianhyde Julian Hyde
            julianhyde Julian Hyde
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: