Changeset: a275ad226eac for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a275ad226eac
Modified Files:
        monetdb5/modules/atoms/Tests/time00.mal
        monetdb5/modules/atoms/Tests/time00.stable.out
        monetdb5/modules/atoms/mtime.mal
        monetdb5/modules/mal/Tests/inspect05.stable.out
Branch: default
Log Message:

Move to oid-headed columns in atoms


diffs (210 lines):

diff --git a/monetdb5/modules/atoms/Tests/time00.mal 
b/monetdb5/modules/atoms/Tests/time00.mal
--- a/monetdb5/modules/atoms/Tests/time00.mal
+++ b/monetdb5/modules/atoms/Tests/time00.mal
@@ -17,14 +17,14 @@ io.print(f);
 f:= calc.min(date_08,date_08);
 io.print(f);
 
-b:= bat.new(:int,:date);
-bat.insert(b,1,date_01);
-bat.insert(b,2,date_02);
-bat.insert(b,3,date_03);
-bat.insert(b,4,date_04);
-bat.insert(b,5,date_05);
-bat.insert(b,6,date_06);
-bat.insert(b,7,date_07);
+b:= bat.new(:oid,:date);
+bat.append(b,date_01);
+bat.append(b,date_02);
+bat.append(b,date_03);
+bat.append(b,date_04);
+bat.append(b,date_05);
+bat.append(b,date_06);
+bat.append(b,date_07);
 io.print(b);
 
 zy:= batmtime.year(b);
diff --git a/monetdb5/modules/atoms/Tests/time00.stable.out 
b/monetdb5/modules/atoms/Tests/time00.stable.out
--- a/monetdb5/modules/atoms/Tests/time00.stable.out
+++ b/monetdb5/modules/atoms/Tests/time00.stable.out
@@ -29,14 +29,14 @@ function user.main():void;
     io.print(f);
     f := calc.min(date_08,date_08);
     io.print(f);
-    b := bat.new(:int,:date);
-    bat.insert(b,1,date_01);
-    bat.insert(b,2,date_02);
-    bat.insert(b,3,date_03);
-    bat.insert(b,4,date_04);
-    bat.insert(b,5,date_05);
-    bat.insert(b,6,date_06);
-    bat.insert(b,7,date_07);
+    b := bat.new(:oid,:date);
+    bat.append(b,date_01);
+    bat.append(b,date_02);
+    bat.append(b,date_03);
+    bat.append(b,date_04);
+    bat.append(b,date_05);
+    bat.append(b,date_06);
+    bat.append(b,date_07);
     io.print(b);
     zy := batmtime.year(b);
     io.print(zy);
@@ -53,46 +53,46 @@ end main;
 # h    t                 # name
 # int  date              # type
 #-------------------------#
-[ 1,     5000-01-01      ]
-[ 2,     1968-02-29      ]
-[ 3,     1-03-01         ]
-[ 4,     -5867411-01-01  ]
-[ 5,     -768-10-01      ]
-[ 6,     5000-11-01      ]
-[ 7,     -1999-06-01     ]
+[ 0@0,   5000-01-01      ]
+[ 1@0,   1968-02-29      ]
+[ 2@0,   1-03-01         ]
+[ 3@0,   -5867411-01-01  ]
+[ 4@0,   -768-10-01      ]
+[ 5@0,   5000-11-01      ]
+[ 6@0,   -1999-06-01     ]
 #-------------------------#
 # h    t                 # name
 # int  int               # type
 #-------------------------#
-[ 1,     5000            ]
-[ 2,     1968            ]
-[ 3,     1               ]
-[ 4,     -5867411        ]
-[ 5,     -768            ]
-[ 6,     5000            ]
-[ 7,     -1999           ]
+[ 0@0,   5000            ]
+[ 1@0,   1968            ]
+[ 2@0,   1               ]
+[ 3@0,   -5867411        ]
+[ 4@0,   -768            ]
+[ 5@0,   5000            ]
+[ 6@0,   -1999           ]
 #-----------------#
 # h    t         # name
 # int  int       # type
 #-----------------#
