question: public static String partitionNameToDdlSpec ( String partitionName ) { String [ ] partitionNameSplit = partitionName . split ( "/" ) ; List < String > columnExpressions = new ArrayList < > ( ) ; for ( String columnValue : partitionNameSplit ) { String [ ] columnValueSplit = columnValue . split ( "=" ) ; if ( columnValueSplit . length != 2 ) { throw new RuntimeException ( "Invalid partition name " + partitionName ) ; } columnExpressions . add ( columnValueSplit [ 0 ] + "='" + columnValueSplit [ 1 ] + "'" ) ; } return "PARTITION(" + StringUtils . join ( columnExpressions , ", " ) + ")" ; }
target:  Converts a partition name into a spec used for DDL commands. For example, ds=1/hr=2 -> PARTITION(ds='1', hr='2'). Note the special characters are not escapsed as they are in production.