amitvijapur commented on code in PR #11179:
URL: https://github.com/apache/arrow-rs/pull/11179#discussion_r4294745572


##########
arrow-cast/src/parse.rs:
##########
@@ -135,6 +135,16 @@ impl TimestampParser {
                 let time = time(hour, minute, second, 0)?;
                 Some((time, 17))
             }
+            // 09:26
+            m if m & 0b111111 == 0b011011

Review Comment:
   The extra mask is significant. For HH:MM, bytes 17 and 18 can already be 
timezone digits, as in `09:26+05:30`; comparing all eight bits would reject 
that valid input. Restricting the comparison to six bits checks the time prefix 
and requires byte 16 not to be a digit. In the October 12 verification, Codex 
removed the mask temporarily and the existing `+05:30` test failed. That 
mutation was reverted.
   



##########
arrow-cast/src/parse.rs:
##########
@@ -135,6 +135,16 @@ impl TimestampParser {
                 let time = time(hour, minute, second, 0)?;
                 Some((time, 17))
             }
+            // 09:26
+            m if m & 0b111111 == 0b011011
+                && self.test(13, b':')
+                && !self.test(16, b':')
+                && !self.test(16, b'.') =>

Review Comment:
   The downstream timezone parser would still reject these malformed suffixes. 
The guards keep them classified as time errors instead of falling back from 
malformed HH:MM:SS to HH:MM and reporting a timezone error. In the October 12 
verification, Codex removed the guards temporarily; `12:00:6.123Z` changed from 
`error parsing time` to an invalid-timezone error. That mutation was reverted.
   



##########
arrow-cast/src/parse.rs:
##########


Review Comment:
   Added `09:26` to the helper's accepted-format list in b74200a. The public 
parser examples already include it.
   



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