Code generation mishandles set, variable-length tuple, and Sequence collection types
I maintainer di solito rispondono entro 1 giorno
@sethfitz ci sta già lavorando.
Dal 22/7/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Reported by @vcschapp during review of #518.
The code generator "supports" several collection types that Pydantic accepts, but the generated output is wrong for both the Markdown and PySpark targets. No Overture model uses these types today, so this does not block current work -- filing for later.
Affected annotations:
set, e.g.set[str]- variable-length tuples (list-equivalent), e.g.
tuple[str, ...] Sequence, e.g.Sequence[str](Pydantic accepts it)
A bonus case: fixed-length tuples whose element Spark types are all the same base type, e.g. tuple[str, str] or tuple[str, SnakeCaseString].
Current behavior
| Annotation | FieldShape | Spark schema type | Markdown | Correction |
|---|---|---|---|---|
list[str] |
ArrayOf(Primitive('str')) |
ArrayType(StringType()) (correct) |
list<str> (correct) |
N/A |
set[str] |
Primitive('set') |
StringType() (wrong) |
set (wrong) |
Spark array, MD set<str>? |
tuple[str, ...] |
Primitive('tuple') |
StringType() (wrong) |
tuple (wrong) |
Spark array, MD list<str>? |
tuple[str, str, str] |
Primitive('tuple') |
StringType() (wrong) |
tuple (wrong) |
Spark array, MD ??? |
tuple[str, int] |
Primitive('tuple') |
StringType() (wrong) |
tuple (wrong) |
fail codegen |
Sequence[str] |
raises TypeError |
aborts run (wrong) | aborts run (wrong) | Spark array, MD list<str>? |
This is a general code-generation issue (FieldShape extraction), not specific to the PySpark target.
- Lingua principale
- Python
- Stelle
- 219
- Fork
- 20
- Merge medio
- 1g 21h
- PR unite (30g)
- 37
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OvertureMaps/schema
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
OvertureMaps/schema#867 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
OvertureMaps/schema#694 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
OvertureMaps/schema#693 ·
I maintainer di solito rispondono entro 1 giorno
-
chore
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
OvertureMaps/schema#675 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG](ci) `main` fails `make check` on unused `type: ignore` commentsForse già presa @sethfitz l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
OvertureMaps/schema#899 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di OvertureMaps/schema
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
521xueweihan/HelloGitHub#4729 ·
-
auto-reported bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
cliproxy-quota: a tab around a credential email skips own-accounts and paced-accounts matchingApertaneeds-triage type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
pollen-robotics/reachy_mini_conversation_app#631 ·
I maintainer di solito rispondono entro 7 giorni
-
stix-atlas.json: the same relationship id is used for several different mitigates relationshipsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100