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 42c449a  HOP-2499: fix Trim type and integration tests
     new e625988  Merge pull request #879 from hansva/master
42c449a is described below

commit 42c449a38399f5596cb39cebc181d5e0298fe3b7
Author: Hans Van Akelyen <[email protected]>
AuthorDate: Thu Jun 17 10:55:00 2021 +0200

    HOP-2499: fix Trim type and integration tests
---
 integration-tests/mdi/0006-filter-child.hpl        | 167 ------------------
 integration-tests/mdi/0006-filter-parent.hpl       | 187 ---------------------
 .../mdi/0010-database-lookup-parent.hpl            |  85 ++++++++--
 integration-tests/mdi/main-0006-filter.hwf         |  79 ---------
 integration-tests/mdi/main-0009-coalesce.hwf       |  15 --
 .../mdi/main-0010-database-lookup.hwf              |   2 +-
 .../transforms/databaselookup/DatabaseLookup.java  |  26 ++-
 7 files changed, 78 insertions(+), 483 deletions(-)

diff --git a/integration-tests/mdi/0006-filter-child.hpl 
b/integration-tests/mdi/0006-filter-child.hpl
deleted file mode 100644
index 291c1bc..0000000
--- a/integration-tests/mdi/0006-filter-child.hpl
+++ /dev/null
@@ -1,167 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
-<pipeline>
-  <info>
-    <name>0006-filter-child</name>
-    <name_sync_with_filename>Y</name_sync_with_filename>
-    <description/>
-    <extended_description/>
-    <pipeline_version/>
-    <pipeline_type>Normal</pipeline_type>
-    <parameters>
-    </parameters>
-    <capture_transform_performance>N</capture_transform_performance>
-    
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
-    
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
-    <created_user>-</created_user>
-    <created_date>2021/05/17 12:50:05.331</created_date>
-    <modified_user>-</modified_user>
-    <modified_date>2021/05/17 12:50:05.331</modified_date>
-    <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
-    <is_key_private>N</is_key_private>
-  </info>
-  <notepads>
-  </notepads>
-  <order>
-    <hop>
-      <from>10 rows</from>
-      <to>id</to>
-      <enabled>Y</enabled>
-    </hop>
-    <hop>
-      <from>id</from>
-      <to>Filter</to>
-      <enabled>Y</enabled>
-    </hop>
-    <hop>
-      <from>Filter</from>
-      <to>True</to>
-      <enabled>Y</enabled>
-    </hop>
-    <hop>
-      <from>Filter</from>
-      <to>False</to>
-      <enabled>Y</enabled>
-    </hop>
-  </order>
-  <transform>
-    <name>10 rows</name>
-    <type>RowGenerator</type>
-    <description/>
-    <distribute>Y</distribute>
-    <custom_distribution/>
-    <copies>1</copies>
-    <partitioning>
-      <method>none</method>
-      <schema_name/>
-    </partitioning>
-    <fields>
-</fields>
-    <interval_in_ms>5000</interval_in_ms>
-    <last_time_field>FiveSecondsAgo</last_time_field>
-    <never_ending>N</never_ending>
-    <limit>10</limit>
-    <row_time_field>now</row_time_field>
-    <attributes/>
-    <GUI>
-      <xloc>112</xloc>
-      <yloc>128</yloc>
-    </GUI>
-  </transform>
-  <transform>
-    <name>False</name>
-    <type>Dummy</type>
-    <description/>
-    <distribute>Y</distribute>
-    <custom_distribution/>
-    <copies>1</copies>
-    <partitioning>
-      <method>none</method>
-      <schema_name/>
-    </partitioning>
-    <attributes/>
-    <GUI>
-      <xloc>528</xloc>
-      <yloc>176</yloc>
-    </GUI>
-  </transform>
-  <transform>
-    <name>Filter</name>
-    <type>Filter</type>
-    <description/>
-    <distribute>Y</distribute>
-    <custom_distribution/>
-    <copies>1</copies>
-    <partitioning>
-      <method>none</method>
-      <schema_name/>
-    </partitioning>
-    <condition/>
-    <attributes/>
-    <GUI>
-      <xloc>368</xloc>
-      <yloc>128</yloc>
-    </GUI>
-  </transform>
-  <transform>
-    <name>True</name>
-    <type>Dummy</type>
-    <description/>
-    <distribute>Y</distribute>
-    <custom_distribution/>
-    <copies>1</copies>
-    <partitioning>
-      <method>none</method>
-      <schema_name/>
-    </partitioning>
-    <attributes/>
-    <GUI>
-      <xloc>528</xloc>
-      <yloc>80</yloc>
-    </GUI>
-  </transform>
-  <transform>
-    <name>id</name>
-    <type>Sequence</type>
-    <description/>
-    <distribute>Y</distribute>
-    <custom_distribution/>
-    <copies>1</copies>
-    <partitioning>
-      <method>none</method>
-      <schema_name/>
-    </partitioning>
-    <use_counter>Y</use_counter>
-    <use_database>N</use_database>
-    <increment_by>1</increment_by>
-    <max_value>999999999</max_value>
-    <seqname>SEQ_</seqname>
-    <start_at>1</start_at>
-    <valuename>id</valuename>
-    <attributes/>
-    <GUI>
-      <xloc>224</xloc>
-      <yloc>128</yloc>
-    </GUI>
-  </transform>
-  <transform_error_handling>
-  </transform_error_handling>
-  <attributes/>
-</pipeline>
diff --git a/integration-tests/mdi/0006-filter-parent.hpl 
b/integration-tests/mdi/0006-filter-parent.hpl
deleted file mode 100644
index ce73818..0000000
--- a/integration-tests/mdi/0006-filter-parent.hpl
+++ /dev/null
@@ -1,187 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
-<pipeline>
-  <info>
-    <name>0006-filter-parent</name>
-    <name_sync_with_filename>Y</name_sync_with_filename>
-    <description/>
-    <extended_description/>
-    <pipeline_version/>
-    <pipeline_type>Normal</pipeline_type>
-    <parameters>
-    </parameters>
-    <capture_transform_performance>N</capture_transform_performance>
-    
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
-    
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
-    <created_user>-</created_user>
-    <created_date>2021/05/17 12:53:47.693</created_date>
-    <modified_user>-</modified_user>
-    <modified_date>2021/05/17 12:53:47.693</modified_date>
-    <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
-    <is_key_private>N</is_key_private>
-  </info>
-  <notepads>
-  </notepads>
-  <order>
-    <hop>
-      <from>condition, targets</from>
-      <to>0006-filter-rows-child.hpl</to>
-      <enabled>Y</enabled>
-    </hop>
-    <hop>
-      <from>0006-filter-rows-child.hpl</from>
-      <to>Verify</to>
-      <enabled>Y</enabled>
-    </hop>
-  </order>
-  <transform>
-    <name>0006-filter-rows-child.hpl</name>
-    <type>MetaInject</type>
-    <description/>
-    <distribute>Y</distribute>
-    <custom_distribution/>
-    <copies>1</copies>
-    <partitioning>
-      <method>none</method>
-      <schema_name/>
-    </partitioning>
-    <filename>${PROJECT_HOME}/0006-filter-child.hpl</filename>
-    <source_transform>True</source_transform>
-    <source_output_fields>
-      <source_output_field>
-        <source_output_field_name>id</source_output_field_name>
-        <source_output_field_type>Integer</source_output_field_type>
-        <source_output_field_length>3</source_output_field_length>
-        <source_output_field_precision>-1</source_output_field_precision>
-      </source_output_field>
-    </source_output_fields>
-    <target_file/>
-    <no_execution>N</no_execution>
-    <stream_source_transform/>
-    <stream_target_transform/>
-    <mappings>
-      <mapping>
-        <target_transform_name>Filter</target_transform_name>
-        <target_attribute_key>SEND_TRUE_TRANSFORM</target_attribute_key>
-        <target_detail>N</target_detail>
-        <source_transform>condition, targets</source_transform>
-        <source_field>trueTarget</source_field>
-      </mapping>
-      <mapping>
-        <target_transform_name>Filter</target_transform_name>
-        <target_attribute_key>SEND_FALSE_TRANSFORM</target_attribute_key>
-        <target_detail>N</target_detail>
-        <source_transform>condition, targets</source_transform>
-        <source_field>falseTarget</source_field>
-      </mapping>
-      <mapping>
-        <target_transform_name>Filter</target_transform_name>
-        <target_attribute_key>CONDITION</target_attribute_key>
-        <target_detail>N</target_detail>
-        <source_transform>condition, targets</source_transform>
-        <source_field>condition</source_field>
-      </mapping>
-    </mappings>
-    <attributes/>
-    <GUI>
-      <xloc>336</xloc>
-      <yloc>112</yloc>
-    </GUI>
-  </transform>
-  <transform>
-    <name>Verify</name>
-    <type>Dummy</type>
-    <description/>
-    <distribute>Y</distribute>
-    <custom_distribution/>
-    <copies>1</copies>
-    <partitioning>
-      <method>none</method>
-      <schema_name/>
-    </partitioning>
-    <attributes/>
-    <GUI>
-      <xloc>544</xloc>
-      <yloc>112</yloc>
-    </GUI>
-  </transform>
-  <transform>
-    <name>condition, targets</name>
-    <type>DataGrid</type>
-    <description/>
-    <distribute>Y</distribute>
-    <custom_distribution/>
-    <copies>1</copies>
-    <partitioning>
-      <method>none</method>
-      <schema_name/>
-    </partitioning>
-    <fields>
-      <field>
-        <name>condition</name>
-        <type>String</type>
-        <format/>
-        <currency/>
-        <decimal/>
-        <group/>
-        <length>-1</length>
-        <precision>-1</precision>
-        <set_empty_string>N</set_empty_string>
-      </field>
-      <field>
-        <name>trueTarget</name>
-        <type>String</type>
-        <format/>
-        <currency/>
-        <decimal/>
-        <group/>
-        <length>-1</length>
-        <precision>-1</precision>
-        <set_empty_string>N</set_empty_string>
-      </field>
-      <field>
-        <name>falseTarget</name>
-        <type>String</type>
-        <format/>
-        <currency/>
-        <decimal/>
-        <group/>
-        <length>-1</length>
-        <precision>-1</precision>
-        <set_empty_string>N</set_empty_string>
-      </field>
-    </fields>
-    <data>
-      <line>
-        <item>( id>4 AND id&lt;=7 ) OR id=10</item>
-        <item>True</item>
-        <item>False</item>
-      </line>
-    </data>
-    <attributes/>
-    <GUI>
-      <xloc>144</xloc>
-      <yloc>112</yloc>
-    </GUI>
-  </transform>
-  <transform_error_handling>
-  </transform_error_handling>
-  <attributes/>
-</pipeline>
diff --git a/integration-tests/mdi/0010-database-lookup-parent.hpl 
b/integration-tests/mdi/0010-database-lookup-parent.hpl
index 7e51f77..5526c50 100644
--- a/integration-tests/mdi/0010-database-lookup-parent.hpl
+++ b/integration-tests/mdi/0010-database-lookup-parent.hpl
@@ -46,33 +46,33 @@ limitations under the License.
       <enabled>Y</enabled>
     </hop>
     <hop>
