bugGNU Astronomy Utilities - Bugs: bug #62548, Table doesn't recognize plain-text...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #62548: Table doesn't recognize plain-text string column when defined width is larger and it is the last column

Submitter:  Mohammad Akhlaghi <makhlaghi>
Submitted:  Mon 30 May 2022 11:55:42 PM UTC
   
 
Category:  Table Severity:  3 - Normal
Item Group:  Output not reasonable Status:  Fixed
Privacy:  Public Assigned to:  makhlaghi
Open/Closed:  Closed

Tue 31 May 2022 12:08:53 AM UTC, comment #1: 

This bug has been fixed in Commit 2fb08e0f. See the description of the commit for more information.

Mohammad Akhlaghi <makhlaghi>
Group administrator
Mon 30 May 2022 11:55:42 PM UTC, original submission:  

When the last column of an input table (in plain-text) has a string type, but the given width (number of characters) in the column's metadata gives a width that is larger than the string, Table will not recognize that string column!

For example see the example below where the second column is a string (date format) that actually has 19 characters, but we have given it 'str23':


$ cat cat.txt
# Column 1: id   [counter, u8] Counter of exposure
# Column 2: date [time, str23] The exposure date
1 2019-03-07T20:14:11
2 2019-03-07T20:12:37
3 2018-07-18T21:23:14
4 2019-03-30T00:32:29

$ asttable cat.txt -i
--------
cat.txt
-------  -----    ----   -------
No.Name  Units    Type   Comment
-------  -----    ----   -------
1  id    counter  uint8  Counter of exposure
--------
Number of rows: 4
--------


As you see, Table hasn't recognized the last string column, and only reports the existence of the first column. In case we remove the first column from the previous table, then Table will complain that there is no data (like below):


$ cat cat.txt
# Column 1: date [time, str23] The exposure date
2019-03-07T20:14:11
2019-03-07T20:12:37
2018-07-18T21:23:14
2019-03-30T00:32:29

$ asttable cat.txt -i
asttable: cat.txt: no usable data rows


This bug was found with the help of Sepideh Eskandarlou. I am now working on the fix.

Mohammad Akhlaghi <makhlaghi>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Submitted the item)
  • -email is unavailable- added by makhlaghi
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-05-31 makhlaghi StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2022-05-30 makhlaghi Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code