code: function hasField(selection, fieldNames) {
    if (!selection || selection.type === 'empty') {
      return false;
    }
    const fieldsToLookup = [].concat(fieldNames);
  
    if (selection.type === 'range') {
      const fields = Object.keys(selection.range.variables);
      const match = intersect(fieldsToLookup, fields);
      return match.length > 0;
    }
    if (selection.type === 'partition') {
      return fieldsToLookup.indexOf(selection.partition.variable) !== -1;
    }
  
    console.log(
      'SelectionBuilder::hasField does not handle selection of type',
      selection.type
    );
  
    return false;
  }
docs: ----------------------------------------------------------------------------