code: func mergeTables(tables ...*types.SQLTable) (*types.SQLTable, error) {
  	table := &types.SQLTable{
  		NotifyChannels: make(map[string][]string),
  	}
  
  	columns := make(map[string]*types.SQLTableColumn)
  	notifications := make(map[string]map[string]struct{})
  
  	for _, t := range tables {
  		if t != nil {
  			table.Name = t.Name
  			for _, columnB := range t.Columns {
  				if columnA, ok := columns[columnB.Name]; ok {
  					if !columnA.Equals(columnB) {
  						return nil, fmt.Errorf("cannot merge event class tables for %s because of "+
  							"conflicting columns: %v and %v", t.Name, columnB, columnB)
  					}
  					// Just keep existing column from A - they match
  				} else {
  					// Add as new column
  					table.Columns = append(table.Columns, columnB)
  					columns[columnB.Name] = columnB
  				}
  			}
  			for channel, columnNames := range t.NotifyChannels {
  				for _, columnName := range columnNames {
  					if notifications[channel] == nil {
  						notifications[channel] = make(map[string]struct{})
  					}
  					notifications[channel][columnName] = struct{}{}
  				}
  			}
  		}
  	}
  
  	// Merge notification channels requested by specs
  	for channel, colMap := range notifications {
  		for columnName := range colMap {
  			table.NotifyChannels[channel] = append(table.NotifyChannels[channel], columnName)
  		}
  		sort.Strings(table.NotifyChannels[channel])
  	}
  
  	return table, nil
  }
docs: // Merges tables a and b provided the intersection of their columns (by name) are identical