Robert created NIFI-13271:
-----------------------------
Summary: ConvertJsonToSql: Timestamp value truncated in WHERE
clause for update statements
Key: NIFI-13271
URL: https://issues.apache.org/jira/browse/NIFI-13271
Project: Apache NiFi
Issue Type: Bug
Components: Extensions
Affects Versions: 2.0.0-M3
Environment: Kubernetes/Linux on VMware
Reporter: Robert
Fix For: 2.0.0-M4
Dear developers,
this issue is about a bug that has already been reported in ticket 'NIFI-2625'
but I would like to propose a different solution.
When a timestamp parameter is set in the 'SET' clause, everything is working as
expected, but when it is set in the 'WHERE' clause of an update statement, the
value gets truncated erroneously. This is due to the (Oracle) database
returning a length of '7' for a column of type 'DATE' while the value itself is
a long value (UNIX epoch datetime in milliseconds).
I would like to propose to set parameters in the 'WHERE' clause like those in
the 'SET' clause, with the help of function 'createSqlStringValue' (function
'generateUpdate').
For me there is no abvious reason for setting the parameters in the two clauses
in different ways, but maybe I'm also missing something.
If there's a reason for setting it differently, probably it would be a good
idea to control this behaviour with the help of a boolean property (something
like 'align value to column type').
Kind regards,
Robert
--
This message was sent by Atlassian Jira
(v8.20.10#820010)