-      <from>count</from>
-      <to>count&lt;>100</to>
+      <from>keys</from>
+      <to>ETL metadata injection</to>
       <enabled>Y</enabled>
     </hop>
     <hop>
-      <from>count&lt;>100</from>
-      <to>Abort</to>
+      <from>returns</from>
+      <to>ETL metadata injection</to>
       <enabled>Y</enabled>
     </hop>
     <hop>
-      <from>myUuid &lt;&gt; '-'</from>
-      <to>count</to>
+      <from>ETL metadata injection</from>
+      <to>myUuid &lt;&gt; '-'</to>
       <enabled>Y</enabled>
     </hop>
     <hop>
-      <from>ETL metadata injection</from>
-      <to>myUuid &lt;&gt; '-'</to>
+      <from>myUuid &lt;&gt; '-'</from>
+      <to>count</to>
       <enabled>Y</enabled>
     </hop>
     <hop>
-      <from>keys</from>
-      <to>ETL metadata injection</to>
+      <from>count</from>
+      <to>count &lt;&gt; 100</to>
       <enabled>Y</enabled>
     </hop>
     <hop>
-      <from>returns</from>
-      <to>ETL metadata injection</to>
+      <from>count &lt;&gt; 100</from>
+      <to>Abort</to>
       <enabled>Y</enabled>
     </hop>
   </order>
