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