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

ESPArray<string> inconsistent response when empty

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.0.0
    • Component/s: ESP
    • Labels:

      Description

      When ESPArray<string> is used in a response its shape changes based on if it is empty or not.

      Looking at WUQueryDetails in WsWorkunits:

      Without Data (LogicalFiles is an ARRAY):

      {
         "WUQueryDetailsResponse":{
            "QueryId":"testconsumer.1",
      ...
            "LogicalFiles":[
      
            ],
      ...
      }
      

      With data (LogicalFiles is an OBJECT):

      {
         "WUQueryDetailsResponse":{
            "QueryId":"cancer_research_query.1",
      ...
            "LogicalFiles":{
               "Item":[
                  "training-samples::cancer-research::out::all_by_year.flat",
                  "training-samples::cancer-research::out::all_by_year_age.flat",
                  "training-samples::cancer-research::out::all_by_year_sex.flat"
               ]
            },
      ...
      }
      

      Without Data Expected Response:

      {
         "WUQueryDetailsResponse":{
            "QueryId":"cancer_research_query.1",
      ...
            "LogicalFiles":{
               "Item":[
               ]
            },
      ...
      }
      

        Attachments

          Activity

            People

            • Assignee:
              afishbeck Anthony Fishbeck
              Reporter:
              gordonsmith Gordon Smith
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: