tenthe commented on issue #2338:
URL: https://github.com/apache/streampipes/issues/2338#issuecomment-4212434546

   There is currently an issue when the timestamp in the original CSV is 
provided as a string that needs to be parsed.
   
   The root of the problem lies in `FileReplayAdapter.getTimestampFromEvent`, 
where the timestamp must be extracted from the original event. This extraction 
happens **before** the transformation script is executed. However, we need 
access to the timestamp at this stage because it may be required to adjust the 
replay speed.
   
   ### Problem to solve
   
   We need a consistent way to handle timestamps at this point in the adapter.
   
   #### Option 1: Enforce a strict format
   
   * Define stricter requirements for the file replay adapter.
   * Require each line to contain a Unix timestamp.
   * If the requirement is not met, an error is shown to the user.
   
   #### Option 2: Parse string timestamps
   
   * Convert string-based timestamps into Unix timestamps (`long`).
   * Challenge: In Java, parsing requires a known timestamp pattern.
   * Unlike TypeScript (`new Date(event.timestamp).getTime()`), this cannot be 
handled generically without additional information.
   
   To reproduce and test this issue, the e2e test `valueRules.spec.ts` can be 
executed. This test is currently failing.
   
   ### Additional open issue
   
   There is also the case where no timestamp is present in the event stream at 
all.
   This scenario still needs a solution as well.
   
   
   


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