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

Store/Load the same file fails for AvroStorage/OrcStorage, etc

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • 0.18.0
    • impl
    • None

    Description

      The following script fail:

      a = load '/user/pig/tests/data/singlefile/studenttab10k' as (name:chararray, age:int, gpa:float);
      store a into 'Avro.intermediate' using OrcStorage();
      b = load 'Avro.intermediate' using OrcStorage();
      c = filter b by age < 30;
      store c into 'ooo';
      

      Message:
      <file Avro_1.pig, line 7, column 16> Invalid field projection. Projected field [age] does not exist.

      If put a "exec" after the first store, the script success.

      Pig does compile the script into two MR job, and correctly figure out the dependency of the two, but it still need to goes for "Avro.intermediate" for the schema of b when compiling, and at this time "Avro.intermediate" does not exist. This also happens to other Loaders which need to get the schema from input file, such as OrcStorage, etc.

      Attachments

        Issue Links

          Activity

            People

              daijy Daniel Dai
              daijy Daniel Dai
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: