englefly commented on code in PR #18331:
URL: https://github.com/apache/doris/pull/18331#discussion_r1156601712
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/types/coercion/DateLikeType.java:
##########
@@ -17,8 +17,30 @@
package org.apache.doris.nereids.types.coercion;
+import java.time.temporal.ChronoUnit;
+import java.util.Calendar;
+
/**
* date like type.
*/
public abstract class DateLikeType extends PrimitiveType {
+ private Calendar toCalendar(double d) {
+ //d = (year * 10000 + month * 100 + day) * 1000000L;
+ int date = (int) (d / 1000000);
+ int day = date % 100;
+ int month = (date / 100) % 100;
+ int year = date / 10000;
+ Calendar calendar = Calendar.getInstance();
+ calendar.set(Calendar.YEAR, year);
+ calendar.set(Calendar.MONDAY, month);
+ calendar.set(Calendar.DAY_OF_MONTH, day);
Review Comment:
I will add a TODO to note it
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]