Skip to content

[Bug]: Bug in Transform "Formula" more then 26 fields result in error #4366

@joaomalho

Description

@joaomalho

Apache Hop version?

2.9.0

Java version?

java 22.0.2 2024-07-16

Operating system

Windows

What happened?

Using this step for field comparison if we add more then 26 field it will result in a error:

2024/09/27 10:07:18 - Formula.0 -
2024/09/27 10:07:18 - Formula.0 - at org.apache.hop.pipeline.transforms.formula.Formula.processRow(Formula.java:197)
2024/09/27 10:07:18 - Formula.0 - at org.apache.hop.pipeline.transform.RunThread.run(RunThread.java:54)
2024/09/27 10:07:18 - Formula.0 - at java.base/java.lang.Thread.run(Thread.java:1570)
2024/09/27 10:07:18 - Formula.0 - Caused by: java.lang.IllegalStateException: Parsed past the end of the formula, pos: 270, length: 269, formula: IF(A1 = "", "Create",
IF(AND(A1 <> "", C1 = ""), "Delete",
IF(AND(A1 <> "", C1 <> "", OR
(F1 <> G1,
H1 <> I1,
J1 <> K1,
L1 <> M1,
N1 <> O1,
P1 <> Q1,
R1 <> S1,
T1 <> U1,
V1 <> W1,
X1 <> Y1,
Z1 <> [1)),
"Update", "")
)
)
2024/09/27 10:07:18 - Formula.0 - at org.apache.poi.ss.formula.FormulaParser.nextChar(FormulaParser.java:231)

If we use the same fields but remove 1, in this case the Z1 <> [1 it performe well.

image

This pipeline compile tables from two diferente server databases and then add two new columns according to the comparison between them. If IDs exist, dont, or if any data from other features associated to the same ID changed.

Issue Priority

Priority: 2

Issue Component

Component: Transforms

Metadata

Metadata

Assignees

Labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions