[Monetdb-developers] MonetDB: xid - BATassertHeadProps: avoid property checking on xi...

Sjoerd Mullender sjoerd at acm.org
Tue Jul 24 23:06:21 CEST 2012


On 2012-07-24 22:13, Stefan Manegold wrote:
> Changeset: 805110fd0096 for MonetDB
> URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=805110fd0096
> Modified Files:
> 	gdk/gdk_bat.c
> Branch: xid
> Log Message:
> 
> BATassertHeadProps: avoid property checking on xid-compressed BATs
> their content is not plain valid data,
> and their properties are those of the uncompressed BAT
> 
> 
> diffs (13 lines):
> 
> diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
> --- a/gdk/gdk_bat.c
> +++ b/gdk/gdk_bat.c
> @@ -2892,6 +2892,9 @@ BATassertHeadProps(BAT *b)
>  		return;
>  	}
>  
> +
> +	/* no property checking on xid-compressed BATs */
> +	if (b->htype != TYPE_oid || !b->H->heap.xidcompressed)
>  	PROPDEBUG { /* only do a scan if property checking is requested */
>  		if (b->hsorted || b->hrevsorted || !b->hkey) {
>  			/* if sorted (either way), or we don't have to

I really don't like this layout.
Please consider using return after the if statement (with complementary
test).  I would also find that clearer.


-- 
Sjoerd Mullender

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 372 bytes
Desc: OpenPGP digital signature
URL: <http://www.monetdb.org/pipermail/developers-list/attachments/20120724/e94db2ee/attachment.sig>


More information about the developers-list mailing list