class HiveTableUtil {

	public static Optional<String> makePartitionFilter(
			int partColOffset, List<String> partColNames, List<Expression> expressions, HiveShim hiveShim) {
		List<String> filters = new ArrayList<>(expressions.size());
		ExpressionExtractor extractor = new ExpressionExtractor(partColOffset, partColNames, hiveShim);
		for (Expression expression : expressions) {
			String str = expression.accept(extractor);
			if (str == null) {
				return Optional.empty();
			}
			filters.add(str);
		}
		return Optional.of(String.join(" and ", filters));
	}

	private  HiveTableUtil();

}