Update the source specification with information from the row intuiter, but only if the spec values
        are not already set.
970017
def update_spec(self):
        

        if self.datafile.exists:
            with self.datafile.reader as r:

                self.header_lines = r.info['header_rows']
                self.comment_lines = r.info['comment_rows']
                self.start_line = r.info['data_start_row']
                self.end_line = r.info['data_end_row']
905470
final synchronized void setTraceSpec(TraceSpecification ts) {
        // update active trace based on incoming trace specification
        if (updateTraceSpec(ts)) {
            // If a listener has been registered with this TraceComponent call
            // the logger to inform it of the change in traceSpec
            if (trStateChangeListener != null)
                trStateChangeListener.traceStateChanged();

            if (logger != null)
                logger.setLevel(getLoggerLevel());

            TrConfigurator.traceComponentUpdated(this);
        }
    }
126794
function updateValidAndInvalidDataSources(dataSourcesToSplit, currentInvalidDataSources) {
  logger.debug("dataSourcesToSplit", dataSourcesToSplit);
  currentInvalidDataSources = currentInvalidDataSources || [];
  var validInvalid = _.partition(dataSourcesToSplit, function(dataSourceUpdateData) {
    if (dataSourceUpdateData) {
      return !dataSourceUpdateData.error;
    }
    return true;
  });

  var validDataSources = validInvalid[0];

  //Updating any data sources that are no longer valid
  var invalidDataSources = _.union(validInvalid[1], currentInvalidDataSources);

  return {
    valid: validDataSources,
    invalid: invalidDataSources
  };
}
1050942
def update(self):
        """"""
        for linenum in reversed(sorted(self.updates)):
            self.replace_baseline_repr(linenum, self.updates[linenum])

        if not self.TEST_MODE:
            path = '{}.update{}'.format(*os.path.splitext(self.path))
            with io.open(path, 'w', encoding='utf-8') as fh:
                fh.write('\n'.join(self.lines))
            print('UPDATE: {}'.format(self.showpath(path)))
1094648
def fix(source_key, rownum, line, source, sample_only_filter, sample_size):
    
    value = json2value(line)

    if rownum == 0:
        if len(line) > MAX_RECORD_LENGTH:
            _shorten(source_key, value, source)
        value = _fix(value)
        if sample_only_filter and Random.int(int(1.0/coalesce(sample_size, 0.01))) != 0 and jx.filter([value], sample_only_filter):
            # INDEX etl.id==0, BUT NO MORE
            if value.etl.id != 0:
                Log.error("Expecting etl.id==0")
            row = {"value": value}
            return row, True
    elif len(line) > MAX_RECORD_LENGTH:
        _shorten(source_key, value, source)
        value = _fix(value)
    elif '"resource_usage":' in line:
        value = _fix(value)

    row = {"value": value}
    return row, False
514852
def update(self):
        
        con = self.subpars.pars.control
        self(con.eqi1*con.tind)
240582
def extend_schema_spec(self) -> None:
        
        super().extend_schema_spec()

        if self.ATTRIBUTE_FIELDS in self._spec:
            # Add new fields to the schema spec. Since `_identity` is added by the super, new elements are added after
            predefined_field = self._build_time_fields_spec(self._spec[self.ATTRIBUTE_NAME])
            self._spec[self.ATTRIBUTE_FIELDS][1:1] = predefined_field

            # Add new field schema to the schema loader
            for field_schema in predefined_field:
                self.schema_loader.add_schema_spec(field_schema, self.fully_qualified_name)
669381
def update_col(input, **params):
    
    PARAM_TARGET = 'target'
    PARAM_UPDATE = 'update'
    SOURCE_TYPE = 'src.type'
    SOURCE_COL = 'src.col'
    SOURCE_FIELD = 'src.field'
    DEST_FIELD = 'dest.field'
    SOURCE_TYPE_DOC = 'doc'
    SOURCE_TYPE_CONST = 'const'
    CONST_VALUE = 'const.value'

    update_list = params.get(PARAM_UPDATE)
    res = input[params.get(PARAM_TARGET)] if PARAM_TARGET in params else input
    for row in res:
        for update_desc in update_list:
            if update_desc[SOURCE_TYPE] == SOURCE_TYPE_DOC:
                row[update_desc[DEST_FIELD]] = input[update_desc[SOURCE_COL]][update_desc[SOURCE_FIELD]]
            elif update_desc[SOURCE_TYPE] == SOURCE_TYPE_CONST:
                row[update_desc[DEST_FIELD]] = update_desc[CONST_VALUE]
    return res
397610
private void updateMeta(Record r) {
        for(Map.Entry<Object, Object> entry : r.getX().entrySet()) {
            Object column = entry.getKey();
            Object value = entry.getValue();

            if(value!=null) {
                data.xDataTypes.putIfAbsent(column, TypeInference.getDataType(value));
            }
        }

        if(data.yDataType == null) {
            Object value = r.getY();
            if(value!=null) {
                data.yDataType = TypeInference.getDataType(r.getY());
            }
        }
    }
861323
def update_datatype(self, datatype, w=None, dw=None, pw=None,
                        return_body=None, timeout=None, include_context=None):
        
        raise NotImplementedError
116688
def UpdateFrom(self, src):
    
    if not isinstance(src, PathInfo):
      raise TypeError("expected `%s` but got `%s`" % (PathInfo, type(src)))
    if self.path_type != src.path_type:
      raise ValueError(
          "src [%s] does not represent the same path type as self [%s]" %
          (src.path_type, self.path_type))
    if self.components != src.components:
      raise ValueError("src [%s] does not represent the same path as self [%s]"
                       % (src.components, self.components))

    if src.HasField("stat_entry"):
      self.stat_entry = src.stat_entry

    self.last_stat_entry_timestamp = max(self.last_stat_entry_timestamp,
                                         src.last_stat_entry_timestamp)
    self.directory = self.directory or src.directory
