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

[BUG] incorrect typing causes incorrect sorting #12

Closed
RoyWilliams opened this issue Jul 12, 2021 · 5 comments
Closed

[BUG] incorrect typing causes incorrect sorting #12

RoyWilliams opened this issue Jul 12, 2021 · 5 comments
Assignees
Labels
RSP VO Science Platform Virtual Observatory Services (TAP etc)

Comments

@RoyWilliams
Copy link

Describe the bug
Subtracting two double's should be a double not a char

To Reproduce

  1. Go to Firefly portal
  2. Choose TAP service = RSP
  3. Choose ADQL
  4. Enter this query and click Search
    SELECT mag_g,mag_r, mag_g-mag_r as color
    FROM dp01_dc2_catalogs.object
    WHERE CONTAINS(POINT('ICRS', ra, dec),CIRCLE('ICRS', 55, -35, 1))=1
    AND (mag_g <21 AND mag_r <21)

Expected behavior
If I click on the sort button in the display, it should sort as doubles, not as chars

Actual behavior
Seems strange that "color" is a char field.
If I click on the sort button in the display it sorts alphabetically instead of numerically
mag_g-mag_r

** Additional context **
However, if I add "ORDER BY color DESC" to my ADQL, then the sorting is correct.

@frossie frossie added RSP Portal Science Platform Portal (aka Firefly aka SUI) Suggestion Feature requests, UX improvements etc and removed Suggestion Feature requests, UX improvements etc labels Jul 12, 2021
@frossie frossie changed the title incorrect typing causes incorrect sorting [BUG] incorrect typing causes incorrect sorting Jul 12, 2021
@frossie
Copy link
Contributor

frossie commented Jul 12, 2021

Thanks for the report, we are investigating which is the offending layer of the sandwich

@fritzm
Copy link

fritzm commented Jul 12, 2021

Verified that Qserv is returning correctly typed result data to TAP for this query.

@fritzm fritzm removed their assignment Jul 12, 2021
@frossie frossie added RSP VO Science Platform Virtual Observatory Services (TAP etc) and removed RSP Portal Science Platform Portal (aka Firefly aka SUI) labels Jul 12, 2021
@frossie frossie assigned frossie and unassigned gpdf Jul 12, 2021
@frossie
Copy link
Contributor

frossie commented Jul 30, 2021

We have rolled out a fix to this. @RoyWilliams please give it a try.

@RoyWilliams
Copy link
Author

Looks great! Thank you!

@frossie
Copy link
Contributor

frossie commented Aug 6, 2021

For the record, fix upstreamed to CADC, h/t @cbanek

@frossie frossie closed this as completed Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RSP VO Science Platform Virtual Observatory Services (TAP etc)
Projects
None yet
Development

No branches or pull requests

4 participants