Akanksha-kedia opened a new pull request, #17079:
URL: https://github.com/apache/pinot/pull/17079

   The TODO comment in JsonUtils.java suggests changing the datetime format 
notation from colon-based (`1:HOURS:EPOCH`) to pipe-based (`EPOCH|HOURS`). 
After thorough code analysis, we can confirm this change is __completely safe__ 
with __no risk of code breakage__ since Apache Pinot version 0.11.0 has been 
released and the codebase already supports both notations transparently.
   
   ## Background
   
   - The TODO comment appears in multiple files including JsonUtils.java:
   
     ```java
     // TODO: Switch to new format after releasing 0.11.0
     //       "EPOCH|" + timeUnit.name()
     ```
   
   - The project has already progressed past version 0.11.0 (currently at 
1.5.0-SNAPSHOT)
   
   ## Key Findings
   
   1. __Both Formats Supported__: The DateTimeFormatSpec and 
DateTimeGranularitySpec classes handle both colon and pipe formats seamlessly.
   
   2. __No Direct String Dependencies__: The codebase doesn't perform direct 
string manipulation on format strings outside the proper parsing classes.
   
   3. __Mixed Format Support__: Using pipe format for `format` while keeping 
colon format for `granularity` works perfectly fine since they're parsed 
independently.
   
   4. __Backward Compatibility__: Existing data stored with the old format will 
continue to be read correctly with no issues.
   
   5. __No Code Breakage__: The parsing logic properly detects and handles both 
formats, ensuring no runtime failures or unexpected behavior.
   
   ## Recommendation
   
   Proceed with updating the format string from `1:timeUnit:EPOCH` to 
`EPOCH|timeUnit` while keeping granularity as `1:timeUnit`. This change aligns 
with the project's evolution toward the pipe format and poses no risk to system 
stability.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to