@@ -110,7 +110,20 @@ limitations under the License.
     </partitioning>
     <filename>${PROJECT_HOME}/0010-database-lookup-child.hpl</filename>
     <source_transform>OUTPUT</source_transform>
-    <source_output_fields>    </source_output_fields>
+    <source_output_fields>
+      <source_output_field>
+        <source_output_field_name>id</source_output_field_name>
+        <source_output_field_type>Integer</source_output_field_type>
+        <source_output_field_length>-1</source_output_field_length>
+        <source_output_field_precision>-1</source_output_field_precision>
+      </source_output_field>
+      <source_output_field>
+        <source_output_field_name>myUuid</source_output_field_name>
+        <source_output_field_type>String</source_output_field_type>
+        <source_output_field_length>-1</source_output_field_length>
+        <source_output_field_precision>-1</source_output_field_precision>
+      </source_output_field>
+    </source_output_fields>
     <target_file/>
     <no_execution>N</no_execution>
     <stream_source_transform/>
@@ -243,8 +256,8 @@ limitations under the License.
     </GUI>
   </transform>
   <transform>
-    <name>count&lt;>100</name>
-    <type>Filter</type>
+    <name>count &lt;&gt; 100</name>
+    <type>FilterRows</type>
     <description/>
     <distribute>Y</distribute>
     <custom_distribution/>
