| 1719 | }; |
| 1720 | |
| 1721 | const core::WindowNode::Frame createWindowFrame( |
| 1722 | const duckdb::IExprWindowFrame& windowFrame, |
| 1723 | const TypePtr& inputRow, |
| 1724 | memory::MemoryPool* pool) { |
| 1725 | core::WindowNode::Frame frame; |
| 1726 | frame.type = (windowFrame.type == duckdb::WindowType::kRows) |
| 1727 | ? core::WindowNode::WindowType::kRows |
| 1728 | : core::WindowNode::WindowType::kRange; |
| 1729 | |
| 1730 | auto boundTypeConversion = |
| 1731 | [](duckdb::BoundType boundType) -> core::WindowNode::BoundType { |
| 1732 | switch (boundType) { |
| 1733 | case duckdb::BoundType::kCurrentRow: |
| 1734 | return core::WindowNode::BoundType::kCurrentRow; |
| 1735 | case duckdb::BoundType::kFollowing: |
| 1736 | return core::WindowNode::BoundType::kFollowing; |
| 1737 | case duckdb::BoundType::kPreceding: |
| 1738 | return core::WindowNode::BoundType::kPreceding; |
| 1739 | case duckdb::BoundType::kUnboundedFollowing: |
| 1740 | return core::WindowNode::BoundType::kUnboundedFollowing; |
| 1741 | case duckdb::BoundType::kUnboundedPreceding: |
| 1742 | return core::WindowNode::BoundType::kUnboundedPreceding; |
| 1743 | } |
| 1744 | BOLT_UNREACHABLE(); |
| 1745 | }; |
| 1746 | frame.startType = boundTypeConversion(windowFrame.startType); |
| 1747 | frame.startValue = windowFrame.startValue |
| 1748 | ? core::Expressions::inferTypes(windowFrame.startValue, inputRow, pool) |
| 1749 | : nullptr; |
| 1750 | frame.endType = boundTypeConversion(windowFrame.endType); |
| 1751 | frame.endValue = windowFrame.endValue |
| 1752 | ? core::Expressions::inferTypes(windowFrame.endValue, inputRow, pool) |
| 1753 | : nullptr; |
| 1754 | return frame; |
| 1755 | } |
| 1756 | |
| 1757 | std::vector<core::FieldAccessTypedExprPtr> parsePartitionKeys( |
| 1758 | const duckdb::IExprWindowFunction& windowExpr, |
no outgoing calls
no test coverage detected