Skip to content

[Bug]: Error when "copy field" in Calculator transform if lazy conversion field #2140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
enricomariam42 opened this issue Jan 10, 2023 · 0 comments
Milestone

Comments

@enricomariam42
Copy link
Contributor

Apache Hop version?

SNAPSHOT-20230109

Java version?

openjdk version "11.0.9.1" 2020-11-04 OpenJDK Runtime Environment (build 11.0.9.1+1-post-Uos-1deb10u2) OpenJDK 64-Bit Server VM (build 11.0.9.1+1-post-Uos-1deb10u2, mixed mode, sharing)

Operating system

Linux

What happened?

"Copy field" in "Calculator" transform raise error in field from csv text input with lazy conversion enabled, like formula did in https://issues.apache.org/jira/browse/HOP-4587.

Sample pipeline with data:
copyField.zip

Log:

2023/01/10 12:58:29 - Hop - Pipeline opened.
2023/01/10 12:58:29 - Hop - Launching pipeline [copyField]...
2023/01/10 12:58:29 - Hop - Started the pipeline execution.
2023/01/10 12:58:29 - copyField - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2023/01/10 12:58:29 - copyField - Execution started for pipeline [copyField]
2023/01/10 12:58:29 - [copyField].asset.csv.0 - Header row skipped in file 'file:///home/enrico/repositories/hop/cdg/etl/nico/asset.csv'
2023/01/10 12:58:29 - [copyField].asset.csv.0 - Finished processing (I=18, O=0, R=0, W=17, U=0, E=0)
2023/01/10 12:58:29 - [copyField].newhostid.0 - Finished processing (I=0, O=0, R=17, W=17, U=0, E=0)
2023/01/10 12:58:29 - copyField - Pipeline duration : 0.164 seconds [  0.164" ]
2023/01/10 12:58:29 - copyField - ERROR: Error handling writing final pipeline state to location (non-fatal)
2023/01/10 12:58:29 - copyField - ERROR: org.apache.hop.core.exception.HopException: 
2023/01/10 12:58:29 - copyField - Error getting execution from Neo4j
2023/01/10 12:58:29 - copyField - org.apache.hop.core.exception.HopValueException: 
2023/01/10 12:58:29 - copyField - Unexpected conversion error while converting value [newhostid Integer] to an Integer
2023/01/10 12:58:29 - copyField - class [B cannot be cast to class java.lang.Long ([B and java.lang.Long are in module java.base of loader 'bootstrap')
2023/01/10 12:58:29 - copyField - 
2023/01/10 12:58:29 - copyField - 
2023/01/10 12:58:29 - copyField - 	at org.apache.hop.neo4j.execution.NeoExecutionInfoLocation.registerData(NeoExecutionInfoLocation.java:877)
2023/01/10 12:58:29 - copyField - 	at org.apache.hop.pipeline.engines.local.LocalPipelineEngine.stopTransformExecutionInfoTimer(LocalPipelineEngine.java:486)
2023/01/10 12:58:29 - copyField - 	at org.apache.hop.pipeline.engines.local.LocalPipelineEngine.pipelineCompleted(LocalPipelineEngine.java:465)
2023/01/10 12:58:29 - copyField - 	at org.apache.hop.pipeline.Pipeline.firePipelineExecutionFinishedListeners(Pipeline.java:1343)
2023/01/10 12:58:29 - copyField - 	at org.apache.hop.pipeline.Pipeline.lambda$startThreads$0(Pipeline.java:1142)
2023/01/10 12:58:29 - copyField - 	at org.apache.hop.pipeline.transform.BaseTransform.fireTransformFinishedListeners(BaseTransform.java:2779)
2023/01/10 12:58:29 - copyField - 	at org.apache.hop.pipeline.transform.BaseTransform.markStop(BaseTransform.java:2768)
2023/01/10 12:58:29 - copyField - 	at org.apache.hop.pipeline.transform.RunThread.run(RunThread.java:142)
2023/01/10 12:58:29 - copyField - 	at java.base/java.lang.Thread.run(Thread.java:834)
2023/01/10 12:58:29 - copyField - Caused by: java.lang.RuntimeException: org.apache.hop.core.exception.HopValueException: 
2023/01/10 12:58:29 - copyField - Unexpected conversion error while converting value [newhostid Integer] to an Integer
2023/01/10 12:58:29 - copyField - class [B cannot be cast to class java.lang.Long ([B and java.lang.Long are in module java.base of loader 'bootstrap')
2023/01/10 12:58:29 - copyField - 
2023/01/10 12:58:29 - copyField - 	at org.apache.hop.neo4j.execution.NeoExecutionInfoLocation.saveNeo4jRowsAndMeta(NeoExecutionInfoLocation.java:1115)
2023/01/10 12:58:29 - copyField - 	at org.apache.hop.neo4j.execution.NeoExecutionInfoLocation.registerNeo4jData(NeoExecutionInfoLocation.java:944)
2023/01/10 12:58:29 - copyField - 	at org.apache.hop.neo4j.execution.NeoExecutionInfoLocation.lambda$registerData$11(NeoExecutionInfoLocation.java:875)
2023/01/10 12:58:29 - copyField - 	at org.neo4j.driver.internal.InternalSession.lambda$transaction$4(InternalSession.java:150)
2023/01/10 12:58:29 - copyField - 	at org.neo4j.driver.internal.retry.ExponentialBackoffRetryLogic.retry(ExponentialBackoffRetryLogic.java:103)
2023/01/10 12:58:29 - copyField - 	at org.neo4j.driver.internal.InternalSession.transaction(InternalSession.java:146)
2023/01/10 12:58:29 - copyField - 	at org.neo4j.driver.internal.InternalSession.writeTransaction(InternalSession.java:124)
2023/01/10 12:58:29 - copyField - 	at org.neo4j.driver.internal.InternalSession.writeTransaction(InternalSession.java:118)
2023/01/10 12:58:29 - copyField - 	at org.apache.hop.neo4j.execution.NeoExecutionInfoLocation.registerData(NeoExecutionInfoLocation.java:875)
2023/01/10 12:58:29 - copyField - 	... 8 more
2023/01/10 12:58:29 - copyField - Caused by: org.apache.hop.core.exception.HopValueException: 
2023/01/10 12:58:29 - copyField - Unexpected conversion error while converting value [newhostid Integer] to an Integer
2023/01/10 12:58:29 - copyField - class [B cannot be cast to class java.lang.Long ([B and java.lang.Long are in module java.base of loader 'bootstrap')
2023/01/10 12:58:29 - copyField - 
2023/01/10 12:58:29 - copyField - 	at org.apache.hop.core.row.value.ValueMetaBase.getInteger(ValueMetaBase.java:2368)
2023/01/10 12:58:29 - copyField - 	at org.apache.hop.core.row.value.ValueMetaInteger.getNativeDataType(ValueMetaInteger.java:40)
2023/01/10 12:58:29 - copyField - 	at org.apache.hop.neo4j.execution.NeoExecutionInfoLocation.saveNeo4jRowsAndMeta(NeoExecutionInfoLocation.java:1081)
2023/01/10 12:58:29 - copyField - 	... 16 more
2023/01/10 12:58:29 - copyField - Caused by: java.lang.ClassCastException: class [B cannot be cast to class java.lang.Long ([B and java.lang.Long are in module java.base of loader 'bootstrap')
2023/01/10 12:58:29 - copyField - 	at org.apache.hop.core.row.value.ValueMetaBase.getInteger(ValueMetaBase.java:2281)
2023/01/10 12:58:29 - copyField - 	... 18 more
2023/01/10 12:58:29 - copyField - Execution finished on a local pipeline engine with run configuration 'local'

Issue Priority

Priority: 3

Issue Component

Component: Transforms

@github-actions github-actions bot added P3 Nice to have Transforms labels Jan 10, 2023
@enricomariam42 enricomariam42 changed the title [Bug]: Error "copy field" in Calculator transform in lazy conversion field [Bug]: Error when "copy field" in Calculator transform if lazy conversion field Jan 10, 2023
@sramazzina sramazzina added this to the 2.5 milestone Apr 21, 2023
@hansva hansva modified the milestones: 2.5, 2.6 Jun 7, 2023
@hansva hansva modified the milestones: 2.6, 2.7 Sep 1, 2023
@hansva hansva modified the milestones: 2.7, 2.8 Nov 17, 2023
@hansva hansva modified the milestones: 2.8, 2.9 Feb 28, 2024
@hansva hansva modified the milestones: 2.9, 2.10 May 20, 2024
@hansva hansva modified the milestones: 2.10, 2.11 Sep 25, 2024
@hansva hansva modified the milestones: 2.11, 2.12 Dec 3, 2024
@hansva hansva modified the milestones: 2.12, 2.13 Jan 31, 2025
@hansva hansva removed the bug label Mar 12, 2025
@hansva hansva modified the milestones: 2.13, 2.14 Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants