This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/master by this push:
new 4cfdd82bfd Dimension lookup/update cache issue #2978
new 3c20eebe6f Merge pull request #3037 from nadment/2978
4cfdd82bfd is described below
commit 4cfdd82bfdda6be9e915051702da31cc7d3489bd
Author: Nicolas Adment <[email protected]>
AuthorDate: Mon Jun 26 21:25:58 2023 +0200
Dimension lookup/update cache issue #2978
Reinforce the code to avoid NPE, I don't know if this solves the bug,
but I'd like to see if @kleysonr can test a build.
---
.../transforms/dimensionlookup/DimensionLookup.java | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git
a/plugins/transforms/dimensionlookup/src/main/java/org/apache/hop/pipeline/transforms/dimensionlookup/DimensionLookup.java
b/plugins/transforms/dimensionlookup/src/main/java/org/apache/hop/pipeline/transforms/dimensionlookup/DimensionLookup.java
index 36231f8c8f..1f41707a37 100644
---
a/plugins/transforms/dimensionlookup/src/main/java/org/apache/hop/pipeline/transforms/dimensionlookup/DimensionLookup.java
+++
b/plugins/transforms/dimensionlookup/src/main/java/org/apache/hop/pipeline/transforms/dimensionlookup/DimensionLookup.java
@@ -1677,8 +1677,18 @@ public class DimensionLookup extends
BaseTransform<DimensionLookupMeta, Dimensio
// See if the dateValue is between the from and to date ranges...
// The last 2 values are from and to
long time = dateValue.getTime();
- long from = ((Date) row[row.length - 2]).getTime();
- long to = ((Date) row[row.length - 1]).getTime();
+ long from = 0L;
+ long to = 0L;
+
+ Date dateFrom = (Date) row[row.length - 2];
+ if ( dateFrom!=null ) {
+ from = dateFrom.getTime();
+ }
+ Date dateTo = (Date) row[row.length - 1];
+ if ( dateTo!=null ) {
+ to = dateTo.getTime();
+ }
+
if (time >= from && time < to) { // sanity check to see if we have the
right version
if (isRowLevel()) {
logRowlevel(