private String getJdoFilterPushdownParam(int partColIndex,
                                             FilterBuilder filterBuilder, boolean canPushDownIntegral, List<FieldSchema> partitionKeys) throws MetaException {
      boolean isIntegralSupported = canPushDownIntegral && canJdoUseStringsWithIntegral();
      String colType = ColumnType.getTypeName(partitionKeys.get(partColIndex).getType());
      // Can only support partitions whose types are string, or maybe integers
      // Date/Timestamp data type value is considered as string hence pushing down to JDO.
      if (!ColumnType.StringTypes.contains(colType) && !ColumnType.DATE_TYPE_NAME.equalsIgnoreCase(colType)
          && !ColumnType.TIMESTAMP_TYPE_NAME.equalsIgnoreCase(colType)
          && (!isIntegralSupported || !ColumnType.IntegralTypes.contains(colType))) {
        filterBuilder.setError("Filtering is supported only on partition keys of type " +
            "string" + (isIntegralSupported ? ", or integral types" : ""));
        return null;
      }

      // There's no support for date or timestamp cast in JDO. Let's convert it to string; the date
      // columns have been excluded above, so it will either compare w/string or fail.
      Object val = value;
      if (colType.equals("date") && value instanceof Date) {
        val = MetaStoreUtils.convertDateToString((Date)value);
      } else if (colType.equals("timestamp") && value instanceof Timestamp) {
        val = MetaStoreUtils.convertTimestampToString((Timestamp)value);
      }
      boolean isStringValue = val instanceof String;
      if (!isStringValue && (!isIntegralSupported || !(val instanceof Long))) {
        filterBuilder.setError("Filtering is supported only on partition keys of type " +
            "string" + (isIntegralSupported ? ", or integral types" : ""));
        return null;
      }

      return isStringValue ? (String)val : Long.toString((Long)val);
    }
Validates and gets the query parameter for JDO filter pushdown based on the column
and the constant stored in this node.
@param partitionKeys
@param partColIndex The index of the column to check.
@param filterBuilder filter builder used to report error, if any.
@return The parameter string.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/parser/ExpressionTree.java