@@ -253,7 +266,25 @@ limitations under the License.
       <method>none</method>
       <schema_name/>
     </partitioning>
-    <condition>count &lt;&gt; 100</condition>
+    <send_true_to/>
+    <send_false_to/>
+    <compare>
+      <condition>
+        <negated>N</negated>
+        <leftvalue>count</leftvalue>
+        <function>&lt;></function>
+        <rightvalue/>
+        <value>
+          <name>constant</name>
+          <type>Integer</type>
+          <text>100</text>
+          <length>-1</length>
+          <precision>0</precision>
+          <isnull>N</isnull>
+          <mask>#</mask>
+        </value>
+      </condition>
+    </compare>
     <attributes/>
     <GUI>
       <xloc>656</xloc>
@@ -404,7 +435,7 @@ limitations under the License.
   </transform>
   <transform>
     <name>myUuid &lt;&gt; '-'</name>
-    <type>Filter</type>
+    <type>FilterRows</type>
     <description/>
     <distribute>Y</distribute>
     <custom_distribution/>
@@ -413,7 +444,25 @@ limitations under the License.
       <method>none</method>
       <schema_name/>
     </partitioning>
-    <condition>myUuid &lt;&gt; '-'</condition>
+    <send_true_to/>
+    <send_false_to/>
+    <compare>
+      <condition>
+        <negated>N</negated>
+        <leftvalue>myUuid</leftvalue>
+        <function>&lt;></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/mdi/main-0006-filter.hwf 
b/integration-tests/mdi/main-0006-filter.hwf
deleted file mode 100644
index da6be6f..0000000
--- a/integration-tests/mdi/main-0006-filter.hwf
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
-<workflow>
-  <name>main-0006-filter</name>
-  <name_sync_with_filename>Y</name_sync_with_filename>
-  <description/>
-  <extended_description/>
-  <workflow_version/>
-  <created_user>-</created_user>
-  <created_date>2021/05/10 10:49:19.324</created_date>
-  <modified_user>-</modified_user>
-  <modified_date>2021/05/10 10:49:19.324</modified_date>
-  <parameters>
-    </parameters>
-  <actions>
-    <action>
-      <name>Start</name>
-      <description/>
-      <type>SPECIAL</type>
-      <attributes/>
-      <repeat>N</repeat>
-      <schedulerType>0</schedulerType>
-      <intervalSeconds>0</intervalSeconds>
-      <intervalMinutes>60</intervalMinutes>
-      <hour>12</hour>
-      <minutes>0</minutes>
-      <weekDay>1</weekDay>
-      <DayOfMonth>1</DayOfMonth>
-      <parallel>N</parallel>
-      <xloc>112</xloc>
-      <yloc>96</yloc>
-      <attributes_hac/>
-    </action>
-    <action>
-      <name>Run Filter Unit Tests</name>
-      <description/>
-      <type>RunPipelineTests</type>
-      <attributes/>
-      <test_names>
-        <test_name>
-          <name>0006-filter-parent UNIT</name>
-        </test_name>
-      </test_names>
-      <parallel>N</parallel>
-      <xloc>320</xloc>
-      <yloc>96</yloc>
-      <attributes_hac/>
-    </action>
-  </actions>
-  <hops>
-    <hop>
-      <from>Start</from>
-      <to>Run Filter Unit Tests</to>
-      <enabled>Y</enabled>
-      <evaluation>Y</evaluation>
-      <unconditional>Y</unconditional>
-    </hop>
-  </hops>
-  <notepads>
-  </notepads>
-  <attributes/>
-</workflow>
diff --git a/integration-tests/mdi/main-0009-coalesce.hwf 
b/integration-tests/mdi/main-0009-coalesce.hwf
index 94d2678..45aad29 100644
--- a/integration-tests/mdi/main-0009-coalesce.hwf
+++ b/integration-tests/mdi/main-0009-coalesce.hwf
@@ -55,21 +55,6 @@ limitations under the License.
       <attributes/>
       <test_names>
         <test_name>
