MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / describe_copy

Function describe_copy

src/sql/src/plan/statement/dml.rs:1849–1868  ·  view source on GitHub ↗
(
    scx: &StatementContext,
    CopyStatement {
        relation,
        direction,
        ..
    }: CopyStatement<Aug>,
)

Source from the content-addressed store, hash-verified

1847}
1848
1849pub fn describe_copy(
1850 scx: &StatementContext,
1851 CopyStatement {
1852 relation,
1853 direction,
1854 ..
1855 }: CopyStatement<Aug>,
1856) -> Result<StatementDesc, PlanError> {
1857 Ok(match (relation, direction) {
1858 (CopyRelation::Named { name, columns }, CopyDirection::To) => {
1859 describe_copy_item(scx, name, columns)?
1860 }
1861 (CopyRelation::Named { name, columns }, CopyDirection::From) => {
1862 describe_copy_from_table(scx, name, columns)?
1863 }
1864 (CopyRelation::Select(stmt), _) => describe_select(scx, stmt)?,
1865 (CopyRelation::Subscribe(stmt), _) => describe_subscribe(scx, stmt)?,
1866 }
1867 .with_is_copy())
1868}
1869
1870fn plan_copy_to_expr(
1871 scx: &StatementContext,

Callers 1

describeFunction · 0.85

Calls 5

describe_copy_itemFunction · 0.85
describe_copy_from_tableFunction · 0.85
describe_selectFunction · 0.85
describe_subscribeFunction · 0.85
with_is_copyMethod · 0.80

Tested by

no test coverage detected