-[ 1,     1       ]
-[ 2,     2       ]
-[ 3,     3       ]
-[ 4,     1       ]
-[ 5,     10      ]
-[ 6,     11      ]
-[ 7,     6       ]
+[ 0@0,   1       ]
+[ 1@0,   2       ]
+[ 2@0,   3       ]
+[ 3@0,   1       ]
+[ 4@0,   10      ]
+[ 5@0,   11      ]
+[ 6@0,   6       ]
 #-----------------#
 # h    t         # name
 # int  int       # type
 #-----------------#
-[ 1,     1       ]
-[ 2,     29      ]
-[ 3,     1       ]
-[ 4,     1       ]
-[ 5,     1       ]
-[ 6,     1       ]
-[ 7,     1       ]
+[ 0@0,   1       ]
+[ 1@0,   29      ]
+[ 2@0,   1       ]
+[ 3@0,   1       ]
+[ 4@0,   1       ]
+[ 5@0,   1       ]
+[ 6@0,   1       ]
 
 # 23:38:23 >  
 # 23:38:23 >  Done.
diff --git a/monetdb5/modules/atoms/mtime.mal b/monetdb5/modules/atoms/mtime.mal
--- a/monetdb5/modules/atoms/mtime.mal
+++ b/monetdb5/modules/atoms/mtime.mal
@@ -503,49 +503,49 @@ command year(d:date) :int
 address MTIMEdate_extract_year
 comment "extracts year from date (nonzero
        value between -5867411 and +5867411).";
-command batmtime.year(d:bat[:any_1,:date]):bat[:any_1,:int]
+command batmtime.year(d:bat[:oid,:date]):bat[:oid,:int]
 address MTIMEdate_extract_year_bulk;
 
 command month(d:date) :int
 address MTIMEdate_extract_month
 comment "extracts month from date";
-command batmtime.month(d:bat[:any_1,:date]):bat[:any_1,:int]
+command batmtime.month(d:bat[:oid,:date]):bat[:oid,:int]
 address MTIMEdate_extract_month_bulk;
 
 command day(d:date) :int
 address MTIMEdate_extract_day
 comment "extracts day from date ";
-command batmtime.day(d:bat[:any_1,:date]):bat[:any_1,:int]
+command batmtime.day(d:bat[:oid,:date]):bat[:oid,:int]
 address MTIMEdate_extract_day_bulk;
 
 command hours(h:daytime) :int
 address MTIMEdaytime_extract_hours
 comment "extracts hour from daytime";
-command batmtime.hours(d:bat[:any_1,:daytime]):bat[:any_1,:int]
+command batmtime.hours(d:bat[:oid,:daytime]):bat[:oid,:int]
 address MTIMEdaytime_extract_hours_bulk;
 
 command minutes(d:daytime) :int
 address MTIMEdaytime_extract_minutes
 comment "extracts minutes from daytime";
-command minutes(d:bat[:any_1,:daytime]):bat[:any_1,:int]
+command minutes(d:bat[:oid,:daytime]):bat[:oid,:int]
 address MTIMEdaytime_extract_minutes_bulk;
 
 command seconds(d:daytime) :int
 address MTIMEdaytime_extract_seconds
 comment "extracts seconds from daytime";
-command batmtime.seconds(d:bat[:any_1,:daytime]):bat[:any_1,:int]
+command batmtime.seconds(d:bat[:oid,:daytime]):bat[:oid,:int]
 address MTIMEdaytime_extract_seconds_bulk;
 
 command sql_seconds(d:daytime) :int
 address MTIMEdaytime_extract_sql_seconds
 comment "extracts seconds (with fractional milliseconds) from daytime";
-command batmtime.sql_seconds(d:bat[:any_1,:daytime]):bat[:any_1,:int]
+command batmtime.sql_seconds(d:bat[:oid,:daytime]):bat[:oid,:int]
 address MTIMEdaytime_extract_sql_seconds_bulk;
 
 command milliseconds(d:daytime) :int
 address MTIMEdaytime_extract_milliseconds
 comment "extracts milliseconds from daytime";
