Returns an error if the plan does not have the expected schema. Ignores metadata and nullability.
(schema: &DFSchemaRef, plan: &LogicalPlan)
| 112 | /// Returns an error if the plan does not have the expected schema. |
| 113 | /// Ignores metadata and nullability. |
| 114 | pub fn assert_expected_schema(schema: &DFSchemaRef, plan: &LogicalPlan) -> Result<()> { |
| 115 | let compatible = plan.schema().logically_equivalent_names_and_types(schema); |
| 116 | |
| 117 | assert_or_internal_err!( |
| 118 | compatible, |
| 119 | "Failed due to a difference in schemas: original schema: {:?}, new schema: {:?}", |
| 120 | schema, |
| 121 | plan.schema() |
| 122 | ); |
| 123 | Ok(()) |
| 124 | } |
| 125 | |
| 126 | /// Asserts that the subqueries are structured properly with valid node placement. |
| 127 | /// |
no test coverage detected
searching dependent graphs…