Changeset: 7718862ab238 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7718862ab238
Modified Files:
        monetdb5/modules/mal/Tests/inspect05.stable.out
        monetdb5/modules/mal/Tests/inspect05.stable.out.Windows
        sql/backends/monet5/UDF/80_udf.sql
        sql/backends/monet5/UDF/udf.c
        sql/backends/monet5/UDF/udf.h
        sql/backends/monet5/UDF/udf.mal
        sql/test/leaks/Tests/check0.stable.out
        sql/test/leaks/Tests/check1.stable.out
        sql/test/leaks/Tests/check2.stable.out
        sql/test/leaks/Tests/check3.stable.out
        sql/test/leaks/Tests/check4.stable.out
        sql/test/leaks/Tests/check5.stable.out
        sql/test/mapi/Tests/php_monetdb.stable.out
Branch: Dec2011
Log Message:

backout changeset 792e60fc13cd:
new functions must not be added to the release branch.


diffs (truncated from 572 to 300 lines):

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
@@ -28,13 +28,7 @@ end main;
 # str                          str             str             str             
                                                                                
                                        str                                     
                  # type
 
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
 [ "main",                        "function",     "user",         "():void;",   
                                                                                
                                          "nil"                                 
                  ]
-[ "fuse",                "command",      "udf",          
"(one:int,two:int):lng ",                                                       
                                        "UDFfuse_int_lng;"                      
]
-[ "fuse",                "command",      "udf",          
"(one:sht,two:sht):int ",                                                       
                                        "UDFfuse_sht_int;"                      
]
-[ "fuse",                "command",      "udf",          
"(one:bte,two:bte):sht ",                                                       
                                        "UDFfuse_bte_sht;"                      
]
 [ "reverse",             "command",      "udf",          "(ra1:str):str ",     
                                                                                
                  "UDFreverse;"                                   ]
-[ "fuse",                "command",      "batudf",       
"(one:bat[:oid,:int],two:bat[:oid,:int]):bat[:oid,:lng] ",                      
                                        "UDFBATfuse;"                           
]
-[ "fuse",                "command",      "batudf",       
"(one:bat[:oid,:sht],two:bat[:oid,:sht]):bat[:oid,:int] ",                      
                                        "UDFBATfuse;"                           
]
-[ "fuse",                "command",      "batudf",       
"(one:bat[:oid,:bte],two:bat[:oid,:bte]):bat[:oid,:sht] ",                      
                                        "UDFBATfuse;"                           
]
 [ "reverse",                     "command",      "batudf",       
"(b:bat[:oid,:str]):bat[:oid,:str] ",                                           
                                                "UDFBATreverse;"                
        ]
 [ "angsep",                      "command",      "lsst",         
"(ra1:dbl,dec1:dbl,ra2:dbl,dec2:dbl):dbl ",                                     
                                "qserv_angSep;"                                 
]
 [ "ptinsphpoly",                 "pattern",      "lsst",         
"(ra:dbl,dec:dbl,list:dbl...):int ",                                            
                                "qserv_ptInSphPoly;"                            
]
diff --git a/monetdb5/modules/mal/Tests/inspect05.stable.out.Windows 
b/monetdb5/modules/mal/Tests/inspect05.stable.out.Windows
--- a/monetdb5/modules/mal/Tests/inspect05.stable.out.Windows
+++ b/monetdb5/modules/mal/Tests/inspect05.stable.out.Windows
@@ -28,13 +28,7 @@ end main;
 # str                          str             str             str             
                                                                                
                                        str                                     
                  # type
 
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
 [ "main",                        "function",     "user",         "():void;",   
                                                                                
                                          "nil"                                 
                  ]
-[ "fuse",                "command",      "udf",          
"(one:int,two:int):lng ",                                                       
                                        "UDFfuse_int_lng;"                      
]
-[ "fuse",                "command",      "udf",          
"(one:sht,two:sht):int ",                                                       
                                        "UDFfuse_sht_int;"                      
]
-[ "fuse",                "command",      "udf",          
"(one:bte,two:bte):sht ",                                                       
                                        "UDFfuse_bte_sht;"                      
]
 [ "reverse",             "command",      "udf",          "(ra1:str):str ",     
                                                                                
                  "UDFreverse;"                                   ]
