@Test
  public void testListPartitionsByFilterCaseSensitive() throws Exception {
    String tableName = TABLE_NAME + "_casesensitive";
    Table t = createTestTable(client, DB_NAME, tableName,
        Lists.newArrayList("yyyy", "month", "day"), false);
    List<List<String>> testValues = Lists.newArrayList(
        Lists.newArrayList("2017", "march", "11"),
        Lists.newArrayList("2017", "march", "15"),
        Lists.newArrayList("2017", "may", "15"),
        Lists.newArrayList("2018", "march", "11"),
        Lists.newArrayList("2018", "april", "7"));

    for(List<String> vals : testValues) {
      addPartition(client, t, vals);
    }

    List<Partition> partitions = client.listPartitionsByFilter(DB_NAME, tableName,
        "month=\"mArCh\"", (short) -1);
    Assert.assertTrue(partitions.isEmpty());
    assertPartitionsHaveCorrectParams(partitions);

    partitions = client.listPartitionsByFilter(DB_NAME, tableName,
        "yyyy=\"2017\" AND month=\"May\"", (short) -1);
    Assert.assertTrue(partitions.isEmpty());

    partitions = client.listPartitionsByFilter(DB_NAME, tableName,
        "yyyy=\"2017\" AND month!=\"mArCh\"", (short) -1);
    assertPartitionsHaveCorrectValues(partitions, testValues.subList(0, 3));
    assertPartitionsHaveCorrectParams(partitions);

    partitions = client.listPartitionsByFilter(DB_NAME, tableName,
        "month like \"M%\"", (short) -1);
    Assert.assertTrue(partitions.isEmpty());
    client.dropTable(DB_NAME, tableName);
    assertPartitionsHaveCorrectParams(partitions);
  }
Testing listPartitionsByFilter(String,String,String,short) ->
        get_partitions_by_filter(String,String,String,short).
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestListPartitions.java