korlov42 commented on a change in pull request #216:
URL: https://github.com/apache/ignite-3/pull/216#discussion_r695533679
##########
File path: modules/api/src/main/java/org/apache/ignite/schema/ColumnType.java
##########
@@ -163,6 +178,38 @@ public static DecimalColumnType decimalOf() {
);
}
+ /**
+ * Returns timezone-free type representing a time of day in hours,
minutes, seconds,
+ * and fractional seconds depending on type precision.
+ *
+ * @param precision Fractional seconds meaningful digits. Allowed values
are 0-9 for second to nanosecond precision.
+ * @return Native type.
+ */
+ public static TemporalColumnType time(int precision) {
Review comment:
ColumnType is a part of public API, thus I would prefer to use enum for
precisions. Otherwise we 1) need to improve javadoc, since currently it's
unclear what actually precision=4 means, and 2) throw an
IllegalArgumentException in case someone pass a precision that out of valid
range.
--
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]