-[ "fuse",                "command",      "batudf",       
"(one:bat[:oid,:int],two:bat[:oid,:int]):bat[:oid,:lng] ",                      
                                        "UDFBATfuse;"                           
]
-[ "fuse",                "command",      "batudf",       
"(one:bat[:oid,:sht],two:bat[:oid,:sht]):bat[:oid,:int] ",                      
                                        "UDFBATfuse;"                           
]
-[ "fuse",                "command",      "batudf",       
"(one:bat[:oid,:bte],two:bat[:oid,:bte]):bat[:oid,:sht] ",                      
                                        "UDFBATfuse;"                           
]
 [ "reverse",                     "command",      "batudf",       
"(b:bat[:oid,:str]):bat[:oid,:str] ",                                           
                                                "UDFBATreverse;"                
        ]
 [ "angsep",              "command",      "lsst",         
"(ra1:dbl,dec1:dbl,ra2:dbl,dec2:dbl):dbl ",                                     
                                                                                
                                                                                
                        "qserv_angSep;"                         ]
 [ "ptinsphpoly",         "pattern",      "lsst",         
"(ra:dbl,dec:dbl,list:dbl...):int ",                                            
                                                                                
                                                                                
                        "qserv_ptInSphPoly;"                    ]
diff --git a/sql/backends/monet5/UDF/80_udf.sql 
b/sql/backends/monet5/UDF/80_udf.sql
--- a/sql/backends/monet5/UDF/80_udf.sql
+++ b/sql/backends/monet5/UDF/80_udf.sql
@@ -20,16 +20,3 @@ All Rights Reserved.
 -- Reverse a string
 create function reverse(src string)
 returns string external name udf.reverse;
-
-
--- fuse two (1-byte) tinyint values into one (2-byte) smallint value
-create function fuse(one tinyint, two tinyint)
-returns smallint external name udf.fuse;
-
--- fuse two (2-byte) smallint values into one (4-byte) integer value
-create function fuse(one smallint, two smallint)
-returns integer external name udf.fuse;
-
--- fuse two (4-byte) integer values into one (8-byte) bigint value
-create function fuse(one integer, two integer)
-returns bigint external name udf.fuse;
diff --git a/sql/backends/monet5/UDF/udf.c b/sql/backends/monet5/UDF/udf.c
--- a/sql/backends/monet5/UDF/udf.c
+++ b/sql/backends/monet5/UDF/udf.c
@@ -117,120 +117,3 @@ bunins_failed:
        BBPreleaseref(*ret);
        throw(MAL, "batudf.reverse", OPERATION_FAILED " During bulk operation");
 }
