fatmanverse commented on PR #12802: URL: https://github.com/apache/seatunnel/pull/12802#issuecomment-6515608141
Thanks @DanielLeens. Addressed in 985d3086f. **Issue 1 (Excel connector IT).** `LocalFileIT#testLocalFileExcel` now runs three more jobs: - `excel/fake_to_local_excel_numeric.conf` writes one row with the Excel sink: DOUBLE `10.285714285`, a `decimal(20, 4)` `1012345.6699` (fits a double, written as a number cell) and a `decimal(20, 4)` `9215784885957046.9450` (written as a text cell). - `excel/local_excel_numeric_poi_to_assert.conf` and `excel/local_excel_numeric_easyexcel_to_assert.conf` read the file back with `excel_engine = POI` and `EasyExcel` and assert the exact values. Assert compares DECIMAL with `BigDecimal#equals`, so the scale is checked too; the old reader returned `10.28571429`, `1012345.67` and `9215784885957046`. The files are under `/tmp/seatunnel_mnt/excel_numeric`, the mount shared by the Flink job manager and task manager, and the IT creates that directory empty and writable first because the Flink task manager is not root (without it the four Flink containers failed with `Mkdirs failed`). **One more fix found while adding this.** EasyExcel rounds `ReadCellData#getNumberValue()` to 15 significant digits (`EasyExcelConstants.EXCEL_MATH_CONTEXT`), so a DOUBLE such as `0.30000000000000004` was read back as `0.3`. Numeric columns now read `getOriginalNumberValue()`. `ExcelReadStrategyTest#testSinkOutputRoundTripsDoubleAndDecimal` has that row; it failed for EasyExcel only before the change (`expected: <0.30000000000000004> but was: <0.3>`). Verified on JDK 17: `connector-file-base` unit tests 383 run, 0 failures; `LocalFileIT#testLocalFileExcel` 6/6 (Flink 1.13/1.15/1.18/1.20, Spark 3.3, Zeta). -- 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]
