divyankshah commented on issue #4094:
URL: https://github.com/apache/jena/issues/4094#issuecomment-5084420182

   Hi @afs, I would like to fix this if possible. Below are the places I 
debugged and found out the changes would be needed - 
   
   1) Context.setCurrentDateTime(Context) (util/Context.java:448), the shared 
helper that unconditionally sets sysCurrentTime.
   
   2) QueryExecDataset.init() (exec/QueryExecDataset.java:117), calls the 
helper above on the query-side path.
   
   3) UpdateProcessorBase constructor (modify/UpdateProcessorBase.java:56), 
calls the helper above on the update-side path.
   
   4) UpdateProcessorStreamingBase constructor 
(modify/UpdateProcessorStreamingBase.java:45), same call, for the streaming 
update entry point.
   
   5) UpdateEngineBase.setupContext() (modify/UpdateEngineBase.java:48), a 
separate unconditional set that does not go through the shared helper, and 
fires later inside UpdateProcessorBase.execute() on the same context object.
   
   My approach: 
   
   change **Context.setCurrentDateTime(Context)** to only set 
**sysCurrentTime** if it is not already defined on the context, and use it at 
sites 2 to 5 in place of the current unconditional calls. Since sysCurrentTime 
has no other source (it is not seeded on the global or dataset context by 
default), checking for absence is enough to tell a builder supplied value apart 
from one that still needs to be generated. This also means fixing site 5 with 
the same check is safe even though it runs after site 3, on the same context. 
   
   Let me know if this matches what you had in mind, or if you would prefer a 
different approach. I am happy to open a PR once aligned and tested all changes.


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