-
-
-/* scalar fuse */
-
-#define UDFfuse_scalar_impl(in,uin,out,shift)                          \
-/* fuse two (shift-byte) in values into one (2*shift-byte) out value */        
\
-str UDFfuse_##in##_##out ( out *ret , in *one , in *two )              \
-{                                                                      \
-       if (ret == NULL || one == NULL || two == NULL)                  \
-               throw(MAL, "udf.fuse", RUNTIME_OBJECT_MISSING);         \
-       if (*one == in##_nil || *two == in##_nil)                       \
-               *ret = out##_nil;                                       \
-       else                                                            \
-               *ret = ( ((out)((uin)*one)) << shift ) | ((uin)*two);   \
-       return MAL_SUCCEED;                                             \
-}
-
-UDFfuse_scalar_impl(bte,unsigned char ,sht, 8)
-UDFfuse_scalar_impl(sht,unsigned short,int,16)
-UDFfuse_scalar_impl(int,unsigned int  ,lng,32)
-
-
-/* BAT fuse */
-
-str UDFBATfuse(int *ires, int *ione, int *itwo)
-{
-       BAT *bres, *bone, *btwo;
-
-       /* check for NULL pointers */
-       if (ires == NULL || ione == NULL || itwo == NULL)
-               throw(MAL, "batudf.fuse", RUNTIME_OBJECT_MISSING);
-
-       /* locate the BAT in the buffer pool */
-       if ((bone = BATdescriptor(*ione)) == NULL)
-               throw(MAL, "batudf.fuse", RUNTIME_OBJECT_MISSING);
-
-       /* locate the BAT in the buffer pool */
-       if ((btwo = BATdescriptor(*itwo)) == NULL) {
-               BBPreleaseref(bone->batCacheid);
-               throw(MAL, "batudf.fuse", RUNTIME_OBJECT_MISSING);
-       }
-
-       /* check for dense & aligned heads */
-       if (!BAThdense(bone) || !BAThdense(btwo) || BATcount(bone) != 
BATcount(btwo) || bone->hseqbase != btwo->hseqbase) {
-               BBPreleaseref(bone->batCacheid);
-               BBPreleaseref(btwo->batCacheid);
-               throw(MAL, "batudf.fuse", "heads of input BATs must be 
aligned");
-       }
-
-       /* check tail types */
-       if (bone->ttype != btwo->ttype) {
-               BBPreleaseref(bone->batCacheid);
-               BBPreleaseref(btwo->batCacheid);
-               throw(MAL, "batudf.fuse", "tails of input BATs must be 
identical");
-       }
-
-#define UDFBATfuse_TYPE(in,uin,out,shift)                                      
        \
-{                                                                              
        \
-       in *one, *two;                                                          
        \
-       out *res;                                                               
        \
-       BUN i, n = BATcount(bone);                                              
        \
-                                                                               
        \
-       /* create the result container */                                       
        \
-       bres = BATnew(TYPE_void, TYPE_##out, n);                                
        \
-       if (bres == NULL) {                                                     
        \
-               BBPreleaseref(bone->batCacheid);                                
        \
-               BBPreleaseref(btwo->batCacheid);                                
        \
-               throw(MAL, "batudf.fuse", MAL_MALLOC_FAIL);                     
        \
-       }                                                                       
        \
-                                                                               
        \
-       one = (in *) Tloc(bone, BUNfirst(bone));                                
        \
-       two = (in *) Tloc(btwo, BUNfirst(btwo));                                
        \
-       res = (out*) Tloc(bres, BUNfirst(bres));                                
        \
-                                                                               
        \
-       for (i = 0; i < n; i++)                                                 
        \
-               if (one[i] == in##_nil || two[i] == in##_nil)                   
        \
-                       res[i] = out##_nil;                                     
        \
-               else                                                            
        \
-                       res[i] = ( ((out)((uin)one[i])) << shift ) | 
((uin)two[i]);     \
-                                                                               
        \
-       BATsetcount(bres, n);                                                   
        \
-}
-
-       switch (bone->ttype) {
-       case TYPE_bte:
-               UDFBATfuse_TYPE(bte,unsigned char ,sht, 8)
-               break;
-       case TYPE_sht:
-               UDFBATfuse_TYPE(sht,unsigned short,int,16)
-               break;
-       case TYPE_int:
-               UDFBATfuse_TYPE(int,unsigned int  ,lng,32)
-               break;
-       default:
-               throw(MAL, "batudf.fuse", "tails of input BATs must be one of 
{bte, sht, int}");
-       }
-
-       /* manage the properties of the result */
-       bres->hdense = BAThdense(bone);
-       BATseqbase(bres, bone->hseqbase);
-       bres->hsorted = GDK_SORTED;
-       BATkey(bone, TRUE);
-
-       if (BATtordered(bone)&1 && (BATtkey(bone) || BATtordered(btwo)&1))
-               bres->tsorted = GDK_SORTED;
-       else
-               bres->tsorted = 0;
-       BATkey(BATmirror(bres), BATtkey(bone) || BATtkey(btwo));
-
-       BBPreleaseref(bone->batCacheid);
-       BBPreleaseref(btwo->batCacheid);
-
-       *ires = bres->batCacheid;
-       BBPkeepref(*ires);
-
-       return MAL_SUCCEED;
-}
diff --git a/sql/backends/monet5/UDF/udf.h b/sql/backends/monet5/UDF/udf.h
--- a/sql/backends/monet5/UDF/udf.h
+++ b/sql/backends/monet5/UDF/udf.h
@@ -35,12 +35,4 @@
 udf_export str UDFreverse(str *ret, str *src);
 udf_export str UDFBATreverse(int *ret, int *bid);
 
-#define UDFfuse_scalar_decl(in,out) \
-        udf_export str UDFfuse_##in##_##out(out *ret, in *one, in *two)
-UDFfuse_scalar_decl(bte,sht);
-UDFfuse_scalar_decl(sht,int);
-UDFfuse_scalar_decl(int,lng);
-
-udf_export str UDFBATfuse(int *ret, int *one, int *two);
-
 #endif /* _SQL_UDF_H_ */
diff --git a/sql/backends/monet5/UDF/udf.mal b/sql/backends/monet5/UDF/udf.mal
--- a/sql/backends/monet5/UDF/udf.mal
+++ b/sql/backends/monet5/UDF/udf.mal
@@ -27,34 +27,3 @@ module batudf;
 command reverse(b:bat[:oid,:str]):bat[:oid,:str]
 address UDFBATreverse
 comment "Reverse a BAT of strings");
-
-
-
-module udf;
-
-command fuse(one:bte,two:bte):sht
-address UDFfuse_bte_sht
-comment "fuse two (1-byte) bte values into one (2-byte) sht value";
-
-command fuse(one:sht,two:sht):int
-address UDFfuse_sht_int
-comment "fuse two (2-byte) sht values into one (4-byte) int value";
-
-command fuse(one:int,two:int):lng
-address UDFfuse_int_lng
-comment "fuse two (4-byte) int values into one (8-byte) lng value";
-
-
-module batudf;
-
-command fuse(one:bat[:oid,:bte],two:bat[:oid,:bte]):bat[:oid,:sht]
-address UDFBATfuse
-comment "fuse two (1-byte) bte values into one (2-byte) sht value";
-
-command fuse(one:bat[:oid,:sht],two:bat[:oid,:sht]):bat[:oid,:int]
-address UDFBATfuse
-comment "fuse two (2-byte) sht values into one (4-byte) int value";
-
-command fuse(one:bat[:oid,:int],two:bat[:oid,:int]):bat[:oid,:lng]
-address UDFBATfuse
-comment "fuse two (4-byte) int values into one (8-byte) lng value";
diff --git a/sql/test/leaks/Tests/check0.stable.out 
b/sql/test/leaks/Tests/check0.stable.out
--- a/sql/test/leaks/Tests/check0.stable.out
+++ b/sql/test/leaks/Tests/check0.stable.out
@@ -51,28 +51,28 @@ Ready.
 [ "int",       "int",  16      ]
 [ "int",       "lng",  2       ]
 [ "int",       "str",  142     ]
-[ "oid",       "bit",  1154    ]
-[ "oid",       "bit",  1154    ]
+[ "oid",       "bit",  1151    ]
+[ "oid",       "bit",  1151    ]
 [ "oid",       "int",  19      ]
 [ "oid",       "int",  19      ]
-[ "oid",       "int",  1154    ]
-[ "oid",       "int",  1154    ]
-[ "oid",       "int",  1154    ]
-[ "oid",       "int",  1154    ]
-[ "oid",       "int",  3172    ]
-[ "oid",       "int",  3172    ]
-[ "oid",       "int",  3172    ]
-[ "oid",       "int",  3172    ]
-[ "oid",       "int",  3172    ]
+[ "oid",       "int",  1151    ]
+[ "oid",       "int",  1151    ]
+[ "oid",       "int",  1151    ]
+[ "oid",       "int",  1151    ]
+[ "oid",       "int",  3163    ]
+[ "oid",       "int",  3163    ]
+[ "oid",       "int",  3163    ]
+[ "oid",       "int",  3163    ]
+[ "oid",       "int",  3163    ]
 [ "oid",       "lng",  19      ]
 [ "oid",       "str",  1       ]
 [ "oid",       "str",  1       ]
 [ "oid",       "str",  19      ]
-[ "oid",       "str",  1154    ]
-[ "oid",       "str",  1154    ]
-[ "oid",       "str",  1154    ]
-[ "oid",       "str",  3172    ]
-[ "oid",       "str",  3172    ]
+[ "oid",       "str",  1151    ]
+[ "oid",       "str",  1151    ]
+[ "oid",       "str",  1151    ]
+[ "oid",       "str",  3163    ]
+[ "oid",       "str",  3163    ]
 #select 'transient', count(*) from bbp() as bbp where kind like 'tran%';
 % .L1, .bbp # table_name
 % L1,  L2 # name
diff --git a/sql/test/leaks/Tests/check1.stable.out 
b/sql/test/leaks/Tests/check1.stable.out
--- a/sql/test/leaks/Tests/check1.stable.out
+++ b/sql/test/leaks/Tests/check1.stable.out
@@ -35,8 +35,8 @@ Ready.
 [ "oid",       "bit",  58      ]
 [ "oid",       "bit",  58      ]
 [ "oid",       "bit",  296     ]
-[ "oid",       "bit",  1154    ]
-[ "oid",       "bit",  1154    ]
+[ "oid",       "bit",  1151    ]
+[ "oid",       "bit",  1151    ]
 [ "oid",       "int",  0       ]
 [ "oid",       "int",  0       ]
 [ "oid",       "int",  0       ]
@@ -83,15 +83,15 @@ Ready.
 [ "oid",       "int",  296     ]
 [ "oid",       "int",  296     ]
 [ "oid",       "int",  296     ]
-[ "oid",       "int",  1154    ]
-[ "oid",       "int",  1154    ]
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to