High level query optimization This leverages three optimization passes: 1. Class based simplification using the ``_simplify`` function and methods 2. Blockwise fusion Parameters ---------- expr: Input expression to optimize fuse: whether or not to tur
(expr: Expr, fuse: bool = True)
| 911 | |
| 912 | |
| 913 | def optimize(expr: Expr, fuse: bool = True) -> Expr: |
| 914 | """High level query optimization |
| 915 | |
| 916 | This leverages three optimization passes: |
| 917 | |
| 918 | 1. Class based simplification using the ``_simplify`` function and methods |
| 919 | 2. Blockwise fusion |
| 920 | |
| 921 | Parameters |
| 922 | ---------- |
| 923 | expr: |
| 924 | Input expression to optimize |
| 925 | fuse: |
| 926 | whether or not to turn on blockwise fusion |
| 927 | |
| 928 | See Also |
| 929 | -------- |
| 930 | simplify |
| 931 | optimize_blockwise_fusion |
| 932 | """ |
| 933 | stage: OptimizerStage = "fused" if fuse else "simplified-physical" |
| 934 | |
| 935 | return optimize_until(expr, stage) |
| 936 | |
| 937 | |
| 938 | def optimize_until(expr: Expr, stage: OptimizerStage) -> Expr: |
nothing calls this directly
no test coverage detected