Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/993#discussion_r60351294
--- Diff:
tajo-core/src/main/java/org/apache/tajo/engine/function/datetime/DatePartFromTimestamp.java
---
@@ -59,8 +55,9 @@ public DatePartFromTimestamp() {
@Override
public void init(OverridableConf context, FunctionEval.ParamType []
types) {
- String timezoneId = context.get(SessionVars.TIMEZONE,
TajoConstants.DEFAULT_SYSTEM_TIMEZONE);
- timezone = TimeZone.getTimeZone(timezoneId);
+ if (!hasTimeZone()) {
--- End diff --
It looks a bug to me. As you know, the reason why the results of the above
queries are different is there is no way to apply the client timezone to the
result of date_part(). This is also same for add_month() and add_day()
functions. I think we need to fix this too because the result is not the one
which users usually expect. Of course, the result is different from that of
pgsql.
But, this also looks to require a huge amount of work. If you agree, how
about handling this issue in another Jira?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---