NIFI-13837 QueryRecord changes timezones of Timestamp field

Signed-off-by: Matt Burgess <mattyb149@apache.org>

This closes #9341
This commit is contained in:
Mark Payne 2024-07-09 17:01:41 +02:00 committed by Matt Burgess
parent e720ccc309
commit 1d2b662a5f
3 changed files with 3 additions and 0 deletions

View File

@ -188,6 +188,7 @@ public class MetricsSqlQueryService implements MetricsQueryService {
private CalciteConnection createConnection() {
final Properties properties = new Properties();
properties.put(CalciteConnectionProperty.LEX.camelName(), Lex.MYSQL_ANSI.name());
properties.put(CalciteConnectionProperty.TIME_ZONE, "UTC");
try {
final Connection connection = DriverManager.getConnection("jdbc:calcite:", properties);

View File

@ -417,6 +417,7 @@ public class QueryRecord extends AbstractProcessor {
private CalciteConnection createConnection() {
final Properties properties = new Properties();
properties.put(CalciteConnectionProperty.LEX.camelName(), Lex.MYSQL_ANSI.name());
properties.put(CalciteConnectionProperty.TIME_ZONE, "UTC");
try {
final Connection connection = DriverManager.getConnection("jdbc:calcite:", properties);

View File

@ -95,6 +95,7 @@ public class SqlJoinCache implements AutoCloseable {
private CalciteConnection createCalciteConnection() {
final Properties properties = new Properties();
properties.put(CalciteConnectionProperty.LEX.camelName(), Lex.MYSQL_ANSI.name());
properties.put(CalciteConnectionProperty.TIME_ZONE, "UTC");
try {
final Connection connection = DriverManager.getConnection("jdbc:calcite:", properties);