createunique requires all changes to continually check for uniquness. This is complicated and can be expensive. It also means that joins have an extra complication (hence your crash).
We are now thinking it might be better to just let the changes happen as they would with a normal hash column. It is easy to check for uniqueness by verifying the link column (for duplicates) is empty. For your example, you could do the following: c=: jdglc_jd_'ab jdhash_ab1' NB. get locale of the ab hash col link__c NB. links for duplicates assert *./_1=link__c NB. true if the column is unique In a future release we'll wrap this to make it easier to test for uniqueness on a hash col. On Mon, Feb 23, 2015 at 3:05 PM, <[email protected]> wrote: > Thanks for the quick information. Another question is, if createunique is not > recommended, what is the recommended way to create primary keys? In fact, I > also got the crashes when doing inner join. > > ----- 原始邮件 ----- > 发件人:Eric Iverson <[email protected]> > 收件人:Programming forum <[email protected]> > 主题:Re: [Jprogramming] jd crashs when outer join with createunique > 日期:2015年02月24日 01点26分 > > > The crash is caused by a bug in a reference from a table to a table > with createunique rather than createhash. > The fix is non-trivial and won't be made for the next release. The > next release will have a test so there is an error message rather than > a crash. > If there is no strong reason for the createunigue, as a workaround, > just don't use it. > If you need createunique, then using b2,b2<ab will work and give the > desired result. > In some cases createunique introduces more complexity and performance > problems than are warranted by the benefits. > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
