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)
| 896 | |
| 897 | |
| 898 | def optimize(expr: Expr, fuse: bool = True) -> Expr: |
| 899 | """High level query optimization |
| 900 | |
| 901 | This leverages three optimization passes: |
| 902 | |
| 903 | 1. Class based simplification using the ``_simplify`` function and methods |
| 904 | 2. Blockwise fusion |
| 905 | |
| 906 | Parameters |
| 907 | ---------- |
| 908 | expr: |
| 909 | Input expression to optimize |
| 910 | fuse: |
| 911 | whether or not to turn on blockwise fusion |
| 912 | |
| 913 | See Also |
| 914 | -------- |
| 915 | simplify |
| 916 | optimize_blockwise_fusion |
| 917 | """ |
| 918 | stage: OptimizerStage = "fused" if fuse else "simplified-physical" |
| 919 | |
| 920 | return optimize_until(expr, stage) |
| 921 | |
| 922 | |
| 923 | def optimize_until(expr: Expr, stage: OptimizerStage) -> Expr: |
nothing calls this directly
no test coverage detected
searching dependent graphs…