Skip to content

Join of projected relation fails #190

@fabiansinz

Description

@fabiansinz

Consider this simple example where primary keys match but non-primaries don't.

@schema
class DataA(dj.Lookup):
    definition = """
    idx     : int
    ---
    a       : int
    """

    @property
    def contents(self):
        yield from zip(range(5), range(5))


@schema
class DataB(dj.Lookup):
    definition = """
    idx     : int
    ---
    a       : int
    """

    @property
    def contents(self):
        yield from zip(range(5), range(5, 10))

DataA().project() * DataB().project() should have five entries, but it has zero. When looking at the mysql-query, one can see that the data is not projected before the join. I generated a test case for that (this exact example). It is part of pull request #189.

Metadata

Metadata

Labels

bugIndicates an unexpected problem or unintended behavior

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions