def required_event_fields(next_value_columns, previous_value_columns):
 return {TS_FIELD_NAME, SID_FIELD_NAME, EVENT_DATE_FIELD_NAME}.union(viewvalues(next_value_columns), viewvalues(previous_value_columns))

def required_event_fields ( next_value_columns , previous_value_columns ) : return { TS_FIELD_NAME , SID_FIELD_NAME , EVENT_DATE_FIELD_NAME } . union ( viewvalues ( next_value_columns ) , viewvalues ( previous_value_columns ) )
compute the set of resource columns required to serve next_value_columns and previous_value_columns .