lowka commented on code in PR #1979:
URL: https://github.com/apache/ignite-3/pull/1979#discussion_r1182581111


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/datatypes/tests/DataTypeTestSpec.java:
##########
@@ -17,29 +17,36 @@
 
 package org.apache.ignite.internal.sql.engine.datatypes.tests;
 
-import java.util.List;
-import org.apache.ignite.internal.sql.engine.type.IgniteCustomTypeSpec;
+import org.apache.ignite.internal.schema.NativeType;
 import org.apache.ignite.internal.sql.engine.type.IgniteTypeFactory;
+import org.apache.ignite.internal.sql.engine.util.NativeTypeWrapper;
 import org.apache.ignite.sql.ColumnType;
 
 /**
- * {@link IgniteCustomTypeSpec} + its values + convenient methods.
+ * {@code DataTypeTestSpec} describes a data type, provides convenient methods 
for testing.
+ *
+ * <ul>
+ *     <li>If {@code storageType} is not {@link Comparable} must use provide 
implementation of
+ *     {@link NativeTypeWrapper} and use it instead of their storage type.</li>
+ *     <li>If type has SQL literal {@link #hasLiterals()} should return {@code 
true}
+ *     and {@link #toLiteral(Comparable)} must convert values into 
corresponding literals.</li>
+ * </ul>
+ *
+ * @param <T> java type used by tests.
  */
-public abstract class CustomDataTypeTestSpec<T extends Comparable<T>> {
+public abstract class DataTypeTestSpec<T extends Comparable<T>> {
 
     private final ColumnType columnType;
 
     private final String typeName;
 
-    protected final List<T> values;
-
     private final Class<?> storageType;
 
     /** Constructor. */
-    public CustomDataTypeTestSpec(ColumnType columnType, String typeName, 
Class<T> javaType, T[] values) {
+    public DataTypeTestSpec(ColumnType columnType, String typeName, 
@SuppressWarnings("unused") Class<T> javaType) {

Review Comment:
   Yes, it is. 
   If there is test case that requires more/different kind of data, then that 
data should be added in that particular test case. And default values, provided 
in dataSamples, should be ignored.



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