zstan commented on code in PR #912:
URL: https://github.com/apache/ignite-3/pull/912#discussion_r916542031
##########
modules/schema/src/main/java/org/apache/ignite/internal/schema/NativeTypes.java:
##########
@@ -190,6 +193,27 @@ public static NativeType timestamp() {
return
TemporalNativeType.timestamp(ColumnType.TemporalColumnType.DEFAULT_PRECISION);
}
+ /**
+ * Creates DURATION type.
+ *
+ * @see NativeTypeSpec#DURATION
+ * @param precision Fractional seconds meaningful digits. Allowed values
are 0-9 for second to nanosecond precision.
+ * @return Native type.
+ */
+ public static NativeType duration(int precision) {
+ return TemporalNativeType.duration(precision);
+ }
+
+ /**
+ * Creates DURATION type with default precision.
+ *
+ * @see NativeTypeSpec#DURATION
+ * @return Native type.
+ */
+ public static NativeType duration() {
+ return
TemporalNativeType.duration(ColumnType.TemporalColumnType.DEFAULT_PRECISION);
Review Comment:
thanks!
--
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]