-
Notifications
You must be signed in to change notification settings - Fork 22
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
TaQL: integer aggregate function columns have invalid datatype #265
Comments
I also faced similar annoyances with CASA taql in the past.
|
Thanks a lot for pointing out a workaround @renaudmiel. I'm going to leave this up for now for documentation purposes, because I do think it is a bug with the casa wrappers around the casacore table system - the taql behaviour should be consistent between the two python wrappers |
Too bad that there's a discrepancy. I'm afraid this is indeed for the CASA team, though in the end it might boil down to something in the TaQL system itself. @bennahugo In case you're looking for inspiration for the TaQL demo, I have an old notebook at https://github.com/tammojan/taql-jupyter/blob/master/LearnTaQL.ipynb . One suggestion: if you're using python-casacore, better to import it as |
Thanks @tammojan |
The data type of the columns in the first case is Int64; in the second case
(without aggregate) it is Int.
Probably CASA cannot deal with Int64 columns.
If you want to, you can assign another data type to the resulting columns
like:
select ANTENNA1 as ANTENNA1 Int, gcount() as CNT Int ......
I assume that thereafter CASA will be able to read the columns.
You can see the data types by saving the result in a table (using GIVING)
and do
show table tablename
…On Fri, Apr 12, 2024 at 9:57 AM Benjamin Hugo ***@***.***> wrote:
Thanks @tammojan <https://github.com/tammojan>
—
Reply to this email directly, view it on GitHub
<#265 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB34QPGFCASUJXHC2J7AP5DY46HXPAVCNFSM6AAAAABGC5ED2SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJRGIZDANJZGI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi I'm putting together a demo of taql and running into a problem with simple groupby / aggregate functions. I'm importing the table system from casatools for casa version 6.5.6.22
Here is a simple example:
executes, but fails when I try to do tt.getcol("ANTENNA1") or tt.getcol('samplecount') with
and
It succeeds with the floating point aggregate, or when I get a floating point value column
Funnily enough though when no aggregate functions are requested in the select the integer values return correctly
e.g.
returns an int valued array
Full environment:
Under the python-casacore table import the taql statements work correctly. I'm not sure what inside the casa environment makes this not work - perhaps something to raise with the casa team members?
returns
and
respectively as expected
The text was updated successfully, but these errors were encountered: