class MergeTableLikeUtil {

	public Map<String, String> mergeOptions(
			MergingStrategy mergingStrategy,
			Map<String, String> sourceOptions,
			Map<String, String> derivedOptions) {
		Map<String, String> options = new HashMap<>();
		if (mergingStrategy != MergingStrategy.EXCLUDING) {
			options.putAll(sourceOptions);
		}

		derivedOptions.forEach((key, value) -> {
			if (mergingStrategy != MergingStrategy.OVERWRITING && options.containsKey(key)) {
				throw new ValidationException(String.format(
					"There already exists an option ['%s' -> '%s']  in the " +
						"base table. You might want to specify EXCLUDING OPTIONS or OVERWRITING OPTIONS.",
					key,
					options.get(key)));
			}

			options.put(key, value);
		});
		return options;
	}

	  MergeTableLikeUtil(
			SqlValidator validator,
			Function<SqlNode, String> escapeExpression);

}