private static boolean isPartitionKey(Table table, String columnName) {
    return table.getPartColNames().stream().anyMatch(item -> item.equalsIgnoreCase(columnName));
  }
Find out whether the condition only contains partitioned columns. Note that
if the table is not partitioned, the function always returns true.
condition.

@param table
         the table object
@param expr
         the pruner expression for the table
ql/src/java/org/apache/hadoop/hive/ql/optimizer/ppr/PartitionPruner.java