Skip to main content

Dialect

Trait Dialect 

Source
pub trait Dialect {
    // Required methods
    fn whole_table_checksum_sql(
        &self,
        table: &TableRef,
        plan: &ComparePlan,
    ) -> Result<String>;
    fn joindiff_sql(
        &self,
        a: &TableRef,
        b: &TableRef,
        plan: &ComparePlan,
    ) -> Result<JoinDiffQuery>;
    fn materialize_sql(
        &self,
        a: &TableRef,
        b: &TableRef,
        plan: &ComparePlan,
        target: &TableRef,
    ) -> Result<String>;
    fn normalize_column(&self, col: &ColumnSchema) -> Result<String>;
    fn digest_expr(&self, canon_cols: &[String]) -> Result<String>;
    fn keyspace_bounds_sql(
        &self,
        table: &TableRef,
        key: &ColumnSchema,
    ) -> Result<String>;
    fn segment_checksum_sql(
        &self,
        table: &TableRef,
        plan: &ComparePlan,
        segment: &Segment,
    ) -> Result<String>;
    fn segment_rows_sql(
        &self,
        table: &TableRef,
        plan: &ComparePlan,
    ) -> Result<String>;
}

Required Methods§

Source

fn whole_table_checksum_sql( &self, table: &TableRef, plan: &ComparePlan, ) -> Result<String>

joindiff: fast-exit precheck (whole-table checksum + count)

Source

fn joindiff_sql( &self, a: &TableRef, b: &TableRef, plan: &ComparePlan, ) -> Result<JoinDiffQuery>

joindiff: full outer join

Source

fn materialize_sql( &self, a: &TableRef, b: &TableRef, plan: &ComparePlan, target: &TableRef, ) -> Result<String>

materialize: one CREATE TABLE AS … writing the joindiff result (op / key / src_row / dst_row JSON) server-side. Plain CTAS: fails if target exists — never drops or replaces (docs/superpowers spec, 2026-07-05).

Source

fn normalize_column(&self, col: &ColumnSchema) -> Result<String>

hashdiff: normalization matrix - One column -> canonical SQL expression

Source

fn digest_expr(&self, canon_cols: &[String]) -> Result<String>

hashdiff: per-row digest from canonical expressions -> md5 -> two u64 halves

Source

fn keyspace_bounds_sql( &self, table: &TableRef, key: &ColumnSchema, ) -> Result<String>

hashdiff: bound the keyspace

Source

fn segment_checksum_sql( &self, table: &TableRef, plan: &ComparePlan, segment: &Segment, ) -> Result<String>

hashdiff: one segment’s checksum tuple, server-side execution

Source

fn segment_rows_sql( &self, table: &TableRef, plan: &ComparePlan, ) -> Result<String>

hashdiff: leaf rows for a narrowed, still-disagreeing segment

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§