@Description("year of the ISO week of the given timestamp") @ScalarFunction(value = "year_of_week", alias = "yow") @SqlType(StandardTypes.BIGINT) public static long yearOfWeekFromTimestampWithTimeZone(@SqlType(StandardTypes.TIMESTAMP_WITH_TIME_ZONE) long timestampWithTimeZone) { return unpackChronology(timestampWithTimeZone).weekyear().get(unpackMillisUtc(timestampWithTimeZone)); }
@Description("year of the ISO week of the given timestamp") @ScalarFunction(value = "year_of_week", alias = "yow") @SqlType(StandardTypes.BIGINT) public static long yearOfWeekFromTimestamp(ConnectorSession session, @SqlType(StandardTypes.TIMESTAMP) long timestamp) { if (session.isLegacyTimestamp()) { return getChronology(session.getTimeZoneKey()).weekyear().get(timestamp); } else { return YEAR_OF_WEEK.get(timestamp); } }
@Description("year of the ISO week of the given timestamp") @ScalarFunction(value = "year_of_week", alias = "yow") @SqlType(StandardTypes.BIGINT) public static long yearOfWeekFromTimestampWithTimeZone(@SqlType(StandardTypes.TIMESTAMP_WITH_TIME_ZONE) long timestampWithTimeZone) { return unpackChronology(timestampWithTimeZone).weekyear().get(unpackMillisUtc(timestampWithTimeZone)); }
@Description("year of the ISO week of the given timestamp") @ScalarFunction(value = "year_of_week", alias = "yow") @SqlType(StandardTypes.BIGINT) public static long yearOfWeekFromTimestampWithTimeZone(@SqlType(StandardTypes.TIMESTAMP_WITH_TIME_ZONE) long timestampWithTimeZone) { return unpackChronology(timestampWithTimeZone).weekyear().get(unpackMillisUtc(timestampWithTimeZone)); }
@Description("year of the ISO week of the given timestamp") @ScalarFunction(value = "year_of_week", alias = "yow") @SqlType(StandardTypes.BIGINT) public static long yearOfWeekFromTimestamp(ConnectorSession session, @SqlType(StandardTypes.TIMESTAMP) long timestamp) { return getChronology(session.getTimeZoneKey()).weekyear().get(timestamp); }
@Description("year of the ISO week of the given timestamp") @ScalarFunction(value = "year_of_week", alias = "yow") @SqlType(StandardTypes.BIGINT) public static long yearOfWeekFromTimestampWithTimeZone(@SqlType(StandardTypes.TIMESTAMP_WITH_TIME_ZONE) long timestampWithTimeZone) { return unpackChronology(timestampWithTimeZone).weekyear().get(unpackMillisUtc(timestampWithTimeZone)); }
@Description("year of the ISO week of the given timestamp") @ScalarFunction(value = "year_of_week", alias = "yow") @SqlType(StandardTypes.BIGINT) public static long yearOfWeekFromTimestamp(ConnectorSession session, @SqlType(StandardTypes.TIMESTAMP) long timestamp) { if (session.isLegacyTimestamp()) { return getChronology(session.getTimeZoneKey()).weekyear().get(timestamp); } else { return YEAR_OF_WEEK.get(timestamp); } }
@Description("year of the ISO week of the given timestamp") @ScalarFunction(value = "year_of_week", alias = "yow") @SqlType(StandardTypes.BIGINT) public static long yearOfWeekFromTimestamp(ConnectorSession session, @SqlType(StandardTypes.TIMESTAMP) long timestamp) { if (session.isLegacyTimestamp()) { return getChronology(session.getTimeZoneKey()).weekyear().get(timestamp); } else { return YEAR_OF_WEEK.get(timestamp); } }