tenthe commented on PR #3570:
URL: https://github.com/apache/streampipes/pull/3570#issuecomment-2823326700

   Hi @Yuukadesu,
   
   Thanks a lot for the PR — really appreciate the contribution!
   
   I noticed you're checking the runtime type for each of the values. That 
makes sense, but I was wondering: could there be any edge cases where the 
declared type is `float`, but the actual value is something like `1` (which is 
technically an integer)? I'm not sure if this would cause issues when writing 
to the TSFile — do you know if it can handle consecutive values with slightly 
different types like that?
   
   If this turns out to be a potential problem, there's another approach you 
could consider: checking the event schema directly using the `Event` object:
   
   ```java
   event.getSchemaInfo().getEventSchema()
   ```
   
   This gives you a consistent view of the expected types.
   
   Also, if you're looking for type-safe access to the data, you can use:
   
   ```java
   event.getFieldByRuntimeName("runtimeName").getAsPrimitive().getAsBoolean()
   ```
   
   Of course, if the current map-based approach works fine with TSFile and 
handles mixed types well, feel free to stick with it — just wanted to mention 
this as another option in case it's useful.


-- 
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: dev-unsubscr...@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to