You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Misleading/invalid documentation on SessionContext::sql and SessionConfig::create_logical_plan #7272
The comments for these two functions refer to each other, and the comment for SessionContext::sql indicates that create_logical_plan can be used to avoid DDL / DML statements etc. However, create_logical_plan doesn't restrict such statements (in particular, it is used by SessionContext::sql itself).
@alamb I spotted this when looking for a read-only LogicalPlan interface, just like the one you were aiming for in issue #4720 (and your PR #4721). Those were closed without any apparent plan for such an interface. It would be great to document (even if planned for the future).
Activity
UlfarErl commentedon Aug 12, 2023
@alamb I spotted this when looking for a read-only LogicalPlan interface, just like the one you were aiming for in issue #4720 (and your PR #4721). Those were closed without any apparent plan for such an interface. It would be great to document (even if planned for the future).
alamb commentedon Aug 13, 2023
Thanks @UlfarErl -- I agree the comments and API could be improved -- I'll try and improve them this week
The key for "read only" is to not call
SessionContext::execute_logical_plan-- so doSessionContext::create_logical_planAnd then
I agree this is not clear from the docs.
alamb commentedon Aug 18, 2023
Hi @UlfarErl --
I made a PR to update the documentation here #7327While working on it, it became clear the API is somewhat confusing (as you have already pointed out) #7328 -- PR to fix: #7333