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

In table filter criterion editor, "Is absent" for strings causes error #466

Open
leehart opened this issue Jan 8, 2019 · 1 comment
Open

Comments

@leehart
Copy link
Collaborator

leehart commented Jan 8, 2019

Variants table
Add filter
Add criterion
Select "Chromosome" column
Select "Is absent" comparison
Apply
See error.

Note the error doesn't occur for non-string columns, e.g. Longitude.
The code uses different SQL, i.e. DQXDbTools.py

        if statm['Tpe'] == 'ISPRESENT':
            processed = True
            st = '{0} IS NOT NULL'.format(DBCOLESC(statm['ColName']))
            self.querystring += st
            self.querystring_params += st

        if statm['Tpe'] == 'ISABSENT' or \
                (statm['Tpe'] == '=' and statm['CompValue'] is None) or \
                (statm['Tpe'] == '=' and statm['CompValue'] == ''):
            processed = True
            st = '{0} IS NULL'.format(DBCOLESC(statm['ColName']))
            self.querystring += st
            self.querystring_params += st

        if statm['Tpe'] == 'ISEMPTYSTR':
            processed = True
            st = '{0}=\'\''.format(DBCOLESC(statm['ColName']))
            self.querystring += st
            self.querystring_params += st

        if statm['Tpe'] == 'ISNOTEMPTYSTR':
            processed = True
            st = '{0}<>\'\''.format(DBCOLESC(statm['ColName']))
            self.querystring += st
            self.querystring_params += st

(btw, "Is present" seems to work OK for string columns.)

@leehart leehart self-assigned this Jan 8, 2019
@leehart
Copy link
Collaborator Author

leehart commented Jan 8, 2019

I'm getting inconsistent results when trying to test/reproduce this, so I suspect the error (a 500 (Server Error)) is related to some other cause.

@leehart leehart removed their assignment Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant