bamaer commented on PR #8927:
URL: https://github.com/apache/hop/pull/8927#issuecomment-6216779998

   @mattcasters, thanks. The new tests are clearly fresh: there are no 
`@author` tags, libformula names or PRD cases left in the module, and the 
spec-section citations make each case easy to check. I built the plugin from 
this branch. Checkstyle and spotless are clean, and the 29 tests pass.
   
   Since this replaces the revert, it's effectively the re-land of #8913, so 
the open items from that review belong here too.
   
   **Blockers**
   
   1. **`DAYS` argument order** (`DateTimeFunctions.java:471-473`): main is 
correct here, and this change would break it. Part 2 says `DAYS(EndDate; 
StartDate)`, but PDI does the opposite and subtracts the first date from the 
second. In PDI 9.4, `DAYS(DATE(2020;1;15);DATE(2020;1;10))` gives -5. Main also 
gives -5, and this PR gives 5. `KettleImport` sends every PDI Formula step to 
OpenFormula, so imported pipelines that use `DAYS` would silently flip sign. 
Where PDI and the spec differ, `openformula.adoc` already follows PDI (`DATE` 
with a year below 1900). Could you drop this change, assert -5 in the 
`DateTimeSpecTest` case (line 40), and add a line to the docs saying `DAYS` 
follows PDI's argument order?
   2. **Dates around DST** (`BinaryExpr.java:90-115`, `DateUtil.java:52`): in 
Europe/Brussels, `[d]+1` for 2026-10-25 gives 2026-10-25 23:00. From 29 to 30 
March gives 0 days in an Integer field. PDI and Formula return 2026-10-26 and 1.
   3. **Timestamp fields arrive as text** (`RowFormulaContext.java:144`): 
`[ts]+1` gives 1970-01-01, and `[ts]<DATE(2026;1;1)` is always false. 
`getDate()` should do it.
   4. **Result type fixed on the first row** (`OpenFormula.java:165`): with 
`IF([a]>0;[a];0)` into an Integer field, later rows store a BigDecimal and the 
next transform fails.
   
   Each of 2–4 deserves a test with those inputs. The spec cases avoid DST on 
purpose, so nothing currently catches them. I'm happy to share the PDI 
comparison setup or push those test cases to your branch.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to