Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-21530

Generate warning for incompatible fields when combining datasets

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.4.0
    • Component/s: Code Generator
    • Labels:
      None

      Description

      Not sure if this is a bug or feature but I was expecting the following code to fail to compile because the two data sets I’m combining don’t have the same fields.  They have the same field data types but not the same field names.
         

      The code outputs:

      +Field1    Field2+

      src1        hello

      src2        good-bye

       

      Layout1 := RECORD
       STRING field1;
       STRING field2;
      END;
      
      ds1 := DATASET([{'src1', 'hello'}], Layout1);
      
      Layout2 := RECORD
       STRING field2;
       STRING field3;
      END;
      
      ds2 := DATASET([{'src2', 'good-bye'}], Layout2);
      
      ds := ds1 + ds2;
      OUTPUT(ds);
      

        Attachments

          Activity

            People

            • Assignee:
              ghalliday Gavin Halliday
              Reporter:
              wongda01 Davin Wong
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: