protected String toDate(String tableValue) {
    if (isORACLE()) {
      return "TO_DATE(" + tableValue + ", 'YYYY-MM-DD')";
    } else {
      return "cast(" + tableValue + " as date)";
    }
  }
Whether the RDBMS has a bug in join and filter operation order described in DERBY-6358.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/DatabaseProduct.java