lsyldliu commented on code in PR #19709:
URL: https://github.com/apache/flink/pull/19709#discussion_r873688161
##########
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/codegen/HashCodeGeneratorTest.scala:
##########
@@ -18,18 +18,26 @@
package org.apache.flink.table.planner.codegen
import org.apache.flink.configuration.Configuration
-import org.apache.flink.table.data.GenericRowData
-import org.apache.flink.table.types.logical.{BigIntType, IntType, RowType,
VarBinaryType}
+import org.apache.flink.table.data.{GenericArrayData, GenericMapData,
GenericRowData, StringData}
+import org.apache.flink.table.types.logical.{ArrayType, BigIntType, IntType,
MapType, MultisetType, RowType, VarBinaryType, VarCharType}
-import org.junit.{Assert, Test}
+import org.junit.{Assert, Rule, Test}
+import org.junit.rules.ExpectedException
+
+import scala.collection.JavaConversions.mapAsJavaMap
/** Test for [[HashCodeGenerator]]. */
class HashCodeGeneratorTest {
private val classLoader = Thread.currentThread().getContextClassLoader
+ var expectedException: ExpectedException = ExpectedException.none
Review Comment:
I have researched spark and presto. In spark, map type is not allowed used
in join and group by clause because of map type is not an orderable type, but
it supported as the distribute by key. In presto, map supported as group by
key, it is because presto only implement hash-based aggregate. So, I think we
should support map type field as shuffle key, but doesn't as sort key, such as
order by/sort-base join/agg clause. we should support to generate hash code for
map which is also as spark and presto, this may be useful for distribute by
clause which we will support in 1.16.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]