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

DruidDateTimeUtils.literalValue: ClassCastException org.apache.calcite.util.NlsString cannot be cast to java.util.Calendar

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: None
    • Fix Version/s: 1.12.0
    • Component/s: druid-adapter
    • Labels:
      None

      Description

      Hit this when testing Hive against 1.12-SNAPSHOT.

      EXPLAIN
      SELECT `__time`
      FROM druid_table_1
      WHERE `__time` BETWEEN '2010-01-01 00:00:00' AND '2011-01-01 00:00:00'
      
      FAILED: ClassCastException org.apache.calcite.util.NlsString cannot be cast to java.util.Calendar$
       
      Thread [788b959f-16ae-47ba-9c88-a74e2843eaf2 main] (Suspended (exception ClassCastException))    
                      DruidDateTimeUtils.literalValue(RexNode) line: 247              
                      DruidDateTimeUtils.leafToRanges(RexCall, boolean) line: 207             
                      DruidDateTimeUtils.extractRanges(RexNode, boolean) line: 120       
                      DruidDateTimeUtils.createInterval(RelDataType, RexNode) line: 65 
                      DruidRules$DruidFilterRule.onMatch(RelOptRuleCall) line: 129          
                      HepPlanner(AbstractRelOptPlanner).fireRule(RelOptRuleCall) line: 316           
                      HepPlanner.applyRule(RelOptRule, HepRelVertex, boolean) line: 506               
                      HepPlanner.applyRules(Collection<RelOptRule>, boolean) line: 385   
                      HepPlanner.executeInstruction(HepInstruction$RuleInstance) line: 251          
                      HepInstruction$RuleInstance.execute(HepPlanner) line: 125              
                      HepPlanner.executeProgram(HepProgram) line: 210             
                      HepPlanner.findBestExp() line: 197              
                      CalcitePlanner$CalcitePlannerAction.hepPlan(RelNode, boolean, RelMetadataProvider, RelOptPlanner$Executor, HepMatchOrder, RelOptRule...) line: 1707 (out of synch)      
                      CalcitePlanner$CalcitePlannerAction.apply(RelOptCluster, RelOptSchema, SchemaPlus) line: 1436 (out of synch)
                      CalcitePlanner$CalcitePlannerAction.apply(RelOptCluster, RelOptSchema, SchemaPlus) line: 1194 (out of synch)
                      Frameworks$1.apply(RelOptCluster, RelOptSchema, SchemaPlus, CalciteServerStatement) line: 113      
                      CalcitePrepareImpl.perform(CalciteServerStatement, PrepareAction<R>) line: 1028   
                      Frameworks.withPrepare(PrepareAction<R>) line: 149         
                      Frameworks.withPlanner(PlannerAction<R>, FrameworkConfig) line: 106        
                      CalcitePlanner.logicalPlan() line: 1002 (out of synch)               
                      CalcitePlanner.getOptimizedAST() line: 1018 (out of synch)  
                      CalcitePlanner.genOPTree(ASTNode, SemanticAnalyzer$PlannerContext) line: 358 (out of synch)            
                      CalcitePlanner(SemanticAnalyzer).analyzeInternal(ASTNode, SemanticAnalyzer$PlannerContext) line: 11019 (out of synch)   
                      CalcitePlanner.analyzeInternal(ASTNode) line: 285 (out of synch)       
                      CalcitePlanner(BaseSemanticAnalyzer).analyze(ASTNode, Context) line: 258 (out of synch)        
                      ExplainSemanticAnalyzer.analyzeInternal(ASTNode) line: 165             
                      ExplainSemanticAnalyzer(BaseSemanticAnalyzer).analyze(ASTNode, Context) line: 258 (out of synch)    
                      Driver.compile(String, boolean, boolean) line: 514 (out of synch)         
                      Driver.compileInternal(String, boolean) line: 1319 (out of synch)        
                      Driver.runInternal(String, boolean) line: 1459 (out of synch) 
                      Driver.run(String, boolean) line: 1239 (out of synch)
                      Driver.run(String) line: 1229 (out of synch) 
      

        Attachments

          Activity

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              rusanu Remus Rusanu
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: