databend
databend copied to clipboard
Feature: Support PARTITION BY With Unloads
Summary
Snowflake allows:
COPY INTO { internalStage | externalStage | externalLocation }
FROM { [<namespace>.]<table_name> | ( <query> ) }
[ PARTITION BY <expr> ]
From looking at Databend's documentation, it seems like this is not supported. If it is, then I think it's a simple documentation update.
Rationale On Databend's 2025 roadmap is being an on-prem replacement for Snowflake. This is a feature that would bring Databend closer to feature parity with Snowflake.
I thought of these changes:
src/query/ast/src/ast/statements/copy.rsfor CopyIntoLocationStmt grammar definitionsrc/query/sql/src/planner/plans/copy_into_table.rsandsrc/query/sql/src/planner/plans/copy_into_location.rssupport new keywordssrc/query/service/src/interpreters/interpreter_copy_into_location.rsprepare physical plansrc/query/service/src/physical_plans/physical_copy_into_location.rsuse PipelineBuilder to write data. Here is the problem:build_append2table_with_commit_pipelineuse table API, but does not have any partition write API ...Do I need to add an API for it? Or do you have any good suggestions? @wubx