18672
private void updateColumnMetaData(CfDef columnFamily, ByteBuffer columnName, String validationClass)
    {
        ColumnDef column = getColumnDefByName(columnFamily, columnName);

        if (column != null)
        {
            // if validation class is the same - no need to modify it
            if (column.getValidation_class().equals(validationClass))
                return;

            // updating column definition with new validation_class
            column.setValidation_class(validationClass);
        }
        else
        {
            List<ColumnDef> columnMetaData = new ArrayList<ColumnDef>(columnFamily.getColumn_metadata());
            columnMetaData.add(new ColumnDef(columnName, validationClass));
            columnFamily.setColumn_metadata(columnMetaData);
        }
    }
565730
def _update_datasource(self, source, data):
        
        if not self.document:
            return

        data = self._postprocess_data(data)
        empty = all(len(v) == 0 for v in data.values())
        if (self.streaming and self.streaming[0].data is self.current_frame.data
            and self._stream_data and not empty):
            stream = self.streaming[0]
            if stream._triggering:
                data = {k: v[-stream._chunk_length:] for k, v in data.items()}
                source.stream(data, stream.length)
            return

        if cds_column_replace(source, data):
            source.data = data
        else:
            source.data.update(data)
1115368
def update_table(self, unknown_type='str'):
        """"""
        from ambry_sources.intuit import TypeIntuiter

        st = self.source_table

        if self.reftype == 'partition':
            for c in self.partition.table.columns:
                st.add_column(c.sequence_id, source_header=c.name, dest_header=c.name,
                              datatype=c.datatype, description = c.description)

        elif self.datafile.exists:
            with self.datafile.reader as r:

                names = set()

                for col in r.columns:

                    name = col['name']

                    if name in names:  # Handle duplicate names.
                        name = name+"_"+str(col['pos'])

                    names.add(name)

                    c = st.column(name)

                    dt = col['resolved_type'] if col['resolved_type'] != 'unknown' else unknown_type

                    if c:
                        c.datatype = TypeIntuiter.promote_type(c.datatype, col['resolved_type'])

                    else:

                        c = st.add_column(col['pos'],
                                          source_header=name,
                                          dest_header=name,
                                          datatype=col['resolved_type'],
                                          description=col['description'],
                                          has_codes=col['has_codes'])
1048169
def update(self):
        
        con = self.subpars.pars.control
        self(con.eqb*con.tind)
688950
function updateEntitiesAndExtent(dataSource) {
  var tableStructure = dataSource._tableStructure;
  var legendHelper = dataSource._legendHelper;
  var tableStyle = legendHelper.tableStyle;
  var specialColumns = {
    longitude: tableStructure.columnsByType[VarType.LON][0],
    latitude: tableStructure.columnsByType[VarType.LAT][0],
    height: tableStructure.columnsByType[VarType.ALT][0],
    time: tableStructure.activeTimeColumn,
    value: legendHelper.tableColumn
  };
  if (defined(specialColumns.longitude) && defined(specialColumns.latitude)) {
    var rowObjects = tableStructure.toStringAndNumberRowObjects();
    var rowDescriptions = tableStructure.toRowDescriptions(
      tableStyle && tableStyle.featureInfoFields
    );
    dataSource._rowObjects = rowObjects;
    dataSource._rowDescriptions = rowDescriptions;
    var entities = dataSource._entityCollection;
    entities.suspendEvents();
    if (
      defined(specialColumns.time) &&
      defined(tableStructure.idColumnNames) &&
      tableStructure.idColumnNames.length > 0
    ) {
      setOneFeaturePerId(dataSource, tableStructure, specialColumns);
      dataSource._hasFeaturePerRow = false;
    } else {
      setOneFeaturePerRow(dataSource, tableStructure, specialColumns);
      dataSource._hasFeaturePerRow = true;
    }
    entities.resumeEvents();

    // Generate extent from all positions that aren't NaN
    dataSource._extent = Rectangle.fromCartographicArray(
      specialColumns.longitude.values
        .map((lon, i) => [lon, specialColumns.latitude.values[i]])
        .filter(pos => pos.every(v => !isNaN(v)))
        .map(pos => Cartographic.fromDegrees(...pos))
    );
  }
}
1023444
def _update_column_info(self):
		
		del self.columnnames[:]
		del self.columntypes[:]
		del self.columnpytypes[:]
		for child in self.getElementsByTagName(ligolw.Column.tagName):
			if self.validcolumns is not None:
				try:
					if self.validcolumns[child.Name] != child.Type:
						raise ligolw.ElementError("invalid type '%s' for Column '%s' in Table '%s', expected type '%s'" % (child.Type, child.getAttribute("Name"), self.getAttribute("Name"), self.validcolumns[child.Name]))
				except KeyError:
					raise ligolw.ElementError("invalid Column '%s' for Table '%s'" % (child.getAttribute("Name"), self.getAttribute("Name")))
			if child.Name in self.columnnames:
				raise ligolw.ElementError("duplicate Column '%s' in Table '%s'" % (child.getAttribute("Name"), self.getAttribute("Name")))
			self.columnnames.append(child.Name)
			self.columntypes.append(child.Type)
			try:
				self.columnpytypes.append(ligolwtypes.ToPyType[child.Type])
			except KeyError:
				raise ligolw.ElementError("unrecognized Type '%s' for Column '%s' in Table '%s'" % (child.Type, child.getAttribute("Name"), self.getAttribute("Name")))