Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Internal error when creating analyst table, analyst table contains nil column #4490

Closed
edongashi opened this issue Jun 29, 2020 · 0 comments
Closed
Assignees
Labels
Milestone

Comments

@edongashi
Copy link
Member

edongashi commented Jun 29, 2020

When I try to create the following analyst table:

SELECT * FROM (SELECT uid, SUM(price) FROM purchases GROUP BY 1) t

It fails with:

** (UndefinedFunctionError) function nil.access/0 is undefined
    nil.access()
    (cloak) lib/cloak/sql/query/lenses.ex:441: Cloak.Sql.Query.Lenses.unselectable_column?/1
    (lens) lib/lens.ex:488: anonymous fn/3 in Lens.filter/2
    (lens) lib/lens.ex:50: anonymous fn/2 in Lens.root/0
    (lens) lib/lens.ex:487: anonymous fn/4 in Lens.filter/2
    (lens) lib/lens.ex:484: anonymous fn/4 in Lens.filter/2
    (cloak) lib/cloak/sql/compiler/helpers.ex:193: Cloak.Sql.Compiler.Helpers.unselectable_selected_expression?/1
    (cloak) lib/cloak/sql/compiler/helpers.ex:144: anonymous fn/1 in Cloak.Sql.Compiler.Helpers.create_table_from_columns/3

It appears that a nil column is leaking into the analyst table's columns...

@edongashi edongashi added the bug label Jun 29, 2020
@edongashi edongashi added this to the Release 20.2 milestone Jun 29, 2020
@edongashi edongashi changed the title Internal error when creating analyst table Internal error when creating analyst table, analyst table contains nil column Jun 29, 2020
@cristianberneanu cristianberneanu self-assigned this Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants