You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: query_plan.rs
    path of file: ./repos/LocustDB/src/engine/planning
    
    the code of the file until where you have to start completion: // TODO: figure out why clippy complains
#![allow(clippy::nonstandard_macro_braces, clippy::unused_unit)]
use chrono::{Datelike, NaiveDateTime};
use locustdb_derive::ASTBuilder;
use regex;
use regex::Regex;

use crate::engine::*;
use crate::ingest::raw_val::RawVal;
use crate::mem_store::column::DataSource;
use crate::mem_store::value::Val;
use crate::mem_store::*;
use crate::syntax::expression::*;
use crate::QueryError;
use std::collections::HashMap;
use std::i64;
use std::result::Result;
use std::sync::Arc;

#[derive(ASTBuilder, Debug, Clone)]
pub enum QueryPlan {
    /// Retrieves the buffer for the specified section of the column with name `name`.
    ColumnSection {
        name: String,
        section: usize,
        #[nohash]
        range: Option<(i64, i64)>,
        #[output(t = "base=provided")]
        column_section: TypedBufferRef,
    },
    Connect {
        input: TypedBufferRef,
        output: TypedBufferRef,
    },
    /// Combines a vector with a null map.
    AssembleNullable {
        data: TypedBufferRef,
        present: BufferRef<u8>,
        #[output(t = "base=data;null=_always")]
        nullable: TypedBufferRef,
    },
    /// Combines a vector with the null map of another vector.
    PropagateNullability {
        nullable: TypedBufferRef,
        data: TypedBufferRef,
        #[output(t = "base=data;null=_always")]
        nullable_data: TypedBufferRef,
    },
    /// Combines the null maps of two vectors, setting the result to null if any if the inputs were null.
    CombineNullMaps {
        lhs: TypedBufferRef,
        rhs: TypedBufferRef,
        #[output]
        present: BufferRef<u8>,
    },
    GetNullMap {
        nullable: TypedBufferRef,
        #[output]
        present: BufferRef<u8>,
    },
    /// Combines a vector with a null map where none of the elements are null.
    MakeNullable {
        data: TypedBufferRef,
        #[internal]
        present: BufferRef<u8>,
        #[output(t = "base=data;null=_always")]
        nullable: TypedBufferRef,
    },
    /// Converts NullableI64 or NullableStr into a representation where nulls are encoded as part
    /// of the data (i64 with i64::MIN representing null for NullableI64, and Option<&str> for NullableStr).
    FuseNulls {
        nullable: TypedBufferRef,
        #[output(t = "base=nullable
    
fn function2_registry() -> HashMap<Func2Type, Vec<Function2>> {
    vec![
        (
            Func2Type::Add,
            vec![Function2::integer_op(Box::new(|qp, lhs, rhs| {
                qp.checked_add(lhs, rhs)
            }))],
        ),
        (
            Func2Type::Subtract,
            vec![Function2::integer_op(Box::new(|qp, lhs, rhs| {
                qp.checked_subtract(lhs, rhs)
            }))],
        ),
        (
            Func2Type::Multiply,
            vec![
                Function2::integer_op(Box::new(|qp, lhs, rhs| {
                    qp.checked_multiply(lhs, rhs)
                })),
                Function2::float_op(Box::new(|qp, lhs, rhs| {
                    qp.multiply(lhs, rhs, EncodingType::F64)
                }), BasicType::Integer, BasicType::Float),
                Function2::float_op(Box::new(|qp, lhs, rhs| {
                    qp.multiply(lhs, rhs, EncodingType::F64)
                }), BasicType::Float, BasicType::Integer),
                Function2::float_op(Box::new(|qp, lhs, rhs| {
                    qp.multiply(lhs, rhs, EncodingType::F64)
                }), BasicType::Float, BasicType::Float),
            ],
        ),
        (
            Func2Type::Divide,
            vec![Function2::integer_op(Box::new(|qp, lhs, rhs| {
                qp.checked_divide(lhs, rhs)
            }))],
        ),
        (
            Func2Type::Modulo,
            vec![Function2::integer_op(Box::new(|qp, lhs, rhs| {
                qp.checked_modulo(lhs, rhs)
            }))],
        ),
        (
            Func2Type::LT,
            vec![
                Function2::comparison_op(
                    Box::new(|qp, lhs, rhs| qp.less_than(lhs, rhs)),
                    BasicType::Integer,
                ),
                Function2::comparison_op(
                    Box::new(|qp, lhs, rhs| qp.less_than(lhs, rhs)),
                    BasicType::String,
                ),
            ],
        ),
        (
            Func2Type::LTE,
            vec![
                Function2::comparison_op(
                    Box::new(|qp, lhs, rhs| qp.less_than_equals(lhs, rhs)),
                    BasicType::Integer,
                ),
                Function2::comparison_op(
                    Box::new(|qp, lhs, rhs| qp.less_than_equals(lhs, rhs)),
                    BasicType::String,
                ),
            ],
        ),
        (
            Func2Type::GT,
            vec![
                Function2::comparison_op(
                    Box::new(|qp, lhs, rhs| qp.less_than(rhs, lhs)),
                    BasicType::Integer,
                ),
                Function2::comparison_op(
                    Box::new(|qp, lhs, rhs| qp.less_than(rhs, lhs)),
                    BasicType::String,
                ),
            ],
        ),
        (
            Func2Type::GTE,
            vec![
                Function2::comparison_op(
                    Box::new(|qp, lhs, rhs| qp.less_than_equals(rhs, lhs)),
                    BasicType::Integer,
                ),
                Function2::comparison_op(
                    Box::new(|qp, lhs, rhs| qp.less_than_equals(rhs, lhs)),
                    BasicType::String,
                ),
            ],
        ),
        (
            Func2Type::Equals,
            vec![
                Function2::comparison_op(
                    Box::new(|qp, lhs, rhs| qp.equals(lhs, rhs)),
                    BasicType::Integer,
                ),
                Function2::comparison_op(
                    Box::new(|qp, lhs, rhs| qp.equals(lhs, rhs)),
                    BasicType::String,
                ),
            ],
        ),
        (
            Func2Type::NotEquals,
            vec![
                Function2::comparison_op(
                    Box::new(|qp, lhs, rhs| qp.not_equals(lhs, rhs)),
                    BasicType::Integer,
                ),
                Function2::comparison_op(
                    Box::new(|qp, lhs, rhs| qp.not_equals(lhs, rhs)),
                    BasicType::String,
                ),
            ],
        ),
    ]
    .into_iter()
    .collect()
}