mustafasrepo commented on PR #4616:
URL: 
https://github.com/apache/arrow-datafusion/pull/4616#issuecomment-1351672813

   Thanks @Ted-Jiang for the contribution. I think in the long run breaking the 
`update_batch` and `retract_batch` API makes code hard to maintain. I wonder 
whether is there any way to hide `SegmentTree` implementation behind 
`update_batch` and `retract_batch` calls (I will experiment with it). Also your 
implementation stores all batch at the beginning and queries its result 
according to range. There is also a data structure [in the 
discussion](https://stackoverflow.com/questions/4802038/implement-a-queue-in-which-push-rear-pop-front-and-get-min-are-all-consta)
 that supports push, pop, get (update, retract, evaluate in our case) with 
amortized O(1) complexity. I think this data structure is better for our use 
case in terms of complexity and support for incremental implementation. I have 
opened an issue previously discussing these points #4402. I am putting it here, 
in case it helps. 


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