Use "default" instead of None when creating distilled_hierarchies.#306
Use "default" instead of None when creating distilled_hierarchies.#306ltaylor-digmap wants to merge 5 commits intoDataBrewery:masterfrom
Conversation
'namespace' misspelled as nampsace, corrected. Other misspellings in comments corrected
Also, miscellaneous corrections in messages and documentation.
|
I made another commit which could fix the problem. i don't know how to merge the two commits, or make a new pull request which includes both changes. |
Update workspace.py 'namespace' misspelled as nampsace, corrected. Other misspellings in comments corrected
|
Regarding your last comment, when you add a commit to a pull request branch the commit gets added to the pull request. That's ok. |
|
I cannot reproduce #304 on current master. I have tested this pull request and it causes several tests to fail. Seems there's other code referring to default dimensions as An implicit hierarchy will always exist. I am unsure however whether a "default" hierarchy should be created or the extent of the impact of this patch. I'd like to understand this better: what was the motivation to write this patch? I have no trouble accessing dimension or hierarchies without it. |
|
|
||
| for cut in cuts: | ||
| hierarchy = str(cut.hierarchy) if cut.hierarchy else None | ||
| hierarchy = str(cut.hierarchy) if cut.hierarchy else "default" |
There was a problem hiding this comment.
Guys, we need this fix in master.
And the few lines below, in case of SetCut, we need to use "hierarchy" var instead of "str(cut.hierarchy)".
Here: https://github.com/DataBrewery/cubes/blob/master/cubes/sql/query.py#L973
Also, miscellaneous corrections in messages and documentation.
This solves issue #304 (provided this complies with the intention for the design of Cubes; that "default" hierarchy should be created if there is no hierarchy entry).