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 c17bd96 HOP-2918: replace filter transform
new 1ea4a36 Merge pull request #880 from hansva/master
c17bd96 is described below
commit c17bd9696c4882292b73f3d0d3e9153b42e52ff2
Author: Hans Van Akelyen <[email protected]>
AuthorDate: Thu Jun 17 13:39:09 2021 +0200
HOP-2918: replace filter transform
---
.../transforms/0017-database-lookup.hpl | 64 +++++++++++++++++-----
.../transforms/main-0017-database-lookup.hwf | 2 +-
2 files changed, 51 insertions(+), 15 deletions(-)
diff --git a/integration-tests/transforms/0017-database-lookup.hpl
b/integration-tests/transforms/0017-database-lookup.hpl
index 71e23e4..9e706aa 100644
--- a/integration-tests/transforms/0017-database-lookup.hpl
+++ b/integration-tests/transforms/0017-database-lookup.hpl
@@ -46,18 +46,23 @@ limitations under the License.
<enabled>Y</enabled>
</hop>
<hop>
+ <from>id</from>
+ <to>myUuid</to>
+ <enabled>Y</enabled>
+ </hop>
+ <hop>
<from>count</from>
- <to>count<>100k</to>
+ <to>count <> 100.000</to>
<enabled>Y</enabled>
</hop>
<hop>
- <from>count<>100k</from>
+ <from>count <> 100.000</from>
<to>Abort</to>
<enabled>Y</enabled>
</hop>
<hop>
- <from>id</from>
- <to>myUuid</to>
+ <from>myUuid <> '-'</from>
+ <to>count</to>
<enabled>Y</enabled>
</hop>
<hop>
@@ -65,11 +70,6 @@ limitations under the License.
<to>myUuid <> '-'</to>
<enabled>Y</enabled>
</hop>
- <hop>
- <from>myUuid <> '-'</from>
- <to>count</to>
- <enabled>Y</enabled>
- </hop>
</order>
<transform>
<name>100k rows</name>
@@ -152,8 +152,8 @@ limitations under the License.
</GUI>
</transform>
<transform>
- <name>count<>100k</name>
- <type>Filter</type>
+ <name>count <> 100.000</name>
+ <type>FilterRows</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
@@ -162,7 +162,25 @@ limitations under the License.
<method>none</method>
<schema_name/>
</partitioning>
- <condition>count <> 100000</condition>
+ <send_true_to/>
+ <send_false_to/>
+ <compare>
+ <condition>
+ <negated>N</negated>
+ <leftvalue>count</leftvalue>
+ <function><></function>
+ <rightvalue/>
+ <value>
+ <name>constant</name>
+ <type>Integer</type>
+ <text>100000</text>
+ <length>-1</length>
+ <precision>0</precision>
+ <isnull>N</isnull>
+ <mask>#</mask>
+ </value>
+ </condition>
+ </compare>
<attributes/>
<GUI>
<xloc>656</xloc>
@@ -232,7 +250,7 @@ limitations under the License.
</transform>
<transform>
<name>myUuid <> '-'</name>
- <type>Filter</type>
+ <type>FilterRows</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
@@ -241,7 +259,25 @@ limitations under the License.
<method>none</method>
<schema_name/>
</partitioning>
- <condition>myUuid <> '-'</condition>
+ <send_true_to/>
+ <send_false_to/>
+ <compare>
+ <condition>
+ <negated>N</negated>
+ <leftvalue>myUuid</leftvalue>
+ <function><></function>
+ <rightvalue/>
+ <value>
+ <name>constant</name>
+ <type>String</type>
+ <text>-</text>
+ <length>-1</length>
+ <precision>-1</precision>
+ <isnull>N</isnull>
+ <mask/>
+ </value>
+ </condition>
+ </compare>
<attributes/>
<GUI>
<xloc>432</xloc>
diff --git a/integration-tests/transforms/main-0017-database-lookup.hwf
b/integration-tests/transforms/main-0017-database-lookup.hwf
index c49c7f9..dabebf5 100644
--- a/integration-tests/transforms/main-0017-database-lookup.hwf
+++ b/integration-tests/transforms/main-0017-database-lookup.hwf
@@ -53,7 +53,7 @@ limitations under the License.
<description/>
<type>SQL</type>
<attributes/>
- <sql>DROP TABLE dblu_uuid
+ <sql>DROP TABLE IF EXISTS dblu_uuid
;</sql>
<useVariableSubstitution>F</useVariableSubstitution>
<sqlfromfile>F</sqlfromfile>