Evaluate Snowflake INSERT OVERWRITE … DELETING WHERE support

Abierto
#6,296 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 4 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python, sql

Línea de trabajo

Start by tracing the Snowflake overwrite path and its callers, then compare source filtering, interval boundaries, empty results, multiple batches, and target reads. Check SQLGlot support, shared adapter behavior, supported table types, fallback or configuration needs, and relevant integration tests. Benchmark the existing transactional strategy against INSERT OVERWRITE … DELETING WHERE for scanning, locking, concurrency, and failures before recommending adoption, deferral, or no change.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Snowflake introduced INSERT OVERWRITE … DELETING WHERE on November 20, 2026. I'd like to understand whether it's worth using in SQLMesh's Snowflake adapter before we implement support. Keeping the current behavior may be the right answer.

SQLMesh already uses the shared delete-and-insert strategy for Snowflake time-range overwrites and wraps the operation in a transaction. Combining those statements doesn't by itself tell us whether correctness or performance improves. My concern is that we could add another engine-specific code path without enough benefit to justify maintaining it.

Please investigate:

  • What limitation of the current strategy this addresses, or what measurable benefit users would get. Separate what Snowflake documents from what the code suggests and what you've verified against Snowflake.
  • How the semantics compare. Trace the overwrite path and its callers, including source filtering, interval boundaries, empty results, multiple source batches, and queries that read the target table. Snowflake's deletion predicate doesn't filter inserted rows.
  • How it performs against the current transactional strategy on representative workloads. Consider scanning, locking, concurrent batch evaluation, and failure behavior where relevant. Fewer statements alone aren't evidence of lower cost or faster execution.
  • How it fits the existing overwrite strategies and whether we'd need a new one. Check SQLGlot support, effects on shared adapter behavior, supported table types, compatibility, and any fallback or configuration we'd need.
  • What we'd have to maintain: additional code paths, dependencies, and integration tests. Does the demonstrated benefit justify that work?

Recommend whether to adopt it, defer it, or leave the current behavior in place, with supporting evidence and any open questions. If adoption makes sense, propose the smallest scope that delivers the benefit.

Reference: Snowflake INSERT semantics and limitations.

Lenguaje dominante
Python
Estrellas
3.3k
Forks
471
Merge medio
6 d 7 h
PR fusionados (30 d)
35

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de SQLMesh/sqlmesh

Todos los issues de SQLMesh/sqlmesh

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.