mingmwang commented on issue #4617:
URL: 
https://github.com/apache/arrow-datafusion/issues/4617#issuecomment-1358718532

   > > This would require separating DDL from DML, with the latter requiring 
mutable access to the SessionContext. I'm inclined to think this is fine for a 
couple of reasons:
   > 
   > I agree and I have proposed this for some time: #1281. I think that since 
the DML processing is handled by SessionContext itself, this would work with 
your plan
   > 
   > Something else that would be worth looking at to figure out would be the 
DataFrame API which has both the state and a logical plan: 
https://github.com/apache/arrow-datafusion/blob/master/datafusion/core/src/dataframe.rs
   > 
   > I really like the idea of "TaskContext is created once the query is 
planned and is not mutable, and does not have shared state -- and it can 
perhaps make a copy of whatever parts of SessionState is needed to run the 
query"
   
   I think the `TaskContext` is already immutable after the creation. The 
mutability is within the `SessionState` and `SessionConfig`. I agree that any 
changes to the `SessionState` and `SessionConfig` should not impact any 
in-flight queries, no matter they are in the planning phase or running phase. 
That was something that I do not considered carefully when I do the refactoring 
work.  I will take a closer look at the new PRs.


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