Skip to content

Commit 82f1735

Browse files
ai: apply changes for #995 (1 review thread)
Addresses: - #4341406782 at src/databricks/sql/utils.py:940 Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com>
1 parent dd57791 commit 82f1735

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎src/databricks/sql/utils.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,13 @@ def _concat_arrow_tables(table_chunks: List["pyarrow.Table"]) -> "pyarrow.Table"
934934
Promotion is only needed when chunk schemas actually differ (e.g. the
935935
nullability case from GH #418), so when every chunk shares the first
936936
chunk's schema we concatenate without promotion.
937+
938+
Known limitation: a result set that has *both* duplicate column names *and*
939+
chunks whose schemas genuinely differ falls through to the promotion path
940+
and still re-raises ``ArrowInvalid: Can't unify schema with duplicate field
941+
names``. Arrow cannot unify a schema with duplicate field names, so there is
942+
no promotion-based fix for that combination without renaming fields; it is a
943+
narrow, pre-existing edge left unhandled here.
937944
"""
938945
if all(table.schema.equals(table_chunks[0].schema) for table in table_chunks[1:]):
939946
return pyarrow.concat_tables(table_chunks)

0 commit comments

Comments
 (0)