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).
https://github.com/apache/arrow-datafusion/blob/00627785718d9d98998021bf44585f32c33af3ea/datafusion/core/src/execution/context.rs#L351C11-L351C11
https://github.com/apache/arrow-datafusion/blob/00627785718d9d98998021bf44585f32c33af3ea/datafusion/core/src/execution/context.rs#L1777