yql_plan.h 606 B

123456789101112131415161718192021222324252627282930
  1. #pragma once
  2. #include <yql/essentials/core/type_ann/type_ann_core.h>
  3. #include <library/cpp/yson/writer.h>
  4. #include <optional>
  5. namespace NYql {
  6. struct TPlanSettings {
  7. TPlanSettings& SetWithLimits(bool limits) {
  8. WithLimits = limits;
  9. return *this;
  10. }
  11. bool WithLimits = true;
  12. };
  13. class IPlanBuilder {
  14. public:
  15. virtual ~IPlanBuilder() {};
  16. virtual void Clear() = 0;
  17. virtual void WritePlan(NYson::TYsonWriter& writer, const TExprNode::TPtr& root, const TPlanSettings& settings = {}) = 0;
  18. };
  19. TAutoPtr<IPlanBuilder> CreatePlanBuilder(TTypeAnnotationContext& types);
  20. }