Changeset: bce2e636000b for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bce2e636000b Modified Files: sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_boolean.malC sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_numeric_nested.malC sql/backends/monet5/UDF/pyapi/Tests/pyapi_pandas.malC sql/backends/monet5/UDF/pyapi/Tests/pyapi_returntypes.malC sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_boolean.malC sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_huge.malC sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_numeric.malC sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_string.malC sql/backends/monet5/vaults/bam/Tests/bam_lib_mal.mal Branch: default Log Message:
Reduce calls to old bat.new diffs (truncated from 468 to 300 lines): diff --git a/sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_boolean.malC b/sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_boolean.malC --- a/sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_boolean.malC +++ b/sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_boolean.malC @@ -1,6 +1,6 @@ # simple boolean operations -bbit:= bat.new(:oid,:bit); +bbit:= bat.new(:bit); bat.append(bbit,1:bit); bat.append(bbit,0:bit); bat.append(bbit,1:bit); @@ -17,7 +17,7 @@ rbit:bat[:int] := pyapi.eval(nil:ptr,"re io.print(rbit); # boolean operations on two boolean arrays -bbit2:= bat.new(:oid,:bit); +bbit2:= bat.new(:bit); bat.append(bbit2,nil:bit); bat.append(bbit2,1:bit); bat.append(bbit2,1:bit); @@ -31,14 +31,14 @@ rbit:bat[:int] := pyapi.eval(nil:ptr,"re io.print(rbit); # numerical comparison operations -bint:= bat.new(:oid,:int); +bint:= bat.new(:int); bat.append(bint,1804289383:int); bat.append(bint,846930886:int); bat.append(bint,1681692777:int); bat.append(bint,1714636915:int); bat.append(bint,nil:int); -bint2:= bat.new(:oid,:int); +bint2:= bat.new(:int); bat.append(bint2,74564463:int); bat.append(bint2,999123561:int); bat.append(bint2,1681592777:int); diff --git a/sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_numeric_nested.malC b/sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_numeric_nested.malC --- a/sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_numeric_nested.malC +++ b/sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_numeric_nested.malC @@ -1,26 +1,26 @@ -a:= bat.new(:oid,:dbl); +a:= bat.new(:dbl); bat.append(a, 1.4:dbl); bat.append(a, 3.4:dbl); bat.append(a, 2.1:dbl); bat.append(a, 8.2:dbl); bat.append(a, 9.6:dbl); -b:= bat.new(:oid,:dbl); +b:= bat.new(:dbl); bat.append(b, 13.4:dbl); bat.append(b, 17.6:dbl); bat.append(b, 12.8:dbl); bat.append(b, 19.1:dbl); bat.append(b, 19.9:dbl); -c:= bat.new(:oid,:dbl); +c:= bat.new(:dbl); bat.append(c, 18.4:dbl); bat.append(c, 18.5:dbl); bat.append(c, 18.6:dbl); ;bat.append(c, 18.7:dbl); bat.append(c, 18.8:dbl); -d:= bat.new(:oid,:dbl); +d:= bat.new(:dbl); bat.append(d, 0.04:dbl); bat.append(d, 0.005:dbl); bat.append(d, 0.008:dbl); @@ -40,7 +40,7 @@ io.print(a); x:bat[:dbl] := pyapi.eval(nil:ptr, "return(numpy.prod(arg1*arg2*arg3*arg4)*numpy.sum(arg1*arg2*arg3*arg4))", a, b, c, d); io.print(x); -fib:= bat.new(:oid,:int); +fib:= bat.new(:int); bat.append(fib, 0:int); bat.append(fib, 1:int); bat.append(fib, 2:int); diff --git a/sql/backends/monet5/UDF/pyapi/Tests/pyapi_pandas.malC b/sql/backends/monet5/UDF/pyapi/Tests/pyapi_pandas.malC --- a/sql/backends/monet5/UDF/pyapi/Tests/pyapi_pandas.malC +++ b/sql/backends/monet5/UDF/pyapi/Tests/pyapi_pandas.malC @@ -1,7 +1,7 @@ -g:= bat.new(:oid,:int); +g:= bat.new(:int); bat.append(g,1); bat.append(g,2); bat.append(g,3); @@ -13,7 +13,7 @@ bat.append(g,2); bat.append(g,3); bat.append(g,1); -b:= bat.new(:oid,:dbl); +b:= bat.new(:dbl); bat.append(b,1804289383:dbl); bat.append(b,846930886:dbl); bat.append(b,1681692777:dbl); @@ -33,7 +33,7 @@ io.print(r,s); ############## # --PANDAS-- # ############## -c:= bat.new(:oid,:int); +c:= bat.new(:int); bat.append(c,4:int); bat.append(c,24:int); bat.append(c,363:int); diff --git a/sql/backends/monet5/UDF/pyapi/Tests/pyapi_returntypes.malC b/sql/backends/monet5/UDF/pyapi/Tests/pyapi_returntypes.malC --- a/sql/backends/monet5/UDF/pyapi/Tests/pyapi_returntypes.malC +++ b/sql/backends/monet5/UDF/pyapi/Tests/pyapi_returntypes.malC @@ -62,7 +62,7 @@ io.print(r12,s12); io.print(r13,s13); # return a multi-dimensional numpy array containing unicode strings -bstr:= bat.new(:oid,:str); +bstr:= bat.new(:str); bat.append(bstr,"Hannes Mühleisen":str); bat.append(bstr,"héllo":str); bat.append(bstr,"éáú üüäãö":str); diff --git a/sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_boolean.malC b/sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_boolean.malC --- a/sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_boolean.malC +++ b/sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_boolean.malC @@ -5,7 +5,7 @@ ######################### # int with null value -bint:= bat.new(:oid,:int); +bint:= bat.new(:int); bat.append(bint,1804289383:int); bat.append(bint,846930886:int); bat.append(bint,1681692777:int); diff --git a/sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_huge.malC b/sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_huge.malC --- a/sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_huge.malC +++ b/sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_huge.malC @@ -1,6 +1,6 @@ # huge with null value -bhge:= bat.new(:oid,:hge); +bhge:= bat.new(:hge); bat.append(bhge,18044433428933534654634643698858345:hge); bat.append(bhge,895233278923448975389573895731:hge); bat.append(bhge,558372892789247104910348981249:hge); @@ -28,7 +28,7 @@ rhge:bat[:str] := pyapi.eval(nil:ptr,"re io.print(rhge); # convert string to hge -bstr:= bat.new(:oid,:str); +bstr:= bat.new(:str); bat.append(bstr,"412412":str); bat.append(bstr,"13231414":str); bat.append(bstr,"895233278923448975389573895731":str); @@ -40,7 +40,7 @@ io.print(rhge); (rhge:bat[:hge], shge:bat[:hge]) := pyapi.eval(nil:ptr,"return(numpy.ma.masked_array([arg1, arg1], [arg1.mask,arg1.mask]))",bhge); io.print(rhge, shge); -z:= bat.new(:oid,:hge); +z:= bat.new(:hge); bat.append(z,44:hge); bat.append(z,22:hge); bat.append(z,11:hge); diff --git a/sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_numeric.malC b/sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_numeric.malC --- a/sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_numeric.malC +++ b/sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_numeric.malC @@ -1,11 +1,11 @@ -a:= bat.new(:oid,:int); +a:= bat.new(:int); bat.append(a,1:int); bat.append(a,2:int); bat.append(a,3:int); bat.append(a,4:int); -b:= bat.new(:oid,:int); +b:= bat.new(:int); bat.append(b,4:int); bat.append(b,3:int); bat.append(b,2:int); @@ -14,7 +14,7 @@ result:bat[:int] := pyapi.eval(nil:ptr, io.print(result); # bits with null value -bbit:= bat.new(:oid,:bit); +bbit:= bat.new(:bit); bat.append(bbit,1:bit); bat.append(bbit,0:bit); bat.append(bbit,1:bit); @@ -24,7 +24,7 @@ rbit:bat[:int] := pyapi.eval(nil:ptr,"re io.print(rbit); # bytes with null value -bbte:= bat.new(:oid,:bte); +bbte:= bat.new(:bte); bat.append(bbte,42:bte); bat.append(bbte,84:bte); bat.append(bbte,111:bte); @@ -34,7 +34,7 @@ rbte:bat[:int] := pyapi.eval(nil:ptr,"re io.print(rbte); # short with null value -bsht:= bat.new(:oid,:sht); +bsht:= bat.new(:sht); bat.append(bsht,42:sht); bat.append(bsht,82:sht); bat.append(bsht,0:sht); @@ -44,7 +44,7 @@ rsht:bat[:int] := pyapi.eval(nil:ptr,"re io.print(rsht); # int with null value -bint:= bat.new(:oid,:int); +bint:= bat.new(:int); bat.append(bint,1804289383:int); bat.append(bint,846930886:int); bat.append(bint,1681692777:int); @@ -54,7 +54,7 @@ rint:bat[:int] := pyapi.eval(nil:ptr,"re io.print(rint); # long with null value -blng:= bat.new(:oid,:lng); +blng:= bat.new(:lng); bat.append(blng,1804289383L); bat.append(blng,846930886L); bat.append(blng,1681692777L); @@ -64,7 +64,7 @@ rlng:bat[:int] := pyapi.eval(nil:ptr,"re io.print(rlng); # float with null value -bflt:= bat.new(:oid,:flt); +bflt:= bat.new(:flt); bat.append(bflt,18042.89383:flt); bat.append(bflt,846.930886:flt); bat.append(bflt,16.81692777:flt); @@ -74,7 +74,7 @@ rflt:bat[:flt] := pyapi.eval(nil:ptr,"re io.print(rflt); # double with null value -bdbl:= bat.new(:oid,:dbl); +bdbl:= bat.new(:dbl); bat.append(bdbl,180428.9383:dbl); bat.append(bdbl,84.6930886:dbl); bat.append(bdbl,168169.2777:dbl); @@ -84,7 +84,7 @@ rdbl:bat[:dbl] := pyapi.eval(nil:ptr,"re io.print(rdbl); # convert int to string, then convert string to int -bint:= bat.new(:oid,:int); +bint:= bat.new(:int); bat.append(bint,1804289383:int); bat.append(bint,846930886:int); bat.append(bint,67:int); diff --git a/sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_string.malC b/sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_string.malC --- a/sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_string.malC +++ b/sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_string.malC @@ -1,6 +1,6 @@ # basic strings -bstr:= bat.new(:oid,:str); +bstr:= bat.new(:str); bat.append(bstr,"asdf":str); bat.append(bstr,"sd asd asd asd asd a":str); bat.append(bstr,"test123":str); @@ -9,7 +9,7 @@ rstr:bat[:str] := pyapi.eval(nil:ptr,"re io.print(rstr); # strings with nil value -bstr:= bat.new(:oid,:str); +bstr:= bat.new(:str); bat.append(bstr,"asdf":str); bat.append(bstr,"sd asd asd asd asd a":str); bat.append(bstr,nil:str); @@ -18,7 +18,7 @@ rstr1:bat[:str] := pyapi.eval(nil:ptr,"r io.print(rstr1); # unicode strings -astr:= bat.new(:oid,:str); +astr:= bat.new(:str); bat.append(astr,"Hannes Mühleisen":str); bat.append(astr,"héllo":str); bat.append(astr,"éáú üüäãö":str); @@ -36,28 +36,28 @@ rstr4:bat[:str] := pyapi.eval(nil:ptr,"r io.print(rstr4); # convert bit to string -bbit:= bat.new(:oid,:bit); +bbit:= bat.new(:bit); bat.append(bbit,1:bit); bat.append(bbit,0:bit); rbit:bat[:str] := pyapi.eval(nil:ptr,"return(arg1)",bbit); io.print(rbit); # convert bte to string -bbte:= bat.new(:oid,:bte); +bbte:= bat.new(:bte); bat.append(bbte,42:bte); bat.append(bbte,84:bte); rbte:bat[:str] := pyapi.eval(nil:ptr,"return(arg1)",bbte); io.print(rbte); _______________________________________________ checkin-list mailing list [email protected] https://www.monetdb.org/mailman/listinfo/checkin-list
