LukasZahradnik / deep-db-learning

A modular message-passing scheme reflecting the relational model for end-to-end deep learning from databases
https://lukaszahradnik.github.io/deep-db-learning/
6 stars 2 forks source link

Wrong use of schema in dataset for determining the primary key #6

Closed neumannjan closed 1 year ago

neumannjan commented 1 year ago

https://github.com/LukasZahradnik/deep-db-learning/blob/a52d83dcb086377e46cc9346466c7ad3a8f04b3f/db_transformer/ndata/dataset.py#L98

The above is incorrect. The type can be anything else but it can still be (part of) the primary key. The KeyColumnDef type only means "this is nothing else than a primary key", i.e. basically the same as OmitColumnDef.

Instead, the key boolean attribute should be used.