Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'delphin process' generation doesn't work without 'where' condition #281

Closed
goodmami opened this issue Apr 7, 2020 · 0 comments
Closed
Labels

Comments

@goodmami
Copy link
Member

goodmami commented Apr 7, 2020

Trying to generate with delphin process leads to a TSQLSyntaxError:

$ delphin process -g erg-2018-x86-64-0.9.31.dat -e -s mrs/ mrs-gen

  line 1
    * from item where .
                      ^
TSQLSyntaxError: expected one of: '!' or 'not', (, a qualified identifier, a simple identifier

The problem is that the process code constructs a temporary profile and builds a TSQL where condition defaulting to '' if there is none. But the mkprof code does not consider '' to be no condition, only None, so it makes an empty where clause:

where = '' if where is None else 'where ' + where

The workaround is to give an explicit where clause in the --select option, e.g.:

$ delphin process -g erg-2018-x86-64-0.9.31.dat -e -s mrs/ mrs-gen --select='mrs where result-id=0'

Changing the if where is None part of the above code snippet to if not where seems to fix the issue.

@goodmami goodmami added the bug label Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant