mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
Views built from the Glue catalog selected *, so the column names came from whatever the underlying files happened to spell rather than from the table. For a JSON table whose bodies use camelCase keys, a view over a table declaring lowercase columns still reported camelCase, and a client reading the declared names found nothing. Athena reports a table's declared column names: the catalog owns the schema and the SerDe maps the data onto it. A client written against that contract reads `tenantid` where the file says `tenantId`, gets no match, and sees an empty result with no error anywhere - the query succeeds, the rows are there, and every field is blank. Project the declared columns explicitly instead. Identifier resolution is case-insensitive here, so a declared name still binds to an inferred one differing from it only by case. Partition keys are projected alongside the data columns: they are part of the table's schema and are what partition predicates filter on. A partition key repeating a data column is projected once, since binding it twice would make the view ambiguous. A table that declares no columns keeps *, leaving inference in charge, so catalogs that never declared a schema are unaffected.