korlov42 commented on a change in pull request #216:
URL: https://github.com/apache/ignite-3/pull/216#discussion_r689388472
##########
File path:
modules/schema/src/main/java/org/apache/ignite/internal/schema/configuration/SchemaDescriptorConverter.java
##########
@@ -95,21 +99,37 @@ private static NativeType convert(ColumnType colType) {
case BITMASK:
return
NativeTypes.bitmaskOf(((ColumnType.VarLenColumnType)colType).length());
- case STRING:
+ case STRING: {
int strLen = ((ColumnType.VarLenColumnType)colType).length();
if (strLen == 0)
strLen = Integer.MAX_VALUE;
return NativeTypes.stringOf(strLen);
-
- case BLOB:
+ }
+ case BLOB: {
int blobLen = ((ColumnType.VarLenColumnType)colType).length();
if (blobLen == 0)
blobLen = Integer.MAX_VALUE;
return NativeTypes.blobOf(blobLen);
+ }
+ case TIME: {
Review comment:
should we add here DATE as well?
##########
File path:
modules/schema/src/main/java/org/apache/ignite/internal/schema/row/Row.java
##########
@@ -31,13 +35,20 @@
import org.apache.ignite.internal.schema.InvalidTypeException;
import org.apache.ignite.internal.schema.NativeTypeSpec;
import org.apache.ignite.internal.schema.SchemaDescriptor;
+import org.apache.ignite.internal.schema.TemporalNativeType;
/**
* Schema-aware row.
* <p>
* The class contains non-generic methods to read boxed and unboxed primitives
based on the schema column types.
* Any type conversions and coercions should be implemented outside the row by
the key-value or query runtime.
+ * <p>
* When a non-boxed primitive is read from a null column value, it is
converted to the primitive type default value.
+ * When a unknown column value requested, the a column default will be
returned.
Review comment:
```suggestion
* When an unknown column value requested, the column default will be
returned.
```
##########
File path: modules/api/src/main/java/org/apache/ignite/schema/ColumnType.java
##########
@@ -163,6 +166,37 @@ public static DecimalColumnType decimalOf() {
);
}
+ /**
+ * Timezone-free value representing a time of day in hours, minutes,
seconds,
+ * and fractional seconds depending on type precision.
+ *
+ * @param precision Fractional seconds part length. Allowed values are
3/6/9 for millis/micros/nanos.
Review comment:
perhaps, it would be better to introduce enum for such length
--
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]