kz930 commented on code in PR #8341:
URL: https://github.com/apache/texera/pull/8341#discussion_r4268689920


##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/StandaloneHelpers.scala:
##########
@@ -144,6 +144,38 @@ object StandaloneHelpers {
       |    return float(x)
       |
       |
+      |def _texera_java_double(text):
+      |    # Double.parseDouble on the trimmed text, which a read field reaches
+      |    # through `toDouble`. It takes a trailing d or f as a type suffix 
and
+      |    # 0x...p... as a hex literal, both of which float() refuses.
+      |    text = text.strip()
+      |    if text[-1:] in ("d", "D", "f", "F"):
+      |        text = text[:-1]
+      |    if text.lstrip("+-")[:2].lower() == "0x":
+      |        return float.fromhex(text)

Review Comment:
   Hex literals past the largest double now read as ±Infinity, matching Java, 
and `0x1p1024` / `-0x1p1024` are in the parity tests for CSV, CSV Old and 
Parallel CSV (1b126e0c6).



-- 
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