Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-16776

Strange cast behavior for table backed by druid

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0
    • Druid integration
    • None

    Description

      The following query

       
      explain select SUBSTRING(`Calcs`.`str0`,CAST(`Calcs`.`int2` AS int), 3) from `druid_tableau`.`calcs` `Calcs`;
      OK
      Plan not optimized by CBO. 
      

      fails the cbo with the following exception

       org.apache.hadoop.hive.ql.parse.SemanticException: Line 0:-1 Wrong arguments '3': No matching method for class org.apache.hadoop.hive.ql.udf.UDFSubstr with (string, bigint, int). Po
      ssible choices: _FUNC_(binary, int)  _FUNC_(binary, int, int)  _FUNC_(string, int)  _FUNC_(string, int, int)
              at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory$DefaultExprProcessor.process(TypeCheckProcFactory.java:1355) ~[hive-exec-2.1.0.2.6.0.2-SNAPSHOT.jar:2.1.0.2.6.0.2-SNA
      PSHOT]

      .

      Attachments

        1. HIVE-16776.patch
          27 kB
          jcamachorodriguez

        Activity

          People

            jcamacho Jesús Camacho Rodríguez
            bslim Slim Bouguerra
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: