Bugs item #2059378, was opened at 2008-08-19 11:55
Message generated for change (Comment added) made by mr-meltdown
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2059378&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core
Group: MonetDB5 CVS Head
Status: Closed
Resolution: Invalid
Priority: 5
Private: No
Submitted By: Fabian (mr-meltdown)
Assigned to: Martin Kersten (mlkersten)
Summary: M5: getTypeIndex && getTypeName misaligned?

Initial Comment:
b := bat.new(:str, :int);
t := inspect.getTypeIndex(b);
io.print(t);
s := inspect.getTypeName(t);
io.print(s);

returns:

[ 6 ]
[ "int" ]

(or is it that getTypeIndex doesn't work well on BATs?)

----------------------------------------------------------------------

>Comment By: Fabian (mr-meltdown)
Date: 2008-08-20 10:23

Message:
Logged In: YES 
user_id=963970
Originator: YES

Hehe, indeed.  At one point I was indeed looking for an "isBAT" function.

----------------------------------------------------------------------

Comment By: Stefan Manegold (stmane)
Date: 2008-08-20 10:15

Message:
Logged In: YES 
user_id=572415
Originator: NO

>i:=1:int;
>b:=bat.new(:str, :flt);
>tii:=inspect.getTypeIndex(i);
>tib:=inspect.getTypeIndex(b);
>tni:=inspect.getTypeName(tii);
>tnb:=inspect.getTypeName(tib);
>io.print(tii);
[ 6 ]
>io.print(tib);
[ 10 ]
>io.print(tni);
[ "int" ]
>io.print(tnb);
[ "flt" ]

>manual.help("inspect.getTypeIndex");
inspect.getTypeIndex
>manual.help("getTypeIndex");
inspect.getTypeIndex
>manual.search("getTypeIndex");
pattern inspect.getTypeIndex(v:any_1):int address INSPECTtypeIndex;
#Return the type index of a variable.


So, the implementation of getTypeIndex() does not match its
documentation.
Is there any other function/way in MAL to find out whether a variable is
of an atomic scalar type, or whether it is a BAT?


----------------------------------------------------------------------

Comment By: Martin Kersten (mlkersten)
Date: 2008-08-20 09:58

Message:
Logged In: YES 
user_id=490798
Originator: NO

Clarification of semantics. It returns the typeindex of the tail type.
Upon need more will be added, e.g. (ht,tt):= getTypeIndex(b:bat[...

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2059378&group_id=56967

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to