-          <name>0008-analytic-query-parent UNIT</name>
-        </test_name>
-        <test_name>
-          <name>0006-filter-parent UNIT</name>
-        </test_name>
-        <test_name>
-          <name>0005-merge-join-parent UNIT</name>
-        </test_name>
-        <test_name>
-          <name>0004-csv-input-parent UNIT</name>
-        </test_name>
-        <test_name>
-          <name>0007-add-checksum-parent UNIT</name>
-        </test_name>
-        <test_name>
           <name>0009-coalesce-parent UNIT</name>
         </test_name>
       </test_names>
diff --git a/integration-tests/mdi/main-0010-database-lookup.hwf 
b/integration-tests/mdi/main-0010-database-lookup.hwf
index 61b373f..fedee61 100644
--- a/integration-tests/mdi/main-0010-database-lookup.hwf
+++ b/integration-tests/mdi/main-0010-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>
diff --git 
a/plugins/transforms/databaselookup/src/main/java/org/apache/hop/pipeline/transforms/databaselookup/DatabaseLookup.java
 
b/plugins/transforms/databaselookup/src/main/java/org/apache/hop/pipeline/transforms/databaselookup/DatabaseLookup.java
index b47e3ce..81fada1 100644
--- 
a/plugins/transforms/databaselookup/src/main/java/org/apache/hop/pipeline/transforms/databaselookup/DatabaseLookup.java
+++ 
b/plugins/transforms/databaselookup/src/main/java/org/apache/hop/pipeline/transforms/databaselookup/DatabaseLookup.java
@@ -29,6 +29,7 @@ import org.apache.hop.core.row.IRowMeta;
 import org.apache.hop.core.row.IValueMeta;
 import org.apache.hop.core.row.RowDataUtil;
 import org.apache.hop.core.row.RowMeta;
+import org.apache.hop.core.row.value.ValueMetaBase;
 import org.apache.hop.core.row.value.ValueMetaFactory;
 import org.apache.hop.core.row.value.ValueMetaString;
 import org.apache.hop.core.util.Utils;
@@ -108,7 +109,7 @@ public class DatabaseLookup extends 
BaseTransform<DatabaseLookupMeta, DatabaseLo
     }
 
     Object[] add;
-    boolean cache_now = false;
+    boolean cacheNow = false;
     boolean cacheHit = false;
 
     // First, check if we looked up before
