[coverage] Conformance findings: GEOSPATIAL-009

Offen
#504 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
databases, go
Bereich
database

Rechercherichtung

Start with internal/backend/kernel/rows.go, where newKernelRows imports the Arrow C schema, and inspect the coverage PR diff under tests/ for TestDuplicateColumnAliasReportsEachColumnOwnLogicalType. Reproduce with the supplied SQL using two output columns aliased as g; done means the driver returns both columns without panicking and reports each column's value and logical type by position.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Summary

Surfaced by the multi-language coverage fan-out while conformance-testing these SPEC-IDs against databricks/databricks-sql-go. Each finding is committed as an expected-failure (xfail) test in the coverage PR — the test asserts the CORRECT (post-fix) behavior and stays red until THIS driver (databricks/databricks-sql-go) is fixed, then flips green as a tripwire.

Findings

  • GEOSPATIAL-009 [sea]: SEA/kernel backend PANICS ("arrow: duplicate field with name") instead of reporting each column's own logical type by position when two result columns share one SQL output alias: newKernelRows imports the Arrow C schema via a name-keyed arrow.StructOf (ImportCArrowSchema in internal/backend/kernel/rows.go), crashing the caller's process
    • failing test: TestDuplicateColumnAliasReportsEachColumnOwnLogicalType (see the coverage PR diff under tests/)
  • GEOSPATIAL-009: SEA/kernel backend PANICS ("arrow: duplicate field with name") instead of reporting each column's own logical type by position when a result has two columns sharing one SQL output alias: newKernelRows imports the Arrow C schema via a name-keyed arrow.StructOf (ImportCArrowSchema in internal/backend/kernel/rows.go), which rejects a legal duplicate alias and crashes the caller's process

Reproduce & Expected

GEOSPATIAL-009 — A result set may contain TWO columns with the SAME name — SQL permits duplicate output aliases — and the driver must report each column's own type by POSITION.

Reproduce:

SELECT 'plain' AS g, geom_0 AS g
FROM {catalog}.{schema}.geo_types_{unique} WHERE id = 1

Expected (per the shared spec):

  • result has exactly 1 row(s)
  • result has 2 column(s)
  • col 0 is named g
  • col 1 is named g
  • col 0, row 0 == 'plain' (type Utf8)
  • full assertion contract:
result:
- row_count: 1
- column_count: 2
- column:
    index: 0
    name: g
- column:
    index: 1
    name: g
- column:
    index: 0
    row: 0
    type: Utf8
    equals: plain
- geo_logical_type:
    index: 1
    type_name: GEOMETRY
    type_text: GEOMETRY(0)
- geo_logical_type:
    index: 0
    geospatial: false

Context

Vorherrschende Sprache
Go
Sterne
53
Forks
69
Ø Merge
2 T. 12 Std.
Gemergte PRs (30 T.)
16

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus databricks/databricks-sql-go

Alle Issues in databricks/databricks-sql-go

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.