datafusion_expr/preimage.rs
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: See the NOTICE file distributed with this work for additional information regarding copyright ownership
3// SPDX-FileContributor: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements
4
5use datafusion_expr_common::interval_arithmetic::Interval;
6
7use crate::Expr;
8
9/// Return from [`crate::ScalarUDFImpl::preimage`]
10pub enum PreimageResult {
11 /// No preimage exists for the specified value
12 None,
13 /// The expression always evaluates to the specified constant
14 /// given that `expr` is within the interval
15 Range { expr: Expr, interval: Box<Interval> },
16}