diff --git a/src/gateway/server.py b/src/gateway/server.py index 4c656ee..8e2135d 100644 --- a/src/gateway/server.py +++ b/src/gateway/server.py @@ -345,6 +345,8 @@ def AnalyzePlan(self, request, context): if request.schema: substrait = self._converter.convert_plan(request.schema.plan) self._statistics.add_plan(substrait) + if len(substrait.relations) != 1: + raise ValueError(f"Expected exactly _ONE_ relation in the plan: {request}") try: results = self._backend.execute(substrait) except Exception as err: