Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-2544

ConstantExpression considers (-1.0) as a tuple rather than double

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 0.9.1, 0.10.0
    • None
    • None
    • None

    Description

      A = load 'i1' as (a,b,c:double);
      B = foreach A generate ((a eq '')?((b eq '')? (-1.0) :(c/100.0)): (c/100.0)) ;
      dump B;
      

      In Pig 0.9 the above script fails with exception : "Unsupported input type for BinCond: left hand side: tuple; right hand side: double"
      The same script works fine with Pig 0.8.

      I think the issue is ConstantExpression uses Util.translateFieldSchema(DataType.determineFieldSchema(val))
      which considers (-1.0) as a tuple rather than double in this case.

      Attachments

        Activity

          People

            Unassigned Unassigned
            vivekp Vivek Padmanabhan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: