This is an automated email from the ASF dual-hosted git repository.
bamaer pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/main by this push:
new 8acce38088 Fix four transform samples that don't do what their notes
say, fixes #9486 (#9487)
8acce38088 is described below
commit 8acce380888426de7a8b367febcbb47c310ab89a
Author: Adalennis <[email protected]>
AuthorDate: Sat Nov 14 15:21:50 2026 +0100
Fix four transform samples that don't do what their notes say, fixes #9486
(#9487)
---
integration-tests/samples/read-samples-build-hop-run.hpl | 4 ----
.../src/main/samples/transforms/binary-file-output.hpl | 5 +++++
.../src/main/samples/transforms/add-a-checksum-CRC32.hpl | 4 ++--
.../src/main/samples/transforms/call-db-procedure.hpl | 14 +++++++++-----
.../transforms/add-value-fields-changing-sequence.hpl | 2 +-
5 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/integration-tests/samples/read-samples-build-hop-run.hpl
b/integration-tests/samples/read-samples-build-hop-run.hpl
index 1d18d4217b..74223ed62f 100644
--- a/integration-tests/samples/read-samples-build-hop-run.hpl
+++ b/integration-tests/samples/read-samples-build-hop-run.hpl
@@ -599,10 +599,6 @@ var hop_run_cmd = './hop-run.sh -j samples -r ' +
run_config + ' -f ' + filename
<item>watch-files.hpl</item>
<item>watches a folder until it is stopped</item>
</line>
- <line>
- <item>call-db-procedure.hpl</item>
- <item>requires a stored procedure in the database</item>
- </line>
<line>
<item>http-client.hpl</item>
<item>requires network access to the URL</item>
diff --git
a/plugins/transforms/binaryfileoutput/src/main/samples/transforms/binary-file-output.hpl
b/plugins/transforms/binaryfileoutput/src/main/samples/transforms/binary-file-output.hpl
index d84f716ab6..af881bcc97 100644
---
a/plugins/transforms/binaryfileoutput/src/main/samples/transforms/binary-file-output.hpl
+++
b/plugins/transforms/binaryfileoutput/src/main/samples/transforms/binary-file-output.hpl
@@ -63,6 +63,11 @@ limitations under the License.
<to>load binary file</to>
<enabled>Y</enabled>
</hop>
+ <hop>
+ <from>load binary file</from>
+ <to>binary file output</to>
+ <enabled>Y</enabled>
+ </hop>
</order>
<transform>
<name>get filenames</name>
diff --git
a/plugins/transforms/checksum/src/main/samples/transforms/add-a-checksum-CRC32.hpl
b/plugins/transforms/checksum/src/main/samples/transforms/add-a-checksum-CRC32.hpl
index 9f09803a7d..fab0a39980 100644
---
a/plugins/transforms/checksum/src/main/samples/transforms/add-a-checksum-CRC32.hpl
+++
b/plugins/transforms/checksum/src/main/samples/transforms/add-a-checksum-CRC32.hpl
@@ -39,7 +39,7 @@ limitations under the License.
</info>
<notepads>
<notepad>
- <note>Add Checksum -- CR - 232 Algorithm</note>
+ <note>Add Checksum -- CRC32 Algorithm</note>
<xloc>596</xloc>
<yloc>60</yloc>
<width>208</width>
@@ -77,7 +77,7 @@ limitations under the License.
<method>none</method>
<schema_name/>
</partitioning>
- <checksumtype>SHA-512</checksumtype>
+ <checksumtype>CRC32</checksumtype>
<resultfieldName>checksum</resultfieldName>
<resultType>hexadecimal</resultType>
<fields>
diff --git
a/plugins/transforms/dbproc/src/main/samples/transforms/call-db-procedure.hpl
b/plugins/transforms/dbproc/src/main/samples/transforms/call-db-procedure.hpl
index 80bbc67b78..36fe920c82 100644
---
a/plugins/transforms/dbproc/src/main/samples/transforms/call-db-procedure.hpl
+++
b/plugins/transforms/dbproc/src/main/samples/transforms/call-db-procedure.hpl
@@ -37,7 +37,11 @@ limitations under the License.
</info>
<notepads>
<notepad>
- <note>Call a stored procedure in a database. Uses the hop-samples
connection, an in-memory H2 database. Set the procedure name before
running.</note>
+ <note>Call a database function for each row.
+The hop-samples connection is an in-memory H2 database,
+and LENGTH is one of its built-in functions.
+To call a stored procedure of your own,
+change the connection and the procedure name.</note>
<xloc>128</xloc>
<yloc>16</yloc>
<width>400</width>
@@ -96,7 +100,7 @@ limitations under the License.
<attributes/>
<GUI>
<xloc>128</xloc>
- <yloc>160</yloc>
+ <yloc>224</yloc>
</GUI>
</transform>
<transform>
@@ -111,7 +115,7 @@ limitations under the License.
<schema_name/>
</partitioning>
<connection>hop-samples</connection>
- <procedure>addCount</procedure>
+ <procedure>LENGTH</procedure>
<lookup>
<arg>
<name>value</name>
@@ -120,14 +124,14 @@ limitations under the License.
</arg>
</lookup>
<result>
- <name>count</name>
+ <name>length</name>
<type>Integer</type>
</result>
<auto_commit>Y</auto_commit>
<attributes/>
<GUI>
<xloc>352</xloc>
- <yloc>96</yloc>
+ <yloc>160</yloc>
</GUI>
</transform>
<transform_error_handling>
diff --git
a/plugins/transforms/fieldschangesequence/src/main/samples/transforms/add-value-fields-changing-sequence.hpl
b/plugins/transforms/fieldschangesequence/src/main/samples/transforms/add-value-fields-changing-sequence.hpl
index d98f70b33d..4c3281aaf7 100644
---
a/plugins/transforms/fieldschangesequence/src/main/samples/transforms/add-value-fields-changing-sequence.hpl
+++
b/plugins/transforms/fieldschangesequence/src/main/samples/transforms/add-value-fields-changing-sequence.hpl
@@ -137,7 +137,7 @@ limitations under the License.
</partitioning>
<calculation>
<calc_type>CONSTANT</calc_type>
- <field_a>10.0</field_a>
+ <field_a>10</field_a>
<field_name>ten</field_name>
<remove>Y</remove>
<value_length>-1</value_length>