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

Regression: an invalid query regarding union onschema becoming valid

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 0.9.0
    • 0.9.0
    • None
    • None

    Description

      The following query fails in 0.8:

      A = load 'x' as (x:long, y:chararray);
      B = load 'y' as (x:long, y:float);
      C = union onschema A, B;

      grunt> C = union onschema A, B;
      2011-05-12 09:01:47,031 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1031: Incompatible types for merging schemas. Field schema: y: chararray Other field schema: y: float

      However, in 0.9 validation doesn't catch the error. It seems float is cast to chararray automatically.

      grunt> describe C;
      C:

      {x: long,y: chararray}

      Attachments

        Activity

          People

            thejas Thejas Nair
            xuefuz Xuefu Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: