[ https://issues.apache.org/jira/browse/FLINK-38135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18009155#comment-18009155 ]
dylanhz commented on FLINK-38135: --------------------------------- Hi [~lincoln.86xy], I'd like to work on this issue. Could you please assign it to me? > Non-existent method for RAW type hashing > ---------------------------------------- > > Key: FLINK-38135 > URL: https://issues.apache.org/jira/browse/FLINK-38135 > Project: Flink > Issue Type: Bug > Components: Table SQL / Planner > Reporter: dylanhz > Priority: Major > > There is a broken code path for generating hash codes for {{RAW}} types in > {{CodeGenUtils#hashCodeForType}}. > During a previous refactoring, a call to the legacy method > {{getJavaObjectFromBinaryGeneric}} was renamed to > {{getJavaObjectFromRawValueData}} to align with the new > {{BinaryRawValueData}} class. > However, this new method was never declared or implemented in the > {{BinaryRawValueData}} class or any of its superclasses. > {code:java} > // MRE > public class RawHashTest { > public static void main(String[] args) throws Exception { > TableEnvironment tableEnv = > TableEnvironment.create(EnvironmentSettings.inBatchMode()); > tableEnv.createTemporarySystemFunction("MyUDF", new MyUDF()); > String sql = > "SELECT str, COUNT(1) FROM (" > + "SELECT MyUDF(id) AS str FROM (VALUES (0), (1), > (2)) AS t(id)" > + ") GROUP BY str"; // group by RAW type > tableEnv.sqlQuery(sql).execute().await(); > } > public static class MyUDF extends ScalarFunction { > @DataTypeHint(value = "RAW", bridgedTo = String.class) > public String eval(Integer x) { > return x.toString(); > } > } > } > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)