Changeset: 93abba9a2737 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=93abba9a2737 Modified Files: clients/Tests/exports.stable.out monetdb5/modules/kernel/bat5.mx monetdb5/modules/mal/Tests/inspect05.stable.out monetdb5/modules/mal/Tests/inspect05.stable.out.Windows Branch: sort-properties Log Message:
Removed duplicate function (setSorted was identical to isSorted). Also approved updated list of exported functions. diffs (235 lines): diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out --- a/clients/Tests/exports.stable.out +++ b/clients/Tests/exports.stable.out @@ -8,7 +8,7 @@ stdout of test 'exports` in directory '. # gdk int ALIGNsetH(BAT *b1, BAT *b2); int ALIGNsynced(BAT *b1, BAT *b2); -int ATOMcmp(int id, ptr v_1, ptr v_2); +int ATOMcmp(int id, const void *v_1, const void *v_2); ptr ATOMdup(int id, ptr val); bte ATOMelmshift(int sz); int ATOMformat(int id, ptr val, char **buf); @@ -23,6 +23,7 @@ BAT *BATalpha(BAT *b); BAT *BATantijoin(BAT *l, BAT *r); BAT *BATantiuselect_(BAT *b, ptr tl, ptr th, bit li, bit hi); BAT *BATappend(BAT *b, BAT *c, bit force); +void BATassertProps(BAT *b); atomDesc BATatoms[]; BAT *BATattach(int tt, const char *heapfile); BAT *BATbandjoin(BAT *l, BAT *r, ptr mnus, ptr plus, bit li, bit hi); @@ -102,6 +103,8 @@ BAT *BATdel(BAT *b, BAT *c, bit force); BAT *BATdelHead(BAT *b, BAT *c, bit force); int BATdelete(BAT *b); BAT *BATdelta(BAT *b); +void BATderiveHeadProps(BAT *b, int expensive); +void BATderiveProps(BAT *b, int expensive); BAT *BATextend(BAT *b, BUN newcap); BAT *BATfakeCommit(BAT *b); BAT *BATfetch(BAT *b, BAT *s); @@ -144,7 +147,6 @@ BAT *BATouterjoin(BAT *l, BAT *r, BUN es BAT *BATprev(BAT *b); int BATprint(BAT *b); int BATprintf(stream *f, BAT *b); -BAT *BATpropcheck(BAT *b, int mode); BAT *BATrangejoin(BAT *l, BAT *rl, BAT *rh, bit li, bit hi); BAT *BATrangesplit(BAT *b, BUN n, int unary); BAT *BATreplace(BAT *b, BAT *n, bit force); @@ -247,7 +249,7 @@ void GDKqsort(void *h, void *t, void *ba void GDKqsort_rev(void *h, void *t, void *base, size_t n, int hs, int ts, int tpe); void *GDKrealloc(void *pold, size_t size); void GDKsetenv(str name, str value); -ssize_t GDKstrFromStr(unsigned char *src, unsigned char *dst, ssize_t len); +ssize_t GDKstrFromStr(unsigned char *dst, const unsigned char *src, ssize_t len); str GDKstrdup(const char *s); int GDKsyserror(_In_z_ _Printf_format_string_ const char *format, ...) __attribute__((__format__(__printf__, 1, 2))); ThreadRec GDKthreads[THREADS]; @@ -293,9 +295,9 @@ int MT_munmap(void *p, size_t len); int MT_path_absolute(const char *path); void MT_sleep_ms(unsigned int ms); oid OIDbase(oid base); -int OIDfromStr(str src, int *len, oid **dst); +int OIDfromStr(const char *src, int *len, oid **dst); oid OIDnew(oid inc); -int OIDtoStr(str *dst, int *len, oid *src); +int OIDtoStr(str *dst, int *len, const oid *src); void PROPdestroy(PROPrec *p); BUN SORTfnd_bte(BAT *b, ptr v); BUN SORTfnd_dbl(BAT *b, ptr v); @@ -379,16 +381,16 @@ BAT *VIEWhead(BAT *b); BAT *VIEWhead_(BAT *b, int mode); size_t _MT_npages; size_t _MT_pagesize; -int batFromStr(str src, int *len, bat **dst); -int batToStr(str *dst, int *len, bat *src); -int bitFromStr(str src, int *len, bit **dst); -int bitToStr(str *dst, int *len, bit *src); -int bteFromStr(str src, int *len, bte **dst); -int bteToStr(str *dst, int *len, bte *src); +int batFromStr(const char *src, int *len, bat **dst); +int batToStr(str *dst, int *len, const bat *src); +int bitFromStr(const char *src, int *len, bit **dst); +int bitToStr(str *dst, int *len, const bit *src); +int bteFromStr(const char *src, int *len, bte **dst); +int bteToStr(str *dst, int *len, const bte *src); const bte bte_nil; int closedir(DIR *dir); -int dblFromStr(str src, int *len, dbl **dst); -int dblToStr(str *dst, int *len, dbl *src); +int dblFromStr(const char *src, int *len, dbl **dst); +int dblToStr(str *dst, int *len, const dbl *src); const dbl dbl_nil; char *dirname(char *path); int dlclose(void *handle); @@ -397,18 +399,18 @@ void *dlopen(const char *file, int mode) void *dlsym(void *handle, const char *name); int escapedStr(char *dst, const char *src, int dstlen); int escapedStrlen(const char *src); -int fltFromStr(str src, int *len, flt **dst); -int fltToStr(str *dst, int *len, flt *src); +int fltFromStr(const char *src, int *len, flt **dst); +int fltToStr(str *dst, int *len, const flt *src); const flt flt_nil; int ftruncate(int fd, off_t size); char *get_bin_path(void); int gettimeofday(struct timeval *tv, int *ignore_zone); int gprof_pthread_create(pthread_t *__restrict, __const pthread_attr_t *__restrict, void *( *fcn)(void *), void *__restrict); -int intFromStr(str src, int *len, int **dst); -int intToStr(str *dst, int *len, int *src); +int intFromStr(const char *src, int *len, int **dst); +int intToStr(str *dst, int *len, const int *src); const int int_nil; -int lngFromStr(str src, int *len, lng **dst); -int lngToStr(str *dst, int *len, lng *src); +int lngFromStr(const char *src, int *len, lng **dst); +int lngToStr(str *dst, int *len, const lng *src); const lng lng_nil; int log_abort(logger *lg); int log_bat(logger *lg, BAT *b, char *n); @@ -471,19 +473,19 @@ void pthread_sema_init(pthread_sema_t *s void pthread_sema_init(pthread_sema_t *s, int flag, int nresources); void pthread_sema_up(pthread_sema_t *s); void pthread_sema_up(pthread_sema_t *s); -int ptrFromStr(str src, int *len, ptr **dst); -int ptrToStr(str *dst, int *len, ptr *src); +int ptrFromStr(const char *src, int *len, ptr **dst); +int ptrToStr(str *dst, int *len, const ptr *src); const ptr ptr_nil; struct dirent *readdir(DIR *dir); void rewinddir(DIR *dir); -int shtFromStr(str src, int *len, sht **dst); -int shtToStr(str *dst, int *len, sht *src); +int shtFromStr(const char *src, int *len, sht **dst); +int shtToStr(str *dst, int *len, const sht *src); const sht sht_nil; -int strFromStr(str src, int *len, str *dst); +int strFromStr(const char *src, int *len, str *dst); BUN strHash(const char *s); int strLen(const char *s); int strNil(const char *s); -int strToStr(str *dst, int *len, str src); +int strToStr(str *dst, int *len, const char *src); const char str_nil[2]; int void_inplace(BAT *b, oid id, ptr val, bit force); BUN void_replace_bat(BAT *b, BAT *u, bit force); @@ -1058,7 +1060,6 @@ char *BKCsetRole(int *r, int *bid, char str BKCsetSequenceBase(int *r, int *bid, oid *o); str BKCsetSequenceBaseNil(int *r, int *bid, oid *o); str BKCsetSet(int *res, int *bid, bit *param); -str BKCsetSorted(bit *res, int *bid); str BKCsetTransient(int *r, int *bid); str BKCsetWriteMode(int *res, int *bid); str BKCsetkey(int *res, int *bid, bit *param); @@ -2870,13 +2871,9 @@ str STRascii(int *ret, str *s); str STRbatBytes(int *ret, int *l); str STRbatConcat(int *ret, int *l, int *r); str STRbatConcatcst(int *ret, int *l, str *cst); -str STRbatEqual(int *ret, int *l, int *r); -str STRbatEqualCst(int *ret, int *l, str *cst); str STRbatLength(int *ret, int *l); str STRbatLower(int *ret, int *l); str STRbatLtrim(int *ret, int *l); -str STRbatNotEqual(int *ret, int *l, int *r); -str STRbatNotEqualCst(int *ret, int *l, str *cst); str STRbatPrefix(int *ret, int *l, int *r); str STRbatPrefixcst(int *ret, int *l, str *cst); str STRbatRstrSearch(int *ret, int *l, int *r); diff --git a/monetdb5/modules/kernel/bat5.mx b/monetdb5/modules/kernel/bat5.mx --- a/monetdb5/modules/kernel/bat5.mx +++ b/monetdb5/modules/kernel/bat5.mx @@ -253,10 +253,6 @@ command getSequenceBase( b:bat[:oid,:any address BKCgetSequenceBase comment "Get the sequence base for the void column of a BAT."; -command setSorted(b:bat[:any_1,:any_2]) :bit -address BKCsetSorted -comment "Assure BAT is ordered on the head."; - command isSorted(b:bat[:any_1,:any_2]) :bit address BKCisSorted comment "Returns whether a BAT is ordered on head or not."; @@ -654,7 +650,6 @@ bat5_export str BKCgetRole(str *res, int bat5_export str BKCsetkey(int *res, int *bid, bit *param); bat5_export str BKCsetSet(int *res, int *bid, bit *param); bat5_export str BKCisaSet(bit *res, int *bid); -bat5_export str BKCsetSorted(bit *res, int *bid); bat5_export str BKCisSorted(bit *res, int *bid); bat5_export str BKCisSortedReverse(bit *res, int *bid); bat5_export str BKCgetKey(bit *ret, int *bid); @@ -849,13 +844,6 @@ CMDtail(str *res, int *bid) } static int -CMDordered(bit *result, BAT *input) -{ - *result = BATordered(input); - return GDK_SUCCEED; -} - -static int CMDgetkey(bit *ret, BAT *b) { /* we must take care of the special case of a nil column (TYPE_void,seqbase=nil) @@ -2074,20 +2062,6 @@ BKCisaSet(bit *res, int *bid) } str -BKCsetSorted(bit *res, int *bid) -{ - BAT *b; - - if ((b = BATdescriptor(*bid)) == NULL) { - throw(MAL, "bat.isSorted", RUNTIME_OBJECT_MISSING); - } - CMDordered(res, b); - *res = BATordered(b); - BBPreleaseref(b->batCacheid); - return MAL_SUCCEED; -} - -str BKCisSorted(bit *res, int *bid) { BAT *b; 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 @@ -7669,7 +7669,6 @@ end main; [ "setColumn", "command", "bat", "(b:bat[:any_1,:any_2],t:str):void ", "BKCsetColumn;" ] [ "setRole", "command", "bat", "(b:bat[:any_1,:any_2],h:str,t:str):void ", "BKCsetRole;" ] [ "setName", "command", "bat", "(b:bat[:any_1,:any_2],s:str):void ", "BKCsetName;" ] -[ "setSorted", "command", "bat", "(b:bat[:any_1,:any_2]):bit ", "BKCsetSorted;" ] [ "setWriteMode", "command", "bat", "(b:bat[:any_1,:any_2]):bat[:any_1,:any_2] ", "BKCsetWriteMode;" ] [ "setReadMode", "command", "bat", "(b:bat[:any_1,:any_2]):bat[:any_1,:any_2] ", "BKCsetReadMode;" ] [ "setAppendMode", "command", "bat", "(b:bat[:any_1,:any_2]):bat[:any_1,:any_2] ", "BKCsetAppendMode;" ] 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 @@ -7663,7 +7663,6 @@ end main; [ "setColumn", "command", "bat", "(b:bat[:any_1,:any_2],t:str):void ", "BKCsetColumn;" ] [ "setRole", "command", "bat", "(b:bat[:any_1,:any_2],h:str,t:str):void ", "BKCsetRole;" ] [ "setName", "command", "bat", "(b:bat[:any_1,:any_2],s:str):void ", "BKCsetName;" ] -[ "setSorted", "command", "bat", "(b:bat[:any_1,:any_2]):bit ", "BKCsetSorted;" ] [ "setWriteMode", "command", "bat", "(b:bat[:any_1,:any_2]):bat[:any_1,:any_2] ", "BKCsetWriteMode;" ] [ "setReadMode", "command", "bat", "(b:bat[:any_1,:any_2]):bat[:any_1,:any_2] ", "BKCsetReadMode;" ] [ "setAppendMode", "command", "bat", "(b:bat[:any_1,:any_2]):bat[:any_1,:any_2] ", "BKCsetAppendMode;" ] _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list