class MergeTableLikeUtil {

	public Map<FeatureOption, MergingStrategy> computeMergingStrategies(
			List<SqlTableLike.SqlTableLikeOption> mergingOptions) {

		Map<FeatureOption, MergingStrategy> result = new HashMap<>(defaultMergingStrategies);

		Optional<SqlTableLike.SqlTableLikeOption> maybeAllOption = mergingOptions.stream()
				.filter(option -> option.getFeatureOption() == FeatureOption.ALL)
				.findFirst();

		maybeAllOption.ifPresent((allOption) -> {
			MergingStrategy strategy = allOption.getMergingStrategy();
			for (FeatureOption featureOption : FeatureOption.values()) {
				if (featureOption != FeatureOption.ALL) {
					result.put(featureOption, strategy);
				}
			}
		});

		for (SqlTableLike.SqlTableLikeOption mergingOption : mergingOptions) {
			result.put(mergingOption.getFeatureOption(), mergingOption.getMergingStrategy());
		}

		return result;
	}

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

}