You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "xtern (via GitHub)" <gi...@apache.org> on 2025/07/22 06:20:45 UTC
Re: [PR] IGNITE-24984 Added YEAR field validation in TIMESTAMP literal [ignite-3]
xtern commented on code in PR #6279:
URL: https://github.com/apache/ignite-3/pull/6279#discussion_r2221347066
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/IgniteSqlValidator.java:
##########
@@ -586,12 +587,24 @@ public SqlLiteral resolveLiteral(SqlLiteral literal) {
SqlLiteral resolved = super.resolveLiteral(literal);
SqlTypeName typeName = resolved.getTypeName();
- if (typeName == SqlTypeName.TIMESTAMP) {
- long ts = resolved.getValueAs(TimestampString.class).getMillisSinceEpoch();
+ if (literal.getTypeName() != SqlTypeName.UNKNOWN) {
+ return resolved;
+ }
+
+ if (typeName == SqlTypeName.TIMESTAMP || typeName == SqlTypeName.TIMESTAMP_WITH_LOCAL_TIME_ZONE) {
Review Comment:
Thanks, moved to `TypeUtils` :thinking:
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org