@@ -137,7 +138,7 @@ public class DatabaseLookup extends 
BaseTransform<DatabaseLookupMeta, DatabaseLo
 
         data.db.setValuesLookup(data.lookupMeta, lookupRow);
         add = data.db.getLookup(meta.getLookup().isFailingOnMultipleResults());
-        cache_now = true;
+        cacheNow = true;
       }
     }
 
@@ -176,22 +177,17 @@ public class DatabaseLookup extends 
BaseTransform<DatabaseLookupMeta, DatabaseLo
 
       for (int i = 0; i < types.length; i++) {
         // If type is String and trim is required do that
-        IValueMeta returned = data.db.getReturnRowMeta().getValueMeta(i);
         if (types[i] == IValueMeta.TYPE_STRING
-            && ValueMetaString.getTrimTypeByCode(trimTypes[i]) != 
IValueMeta.TRIM_TYPE_NONE) {
+            && ValueMetaBase.getTrimTypeByCode(trimTypes[i]) != 
IValueMeta.TRIM_TYPE_NONE) {
           IValueMeta expected = data.returnMeta.getValueMeta(i);
           add[i] =
               expected.convertDataFromString(
-                  (String) add[i],
-                  returned,
-                  "",
-                  "",
-                  ValueMetaString.getTrimTypeByCode(trimTypes[i]));
+                  (String) add[i], expected, "", "", 
ValueMetaBase.getTrimTypeByCode(trimTypes[i]));
         } else if (types[i] != IValueMeta.TYPE_STRING
-            && ValueMetaString.getTrimTypeByCode(trimTypes[i]) != 
IValueMeta.TRIM_TYPE_NONE) {
+            && ValueMetaBase.getTrimTypeByCode(trimTypes[i]) != 
IValueMeta.TRIM_TYPE_NONE) {
           logBasic(
               "WARNING - TrimType is applied only to String fields - Affected 
field: "
-                  + returned.getName());
+                  + IValueMeta.getTypeDescription(types[i]));
         }
       }
       // Only verify the data types if the data comes from the DB, NOT when we 
have a cache hit
@@ -218,7 +214,7 @@ public class DatabaseLookup extends 
BaseTransform<DatabaseLookupMeta, DatabaseLo
     // Store in cache if we need to!
     // If we already loaded all data into the cache, storing more makes no 
sense.
     //
-    if (meta.isCached() && cache_now && !meta.isLoadingAllDataInCache() && 
data.allEquals) {
+    if (meta.isCached() && cacheNow && !meta.isLoadingAllDataInCache() && 
data.allEquals) {
       data.cache.storeRowInCache(meta, data.lookupMeta, lookupRow, add);
     }
 
@@ -461,7 +457,7 @@ public class DatabaseLookup extends 
BaseTransform<DatabaseLookupMeta, DatabaseLo
       Object[] outputRow = lookupValues(getInputRowMeta(), r);
 
       if (outputRow != null) {
-        // copy row to output rowset(s);
+        // copy row to output rowset(s)
         putRow(data.outputRowMeta, outputRow);
 
         if (log.isRowLevel()) {
@@ -535,7 +531,7 @@ public class DatabaseLookup extends 
BaseTransform<DatabaseLookupMeta, DatabaseLo
       // Now that we have the SQL constructed, let's store the rows...
       //
       List<Object[]> rows = db.getRows(sql, 0);
-      if (rows != null && rows.size() > 0) {
+      if (rows != null && !rows.isEmpty()) {
         if (data.allEquals) {
           putToDefaultCache(db, rows);
         } else {
@@ -566,11 +562,9 @@ public class DatabaseLookup extends 
BaseTransform<DatabaseLookupMeta, DatabaseLo
       for (int i = 0; i < keysAmount; i++) {
         keyData[i] = row[index++];
       }
-      // RowMeta valueMeta = new RowMeta();
       Object[] valueData = new Object[data.returnMeta.size()];
       for (int i = 0; i < data.returnMeta.size(); i++) {
         valueData[i] = row[index++];
-        // valueMeta.addValueMeta(returnRowMeta.getValueMeta(index++));
       }
       // Store the data...
       //

Reply via email to