You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "JingsongLi (via GitHub)" <gi...@apache.org> on 2023/06/05 07:50:51 UTC
[GitHub] [incubator-paimon] JingsongLi commented on a diff in pull request #1274: [common] Support modification of bigint type to string type.
JingsongLi commented on code in PR #1274:
URL: https://github.com/apache/incubator-paimon/pull/1274#discussion_r1217667296
##########
paimon-core/src/main/java/org/apache/paimon/casting/CastExecutors.java:
##########
@@ -215,19 +245,52 @@ public class CastExecutors {
(((Timestamp) value).getMillisecond()
% DateTimeUtils.MILLIS_PER_DAY);
}
+ case TINYINT:
+ return value -> (byte) (((Timestamp) value).getMillisecond());
Review Comment:
Is `getMillisecond` correct? You can take a look to Flink and Spark.
##########
paimon-common/src/main/java/org/apache/paimon/utils/TypeUtils.java:
##########
@@ -170,6 +170,10 @@ public static boolean toBoolean(BinaryString str) {
throw new RuntimeException("Cannot parse '" + str + "' as BOOLEAN.");
}
+ public static int toInt(Boolean bool) {
Review Comment:
`Boolean` -> `boolean`?
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org