You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2020/11/12 19:34:17 UTC
[incubator-hop] branch master updated: HOP-2169 : Random Value
transform generates data of wrong class (#377)
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/incubator-hop.git
The following commit(s) were added to refs/heads/master by this push:
new 9ba7669 HOP-2169 : Random Value transform generates data of wrong class (#377)
9ba7669 is described below
commit 9ba76695dc4638acf80b2bdd989699f13d30e1f2
Author: Matt Casters <ma...@gmail.com>
AuthorDate: Thu Nov 12 20:34:06 2020 +0100
HOP-2169 : Random Value transform generates data of wrong class (#377)
---
.../org/apache/hop/pipeline/transforms/randomvalue/RandomValue.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/transforms/randomvalue/src/main/java/org/apache/hop/pipeline/transforms/randomvalue/RandomValue.java b/plugins/transforms/randomvalue/src/main/java/org/apache/hop/pipeline/transforms/randomvalue/RandomValue.java
index e5a0961..e3331df 100644
--- a/plugins/transforms/randomvalue/src/main/java/org/apache/hop/pipeline/transforms/randomvalue/RandomValue.java
+++ b/plugins/transforms/randomvalue/src/main/java/org/apache/hop/pipeline/transforms/randomvalue/RandomValue.java
@@ -74,7 +74,7 @@ public class RandomValue extends BaseTransform<RandomValueMeta, RandomValueData>
row[index] = data.randomgen.nextDouble();
break;
case RandomValueMeta.TYPE_RANDOM_INTEGER:
- row[index] = data.randomgen.nextInt();
+ row[index] = Long.valueOf(data.randomgen.nextInt());
break;
case RandomValueMeta.TYPE_RANDOM_STRING:
// TODO Math.abs(Long.MIN_VALUE) == Long.MIN_VALUE --> Don't expect Math.abs always return