Changeset: 90b25e493031 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=90b25e493031
Modified Files:
sql/backends/monet5/vaults/fits.mx
Branch: default
Log Message:
Fixed a strange problem of type mapping from FITS to Monet.
Type 'J', officially a 32-bit integer, returns 8-byte elements upon reading with
fitsio library function. We map it now to TYPE_lng and bigint.
diffs (38 lines):
diff --git a/sql/backends/monet5/vaults/fits.mx
b/sql/backends/monet5/vaults/fits.mx
--- a/sql/backends/monet5/vaults/fits.mx
+++ b/sql/backends/monet5/vaults/fits.mx
@@ -140,9 +140,9 @@
return TYPE_sht;
case TUINT:
case TINT:
+ return TYPE_int;
+ case TLONG:
case TULONG:
- case TLONG:
- return TYPE_int;
case TLONGLONG:
return TYPE_lng;
case TFLOAT:
@@ -179,10 +179,10 @@
break;
case TUINT:
case TINT:
+ sql_find_subtype(tpe, "int", 32, 0);
+ break;
case TULONG:
case TLONG:
- sql_find_subtype(tpe, "int", 32, 0);
- break;
case TLONGLONG:
sql_find_subtype(tpe, "bigint", 64, 0);
break;
@@ -463,6 +463,9 @@
cname[j-1] = GDKstrdup(toLower(nm));
fits_get_coltype(fptr, j, &tpcode[j-1], &rep[j-1], &wid[j-1],
&status);
fits2subtype(&tpe, tpcode[j-1], rep[j-1], wid[j-1]);
+
+ /* mnstr_printf(cntxt->fdout,"%d %ld %ld - M:
%s\n", tpcode[j-1], rep[j-1], wid[j-1], tpe.type->sqlname); */
+
mvc_create_column(m, tbl, cname[j-1], &tpe);
}
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list