imay commented on a change in pull request #1644: Refactor DateLiteral class in 
FE
URL: https://github.com/apache/incubator-doris/pull/1644#discussion_r315652679
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/analysis/DateLiteral.java
 ##########
 @@ -29,16 +31,23 @@
 
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
+import org.joda.time.LocalDateTime;
+import org.joda.time.format.DateTimeFormatterBuilder;
 
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
 import java.nio.ByteBuffer;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.util.TimeZone;
+import java.util.regex.Pattern;
 
 public class DateLiteral extends LiteralExpr {
     private static final Logger LOG = LogManager.getLogger(DateLiteral.class);
-    private Date date;
+
+    private static final Pattern HAS_TIME_PART = 
Pattern.compile("^.*[HhIiklrSsT]+.*$");
 
 Review comment:
   you should add some comment for this pattern, because it's a bit hard to 
learn about a regex pattern and what's the purpose

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to