-command batmtime.milliseconds(d:bat[:any_1,:daytime]):bat[:any_1,:int]
+command batmtime.milliseconds(d:bat[:oid,:daytime]):bat[:oid,:int]
 address MTIMEdaytime_extract_milliseconds_bulk;
 
 command daytime(t:timestamp) :daytime
diff --git a/monetdb5/modules/mal/Tests/inspect05.stable.out 
b/monetdb5/modules/mal/Tests/inspect05.stable.out
--- a/monetdb5/modules/mal/Tests/inspect05.stable.out
+++ b/monetdb5/modules/mal/Tests/inspect05.stable.out
@@ -66,7 +66,6 @@ end main;
 [ "getTail",                     "pattern",      "bat",          
"(b:bat[:any_2,:any_1],i:lng):any_1 ",                                          
"CHPgetTail;"                           ]
 [ "getTailType",                 "command",      "bat",          
"(b:bat[:any_1,:any_2]):str ",                                                  
                                                        "BKCgetTailType;"       
                                ]
 [ "hasAppendMode",               "command",      "bat",          
"(b:bat[:any_1,:any_2]):bit ",                                                  
"BKChasAppendMode;"                     ]
-[ "hasMoreElements",             "pattern",      "bat",          
"(b:bat[:any_1,:BAT]) (X_2:lng,h:any_1,t:any_2) ",                              
                                                "CHPbunHasMoreElements;"        
        ]
 [ "hasMoreElements",             "pattern",      "bat",          
"(b:bat[:oid,:any_2]) (X_2:lng,h:oid,t:any_2) ",                                
                                                "CHPbunHasMoreElements;"        
        ]
 [ "hasMoreElements",             "pattern",      "bat",          
"(b:bat[:any_1,:any_2]) (X_2:lng,h:any_1,t:any_2) ",                            
                                                "CHPbunHasMoreElements;"        
        ]
 [ "hasMoreElements",             "command",      "bat",          
"(b:bat[:any_1,:any_2],size:lng) (X_3:lng,X_4:bat[:any_1,:any_2]) ",            
                                                "CHPhasMoreElements;"           
        ]
@@ -98,10 +97,8 @@ end main;
 [ "new",                         "pattern",      "bat",          
"(ht:oid,tt:any_2,size:int):bat[:oid,:any_2] ",                                 
                                                        "CMDBATnewint;"         
                                ]
 [ "new",                         "pattern",      "bat",          
"(ht:any_1,tt:any_2,size:lng):bat[:any_1,:any_2] ",                             
                                                        "CMDBATnew;"            
                                ]
 [ "new",                         "pattern",      "bat",          
"(ht:any_1,tt:any_2,size:int):bat[:any_1,:any_2] ",                             
                                                        "CMDBATnewint;"         
                                ]
-[ "new",                         "pattern",      "bat",          
"(ht:any_1,tt:bat[:any_2,:any_3]):bat[:any_1,:BAT] ",                           
                                "CMDBATnew;"                                    
]
 [ "new",                         "pattern",      "bat",          
"(ht:any_1,tt:any_2):bat[:any_1,:any_2] ",                                      
                                                        "CMDBATnew;"            
                                ]
 [ "new",                         "pattern",      "bat",          
"(ht:any_1,tt:any_2,b:bat[:any_3,:any_4]):bat[:any_1,:any_2] ",                 
                                                        "CMDBATclone;"          
                                ]
-[ "newIterator",                 "pattern",      "bat",          
"(b:bat[:any_1,:BAT]) (X_2:lng,h:any_1,t:any_2) ",                              
"CHPbunIterator;"                       ]
 [ "newIterator",                 "pattern",      "bat",          
"(b:bat[:any_1,:any_2]) (X_2:lng,h:any_1,t:any_2) ",                            
"CHPbunIterator;"                       ]
 [ "newIterator",                 "command",      "bat",          
"(b:bat[:any_1,:any_2],size:lng) (X_3:lng,X_4:bat[:any_1,:any_2]) ",            
"CHPnewChunkIterator;"                  ]
 [ "order",                       "command",      "bat",          
"(b:bat[:any_1,:any_2]):bat[:any_1,:any_2] ",                                   
                                                        "BKCorder;"             
                                ]
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to