gustavodemorais commented on code in PR #28948:
URL: https://github.com/apache/flink/pull/28948#discussion_r3796661986


##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/functions/scalar/MapFromEntriesFunction.java:
##########
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.runtime.functions.scalar;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.data.GenericArrayData;
+import org.apache.flink.table.data.MapData;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.functions.BuiltInFunctionDefinitions;
+import org.apache.flink.table.functions.FunctionContext;
+import org.apache.flink.table.functions.SpecializedFunction;
+import org.apache.flink.table.runtime.util.EqualityAndHashcodeProvider;
+import org.apache.flink.table.runtime.util.ObjectContainer;
+import org.apache.flink.table.types.CollectionDataType;
+import org.apache.flink.table.types.DataType;
+import org.apache.flink.util.CollectionUtil;
+
+import javax.annotation.Nullable;
+
+import java.util.List;
+import java.util.Map;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+
+/** Implementation of {@link BuiltInFunctionDefinitions#MAP_FROM_ENTRIES}. */
+@Internal
+public class MapFromEntriesFunction extends BuiltInScalarFunction {
+
+    private final ArrayData.ElementGetter entryElementGetter;
+    private final RowData.FieldGetter keyFieldGetter;
+    private final RowData.FieldGetter valueFieldGetter;
+
+    private final EqualityAndHashcodeProvider keyEqualityAndHashcodeProvider;
+
+    private transient BiFunction<Object, Object, Boolean> keyEquality;
+    private transient Function<Object, Integer> keyHashcode;
+
+    public MapFromEntriesFunction(SpecializedFunction.SpecializedContext 
context) {
+        super(BuiltInFunctionDefinitions.MAP_FROM_ENTRIES, context);
+        final DataType arrayDataType = 
context.getCallContext().getArgumentDataTypes().get(0);
+        final DataType entryDataType = ((CollectionDataType) 
arrayDataType).getElementDataType();
+        final List<DataType> fieldDataTypes = entryDataType.getChildren();
+        final DataType keyDataType = fieldDataTypes.get(0);
+        final DataType valueDataType = fieldDataTypes.get(1);
+
+        entryElementGetter = 
ArrayData.createElementGetter(entryDataType.getLogicalType());
+        keyFieldGetter = 
RowData.createFieldGetter(keyDataType.getLogicalType(), 0);
+        valueFieldGetter = 
RowData.createFieldGetter(valueDataType.getLogicalType(), 1);
+
+        keyEqualityAndHashcodeProvider =
+                new EqualityAndHashcodeProvider(context, 
keyDataType.toInternal());
+    }
+
+    @Override
+    public void open(FunctionContext context) throws Exception {
+        keyEqualityAndHashcodeProvider.open(context);
+        keyEquality = keyEqualityAndHashcodeProvider::equals;
+        keyHashcode = keyEqualityAndHashcodeProvider::hashCode;
+    }
+
+    public @Nullable MapData eval(@Nullable ArrayData input) {
+        if (input == null) {
+            return null;
+        }
+
+        final int size = input.size();
+        // a duplicate key keeps the position of its first occurrence and the 
last value wins
+        final Map<ObjectContainer, Object> entries =
+                CollectionUtil.newLinkedHashMapWithExpectedSize(size);
+        for (int pos = 0; pos < size; pos++) {
+            final RowData entry = (RowData) 
entryElementGetter.getElementOrNull(input, pos);
+            if (entry == null) {
+                return null;
+            }
+            entries.put(
+                    wrapKey(keyFieldGetter.getFieldOrNull(entry)),
+                    valueFieldGetter.getFieldOrNull(entry));
+        }
+        final int distinctKeyCount = entries.size();
+
+        final Object[] keys = new Object[distinctKeyCount];
+        final Object[] values = new Object[distinctKeyCount];
+        int pos = 0;
+        for (Map.Entry<ObjectContainer, Object> entry : entries.entrySet()) {
+            final ObjectContainer key = entry.getKey();
+            keys[pos] = key == null ? null : key.getObject();
+            values[pos] = entry.getValue();
+            pos++;
+        }
+        return new MapDataForMapFromEntries(
+                new GenericArrayData(keys), new GenericArrayData(values));
+    }
+
+    /**
+     * Wraps the given key so that it is hashed and compared with the 
generated hashcode and
+     * equality of the key type, which implement SQL semantics for internal 
data structures unlike
+     * {@link Object#hashCode()} and {@link Object#equals(Object)}.
+     */
+    private @Nullable ObjectContainer wrapKey(@Nullable Object key) {
+        if (key == null) {
+            return null;
+        }
+        return new ObjectContainer(key, keyEquality, keyHashcode);
+    }
+
+    @Override
+    public void close() throws Exception {
+        keyEqualityAndHashcodeProvider.close();
+    }
+
+    private static class MapDataForMapFromEntries implements MapData {

Review Comment:
   `MapFromArraysFunction` and `MapUnionFunction` have the identical class. 
With a third user it is time to move it to 
`org.apache.flink.table.runtime.util` and reuse it.



##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/functions/scalar/MapFromEntriesFunction.java:
##########
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.runtime.functions.scalar;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.data.GenericArrayData;
+import org.apache.flink.table.data.MapData;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.functions.BuiltInFunctionDefinitions;
+import org.apache.flink.table.functions.FunctionContext;
+import org.apache.flink.table.functions.SpecializedFunction;
+import org.apache.flink.table.runtime.util.EqualityAndHashcodeProvider;
+import org.apache.flink.table.runtime.util.ObjectContainer;
+import org.apache.flink.table.types.CollectionDataType;
+import org.apache.flink.table.types.DataType;
+import org.apache.flink.util.CollectionUtil;
+
+import javax.annotation.Nullable;
+
+import java.util.List;
+import java.util.Map;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+
+/** Implementation of {@link BuiltInFunctionDefinitions#MAP_FROM_ENTRIES}. */
+@Internal
+public class MapFromEntriesFunction extends BuiltInScalarFunction {
+
+    private final ArrayData.ElementGetter entryElementGetter;
+    private final RowData.FieldGetter keyFieldGetter;
+    private final RowData.FieldGetter valueFieldGetter;
+
+    private final EqualityAndHashcodeProvider keyEqualityAndHashcodeProvider;
+
+    private transient BiFunction<Object, Object, Boolean> keyEquality;
+    private transient Function<Object, Integer> keyHashcode;

Review Comment:
   `ArrayExceptFunction` and `ArrayIntersectFunction` pass `provider::equals` / 
`provider::hashCode` straight into the container. Two fields and two `open()` 
assignments less.



##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/strategies/ArrayOfEntriesArgumentTypeStrategy.java:
##########
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.types.inference.strategies;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.table.functions.FunctionDefinition;
+import org.apache.flink.table.types.CollectionDataType;
+import org.apache.flink.table.types.DataType;
+import org.apache.flink.table.types.inference.ArgumentTypeStrategy;
+import org.apache.flink.table.types.inference.CallContext;
+import org.apache.flink.table.types.inference.Signature.Argument;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import 
org.apache.flink.table.types.logical.StructuredType.StructuredComparison;
+import org.apache.flink.table.types.logical.utils.LogicalTypeChecks;
+
+import java.util.Optional;
+
+/**
+ * Strategy for an argument that must be an array of map entries, i.e. an 
{@code ARRAY} whose
+ * element is a {@code ROW} with exactly two fields. The first field becomes 
the map key, the second
+ * one the map value.
+ */
+@Internal
+public final class ArrayOfEntriesArgumentTypeStrategy implements 
ArgumentTypeStrategy {
+
+    @Override
+    public Optional<DataType> inferArgumentType(
+            CallContext callContext, int argumentPos, boolean throwOnFailure) {
+        final DataType actualType = 
callContext.getArgumentDataTypes().get(argumentPos);
+        if (!actualType.getLogicalType().is(LogicalTypeRoot.ARRAY)) {
+            return callContext.fail(

Review Comment:
   The first message has no period and does not tell the user what they 
actually passed, the second one does both. Please align, and quote the argument 
name.
   
   ```suggestion
               return callContext.fail(
                       throwOnFailure,
                       "The 'input' argument must be ARRAY<ROW<key, value>>, 
but actual type was '%s'.",
                       actualType.getLogicalType().asSummaryString());
   ```



##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/functions/scalar/MapFromEntriesFunction.java:
##########
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.runtime.functions.scalar;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.data.GenericArrayData;
+import org.apache.flink.table.data.MapData;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.functions.BuiltInFunctionDefinitions;
+import org.apache.flink.table.functions.FunctionContext;
+import org.apache.flink.table.functions.SpecializedFunction;
+import org.apache.flink.table.runtime.util.EqualityAndHashcodeProvider;
+import org.apache.flink.table.runtime.util.ObjectContainer;
+import org.apache.flink.table.types.CollectionDataType;
+import org.apache.flink.table.types.DataType;
+import org.apache.flink.util.CollectionUtil;
+
+import javax.annotation.Nullable;
+
+import java.util.List;
+import java.util.Map;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+
+/** Implementation of {@link BuiltInFunctionDefinitions#MAP_FROM_ENTRIES}. */
+@Internal
+public class MapFromEntriesFunction extends BuiltInScalarFunction {
+
+    private final ArrayData.ElementGetter entryElementGetter;
+    private final RowData.FieldGetter keyFieldGetter;
+    private final RowData.FieldGetter valueFieldGetter;
+
+    private final EqualityAndHashcodeProvider keyEqualityAndHashcodeProvider;
+
+    private transient BiFunction<Object, Object, Boolean> keyEquality;
+    private transient Function<Object, Integer> keyHashcode;
+
+    public MapFromEntriesFunction(SpecializedFunction.SpecializedContext 
context) {
+        super(BuiltInFunctionDefinitions.MAP_FROM_ENTRIES, context);
+        final DataType arrayDataType = 
context.getCallContext().getArgumentDataTypes().get(0);
+        final DataType entryDataType = ((CollectionDataType) 
arrayDataType).getElementDataType();
+        final List<DataType> fieldDataTypes = entryDataType.getChildren();
+        final DataType keyDataType = fieldDataTypes.get(0);
+        final DataType valueDataType = fieldDataTypes.get(1);
+
+        entryElementGetter = 
ArrayData.createElementGetter(entryDataType.getLogicalType());
+        keyFieldGetter = 
RowData.createFieldGetter(keyDataType.getLogicalType(), 0);
+        valueFieldGetter = 
RowData.createFieldGetter(valueDataType.getLogicalType(), 1);
+
+        keyEqualityAndHashcodeProvider =
+                new EqualityAndHashcodeProvider(context, 
keyDataType.toInternal());
+    }
+
+    @Override
+    public void open(FunctionContext context) throws Exception {
+        keyEqualityAndHashcodeProvider.open(context);
+        keyEquality = keyEqualityAndHashcodeProvider::equals;
+        keyHashcode = keyEqualityAndHashcodeProvider::hashCode;
+    }
+
+    public @Nullable MapData eval(@Nullable ArrayData input) {
+        if (input == null) {
+            return null;
+        }
+
+        final int size = input.size();
+        // a duplicate key keeps the position of its first occurrence and the 
last value wins
+        final Map<ObjectContainer, Object> entries =
+                CollectionUtil.newLinkedHashMapWithExpectedSize(size);
+        for (int pos = 0; pos < size; pos++) {
+            final RowData entry = (RowData) 
entryElementGetter.getElementOrNull(input, pos);
+            if (entry == null) {
+                return null;
+            }
+            entries.put(
+                    wrapKey(keyFieldGetter.getFieldOrNull(entry)),
+                    valueFieldGetter.getFieldOrNull(entry));
+        }
+        final int distinctKeyCount = entries.size();
+
+        final Object[] keys = new Object[distinctKeyCount];
+        final Object[] values = new Object[distinctKeyCount];
+        int pos = 0;
+        for (Map.Entry<ObjectContainer, Object> entry : entries.entrySet()) {
+            final ObjectContainer key = entry.getKey();
+            keys[pos] = key == null ? null : key.getObject();
+            values[pos] = entry.getValue();
+            pos++;
+        }
+        return new MapDataForMapFromEntries(
+                new GenericArrayData(keys), new GenericArrayData(values));
+    }
+
+    /**
+     * Wraps the given key so that it is hashed and compared with the 
generated hashcode and
+     * equality of the key type, which implement SQL semantics for internal 
data structures unlike
+     * {@link Object#hashCode()} and {@link Object#equals(Object)}.
+     */

Review Comment:
   Four lines for a private one-liner. "Hashes and compares the key with SQL 
semantics instead of {@link Object#equals}." is enough.



##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/functions/scalar/MapFromEntriesFunction.java:
##########
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.runtime.functions.scalar;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.table.data.ArrayData;
+import org.apache.flink.table.data.GenericArrayData;
+import org.apache.flink.table.data.MapData;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.functions.BuiltInFunctionDefinitions;
+import org.apache.flink.table.functions.FunctionContext;
+import org.apache.flink.table.functions.SpecializedFunction;
+import org.apache.flink.table.runtime.util.EqualityAndHashcodeProvider;
+import org.apache.flink.table.runtime.util.ObjectContainer;
+import org.apache.flink.table.types.CollectionDataType;
+import org.apache.flink.table.types.DataType;
+import org.apache.flink.util.CollectionUtil;
+
+import javax.annotation.Nullable;
+
+import java.util.List;
+import java.util.Map;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+
+/** Implementation of {@link BuiltInFunctionDefinitions#MAP_FROM_ENTRIES}. */
+@Internal
+public class MapFromEntriesFunction extends BuiltInScalarFunction {
+
+    private final ArrayData.ElementGetter entryElementGetter;
+    private final RowData.FieldGetter keyFieldGetter;
+    private final RowData.FieldGetter valueFieldGetter;
+
+    private final EqualityAndHashcodeProvider keyEqualityAndHashcodeProvider;
+
+    private transient BiFunction<Object, Object, Boolean> keyEquality;
+    private transient Function<Object, Integer> keyHashcode;
+
+    public MapFromEntriesFunction(SpecializedFunction.SpecializedContext 
context) {
+        super(BuiltInFunctionDefinitions.MAP_FROM_ENTRIES, context);
+        final DataType arrayDataType = 
context.getCallContext().getArgumentDataTypes().get(0);
+        final DataType entryDataType = ((CollectionDataType) 
arrayDataType).getElementDataType();
+        final List<DataType> fieldDataTypes = entryDataType.getChildren();
+        final DataType keyDataType = fieldDataTypes.get(0);
+        final DataType valueDataType = fieldDataTypes.get(1);
+
+        entryElementGetter = 
ArrayData.createElementGetter(entryDataType.getLogicalType());
+        keyFieldGetter = 
RowData.createFieldGetter(keyDataType.getLogicalType(), 0);
+        valueFieldGetter = 
RowData.createFieldGetter(valueDataType.getLogicalType(), 1);
+
+        keyEqualityAndHashcodeProvider =
+                new EqualityAndHashcodeProvider(context, 
keyDataType.toInternal());
+    }
+
+    @Override
+    public void open(FunctionContext context) throws Exception {
+        keyEqualityAndHashcodeProvider.open(context);
+        keyEquality = keyEqualityAndHashcodeProvider::equals;
+        keyHashcode = keyEqualityAndHashcodeProvider::hashCode;
+    }
+
+    public @Nullable MapData eval(@Nullable ArrayData input) {
+        if (input == null) {
+            return null;
+        }
+
+        final int size = input.size();
+        // a duplicate key keeps the position of its first occurrence and the 
last value wins
+        final Map<ObjectContainer, Object> entries =
+                CollectionUtil.newLinkedHashMapWithExpectedSize(size);
+        for (int pos = 0; pos < size; pos++) {
+            final RowData entry = (RowData) 
entryElementGetter.getElementOrNull(input, pos);
+            if (entry == null) {
+                return null;
+            }
+            entries.put(
+                    wrapKey(keyFieldGetter.getFieldOrNull(entry)),
+                    valueFieldGetter.getFieldOrNull(entry));
+        }
+        final int distinctKeyCount = entries.size();
+
+        final Object[] keys = new Object[distinctKeyCount];
+        final Object[] values = new Object[distinctKeyCount];
+        int pos = 0;
+        for (Map.Entry<ObjectContainer, Object> entry : entries.entrySet()) {
+            final ObjectContainer key = entry.getKey();
+            keys[pos] = key == null ? null : key.getObject();
+            values[pos] = entry.getValue();
+            pos++;
+        }
+        return new MapDataForMapFromEntries(
+                new GenericArrayData(keys), new GenericArrayData(values));
+    }
+
+    /**
+     * Wraps the given key so that it is hashed and compared with the 
generated hashcode and
+     * equality of the key type, which implement SQL semantics for internal 
data structures unlike
+     * {@link Object#hashCode()} and {@link Object#equals(Object)}.
+     */
+    private @Nullable ObjectContainer wrapKey(@Nullable Object key) {

Review Comment:
   `wrapKey` returns `null` for a NULL key, so all NULL keys collapse into one, 
i.e. `NULL = NULL`. `MAP_UNION` does the same, so the behavior is consistent - 
but neither the docs nor the Javadoc mention it, and the test pins it silently. 
Please document it.



##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/MapFunctionITCase.java:
##########
@@ -406,6 +411,123 @@ private Stream<TestSetSpec> mapFromArraysTestCases() {
                                         DataTypes.STRING(), 
DataTypes.ARRAY(DataTypes.INT()))));
     }
 
+    private Stream<TestSetSpec> mapFromEntriesTestCases() {
+        final DataType entryType =
+                DataTypes.ROW(
+                        DataTypes.FIELD("key", DataTypes.INT()),
+                        DataTypes.FIELD("value", DataTypes.STRING()));
+        final DataType nestedEntryType =
+                DataTypes.ROW(
+                        DataTypes.FIELD("key", DataTypes.STRING()),
+                        DataTypes.FIELD("value", 
DataTypes.ARRAY(DataTypes.INT())));
+        return Stream.of(
+                TestSetSpec.forFunction(
+                                BuiltInFunctionDefinitions.MAP_FROM_ENTRIES, 
"Invalid input")
+                        .onFieldsWithData("item", new Integer[] {1, 2})
+                        .andDataTypes(DataTypes.STRING(), 
DataTypes.ARRAY(DataTypes.INT()))
+                        .testTableApiValidationError(
+                                $("f0").mapFromEntries(),
+                                "The input argument should be ARRAY<ROW<key, 
value>>")
+                        .testSqlValidationError(
+                                "MAP_FROM_ENTRIES(ARRAY[ROW(1, 'a', true)])",
+                                "The element must be a ROW with exactly two 
fields."),
+                
TestSetSpec.forFunction(BuiltInFunctionDefinitions.MAP_FROM_ENTRIES)
+                        .onFieldsWithData(
+                                new Row[] {Row.of(1, "one"), Row.of(2, "two")},
+                                new Row[] {Row.of(1, "one"), Row.of(1, "uno")},
+                                null,
+                                new Row[] {
+                                    Row.of("one", new Integer[] {1, 2}),
+                                    Row.of("two", new Integer[] {3, 4})
+                                },
+                                new Row[] {Row.of(null, "a"), Row.of(null, 
"b")})
+                        .andDataTypes(
+                                DataTypes.ARRAY(entryType),
+                                DataTypes.ARRAY(entryType),
+                                DataTypes.ARRAY(entryType),
+                                DataTypes.ARRAY(nestedEntryType),
+                                DataTypes.ARRAY(entryType))
+                        // duplicate keys: the last value wins

Review Comment:
   The whole `EqualityAndHashcodeProvider`/`ObjectContainer` machinery exists 
for non-trivial key types, but no case has duplicate STRING, ROW or ARRAY keys 
- the generated equality/hashcode path is never exercised. Please add one, plus 
an entry with a NULL value.



-- 
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]

Reply via email to