Adalennis opened a new issue, #9286:
URL: https://github.com/apache/hop/issues/9286
### Apache Hop version?
2.20.0
### Java version?
Java 21
### Operating system
macOS
### What happened?
Found while testing the Vector value type on 2.20.0 (code unchanged on main).
**1. A vector breaks a comma-separated file**
The data types page says the canonical form `[0.1,0.2,0.3]` lets "a vector
survive a round trip through a text file". Text file output only encloses
String fields, so with `,` as separator and `"` as enclosure the vector is
written without quotes:
id,vector
a,[0.1,0.2,0.3]
b,[1.0,2.0]
Reading the file back with CSV file input (vector field of type Vector)
stops the transform:
There were 1 conversion errors on line 2
'[0.1' at position 0 is not a number in vector '[0.1'
With `;` as separator the round trip works. Possible fix: enclose Vector
values like Strings, or always when they contain the separator.
**2. The String to Vector conversion accepts more than the canonical form**
Converting with Select values:
| Input | Vector |
|---|---|
| `[1f, 2d, 0x1p3]` | `[1.0,2.0,8.0]` |
| `[NaN, Infinity]` | `[NaN,Infinity]` |
Java float literals are accepted, and NaN/Infinity are kept and written back
as `[NaN,Infinity]`, which is not valid JSON and is refused by pgvector.
Expected: only plain decimal numbers, with an error on NaN/Infinity.
### Issue Priority
Priority: 3
### Issue Component
Component: Hop Gui
--
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]