kdb+ 2.7 Release Notes¶
This page details the latest features and improvements released to kdb+ 2.7.
2013.06.20¶
Fixes and improvements¶
-
writing a list of primitives to a file could corrupt the heap, causing a crash at some point later, since v1.0
e.g. q)`:test set 3000000#(::);.Q.gc[] -
nested sync msgs could cause the socket to be closed erroneously, the remote throwing 'rcv: Resource temporarily unavailable.
e.g. q)h:hopen 55557;neg[h]@/:("0N!.z.w \"0N!{0}[]\"";"0N!.z.w \"0N!{1}[]\"") -
N.B. nested sync messaging is generally to be avoided; due to the nature of having to process incoming messages to reach a response,
the order of response messages may be incorrect.
2013.02.06¶
Fixes and improvements¶
- comparison tolerance was too tolerant on 0=1e-256 (0 should only be equal to 0);all platforms.
2013.01.04¶
Fixes and improvements¶
- comparison tolerance was too tolerant on 0=1e-256 (0 should only be equal to 0);osx only.
2012.09.06¶
Fixes and improvements¶
-
setting a `p attribute on a vector which already had a `u attribute was crashing (immediately or later), since v1.0
e.g. q)group `p#`u#-20?20; -
select with a "date.[month|year] in .." was not matching correctly if rhs was not sorted and unique.
e.g. q)select from([]t:enlist 2001.01.01)where t.month in 2001.02 2001.01m
2012.09.02¶
Fixes and improvements¶
-
added rank check to lj to catch error case which was causing a crash
e.g. q)([]a:1 2;d:1 2),\:([a:(1 2;1 2)]f:3 4)
2012.08.03¶
Fixes and improvements¶
- built-in logging via -l could log bad data if incoming ipc msg was compressed.
2012.07.12¶
Fixes and improvements¶
-
a splay is defined as a special form of dict. dict,splay was crashing.
e.g.(`a`b!`a`d),`a`!`
2012.05.30¶
Fixes and improvements¶
- patch for v2.7 to use ipc with v3.0, to allow it to send timestamp/timespan.
2012.05.10¶
Fixes and improvements¶
-
table _ symbol was crashing
q)([]())_`
2012.04.03¶
Fixes and improvements¶
-
.Q.gc[] could crash when used with slave threads, since v2.7 2011.09.21
-
an aborted incoming connection could result in the server process stopping listening for new connections ('accp error).
2012.02.20¶
Fixes and improvements¶
-
1: parsing as booleans was erroneous since 2011.11.22
e.g. ("bbb";1 1 1)1:0x000102
2012.02.14¶
Fixes and improvements¶
- .z.pc was not firing if a timeout occurred in the process whilst it was awaiting a response to a sync request.
2012.02.02¶
Fixes and improvements¶
-
peach was crashing on Solaris only since 2.7 2011.09.14
-
Selecting a splay table from itself caused either a wsful or crash
q)system"cd /tmp";system"mkdir t";system"cd t";`:2012.01.01/t/ set([]foo:1 2);system"l ."; q)select t,1 from t
2012.01.23¶
Fixes and improvements¶
- A connection could be dropped if a msg was pending on a socket, and processing due to another socket caused those msgs to be read; since v1.0.
2012.01.04¶
Fixes and improvements¶
-
delete key from dict was crashing
q)d:`x`y`z!(100 200 300);delete x from `d;
2011.12.31¶
Fixes and improvements¶
- hopen timeout was sometimes not working since 2.7 2011.05.15
2011.12.13¶
Fixes and improvements¶
- delete from `t still had some instability, sometimes crashing
2011.11.22¶
Fixes and improvements¶
-
delete from `t was crashing since 2011.11.18
e.g. t:([]a:();b:());delete b from `t -
1: non-zeros being parsed as booleans are now interpreted as 1b.
e.g. ("bbb";1 1 1)1:0x000102 -
foreign key lookups for dictionaries and time function lookups, were crashing (on solaris sparc only) since 2010.12.06
e.g. t:([a:`a`b]b:3 4);d:`x`y!(`t$`a;12:34);exec x.b,y.hh from d
2011.11.18¶
Fixes and improvements¶
-
delete c from`whatever now takes care of views; previously it was crashing.
e.g. q)value"a.c::a.b";delete c from `a;a.b:3 -
In some cases, deleting from a list would leave an empty of the wrong type instead of ().
e.g. q)s:flip `a`b!"**"$\:();do[2;`s upsert `a`b!("bar";`a`b!1 2)];do[2;s:s _ 0];`s upsert `a`b!("bar";`a`b!1 2) -
better detect loop dependencies
q)a.c::a q)delete c from `. / was crashing
2011.11.09¶
Fixes and improvements¶
-
append to dictionary could leave the dictionary as an invalid object (causing a crash later) if the append failed.
e.g. q)d:`a`b!2 3;d[`c]:0b -
time+minute or time+seconds was throwing 'type
e.g. q).z.t+08:00 -
select with an empty list of columns caused a crash.
e.g. q)select()from -
reading a partial timestamp (e.g. "02.10.2011T04:")in a csv file could cause a crash.
2011.10.31¶
Fixes and improvements¶
-
keyed tables with a column of dictionaries was throwing type on upsert
e.g. q)t:([a:()]b:());`t upsert `a`b!("foo";`a`b!1 2);`t upsert `a`b!("bar";`a`b!1 2)
2011.10.27¶
Fixes and improvements¶
-
raze of types from 100...106 would throw 'type.
e.g. q)raze (1;+;3 4) -
block Q) and \l file.Q as win/osx filenames are not case sensitive (continuously reloads q.k without defining Q).
e.g. Q)2+2 -
increased limits for glim (number of vectors with a `g# attr) and mlim (number of concurrently mapped nested vectors) to 65530.
e.g. q){`g#x}each enlist each til 65530; q)`:t/ set([]x:enlist til 1);{x set select from get`:t/;}each `$"i",/:string til 65530;
2011.10.25¶
Fixes and improvements¶
- .Q.gc[] could cause instability/crash when invoked, since 2011.09.15
2011.10.21¶
Fixes and improvements¶
-
decompressing a file that was compressed with ipc algo could result in a crash.
-
upsert was failing for keyed tables where key only was specified; value extends with ().
e.g. q)t:([()]y:());`t upsert([]1 2) -
()in/:() was returning `boolean$() but should have been ()
-
block v[i]+:t (was causing segfault)
q)v:10#0;v[0 1]+:([]a:til 2)
2011.10.18¶
(q.k only, binaries same as 2011.10.13)
Fixes and improvements¶
-
q.k - redfine cov:{avg(x-avg x)*y-avg y}
e.g. q)100000000 100000001 100000002j cov 100000000 100000001 100000002j
2011.10.13¶
Fixes and improvements¶
-
upsert on lists broke since 2011.10.12
e.g. q)t:([id:`int$()] a:();b:`symbol$());`t upsert (1;("";0);`typ);`t upsert (2;`abc;`typ) -
allow < comparison of ordinal (.z.z and .z.p) and cardinal types. Converts (take day portion) and truncates to the cardinal type.
e.g. q).z.z<21:00
2011.10.12¶
Fixes and improvements¶
-
dict catenate can create an invalid dict, since initial release on 2011.10.12
e.g. q)a:`a`b`c!(1 2;`a`b;3 4f);a[`d`e]:(`dd;1)
2011.10.12¶
updated, see above entry
Fixes and improvements¶
-
upsert on a table with a group attribute on a column was slow since v2.4
e.g. q)t:([k:`u#til 2000000]v:`g#2000000?1000000);system"t `t upsert([]k:count[t]+til 4;v:4#-1)" -
group attribute was unnecessarily recalculated when reapplying it to a vector
e.g. q)v:`g#2000000?1000000;system"t v:`g#v" -
block scalar case for distinct (as it reverted to rand which was confusing)
e.g. q)distinct 4 -
q.k - redefine rand:{*1?x} , system:."\\" and faster j10,j12
-
plist' with more than 8 args was crashing. Now throws 'length if more than 8 args.
e.g. q)plist'[1;1;1;1;1;1;1;1;1;1;1] -
2 operations on nested arrays were causing a crash
e.g. q)`:nest set (0 1 2;3 4 5);get[`:nest]_1 q)=':[get`:nest]
2011.09.27¶
Fixes and improvements¶
-
tighten up parsing for temporal fields names - time.[hh|minute|second] and date.[year|month]
and block [month|date].[minute|second|time|timespan] e.g. q)select from([]t:enlist 10:00:00.000)where t.hour=10 / bad, hour not valid field, should be t.hh -
hopen 5001 erroneously did not use localhost, it used hostname, since 2011.05.15.
-
Now checks for missing .Q.s|.Q.pcnt (previously crashed if missing).
-
.Q.en now loads the sym file only if there are cols to enumerate in the table
2011.09.23¶
Fixes and improvements¶
-
Rollback of "Now detects and exits if system essential functions are removed from .Q namespace"
due to badly formed queries triggering it incorrectly. Was added 2011.09.15
2011.09.21¶
Fixes and improvements¶
-
When slave threads are used, executing .Q.gc[] from the main thread did not execute gc in the slave threads;
this had to be done manually using {.Q.gc[]}peach til system"s". Now .Q.gc[] in the main thread executes gc in the slave threads too. -
1: was throwing 'type for reading reversed endian-ness using (lengths;types), since v2.7 2011.03.14.
The type order of the lhs list determines whether endian-ness will be swapped for the input. (types;lengths)1:... does not swap, (lengths;types)1:... does swap. e.g. q)(4 4 4;"iii")1:raze 0x0 vs/:10 20 30
2011.09.15¶
(re-released as .Q.gc[] with cmd line param -g 1 was crashing)
New¶
-
.Q.gc[] now coalesces unused memory before attempting to return memory to the OS.
Side effect is that .Q.gc[] can take longer to execute. .n.b. coalescing is always deferred, regardless of -g command line option for immediate/deferred garbage collection. -
.z.c now reports the number of cores that the kdb+ process is running on.
-
\w now reports the physical memory of the machine, also .Q.w[]`mphy.
Fixes and improvements¶
-
`int$-0Wj was erroneously returning 0N (solaris on intel only)
-
Multithreaded input mode would crash if handle 4 was closed, and views would stop working if handle 5 was closed.
Now they are blocked from being closed in this mode. -
To have .Q.chk consistent with meta, the latest partition is now used as the representative partition,
i.e. which schema is used for filling missing tables in an hdb. .e.g. q)ta:([]a:1 2);tb:([]b:1 2);`:hdbtest1/2011.01.01/t/ set ta;`:hdbtest1/2011.01.03/t/ set tb; q)\mkdir hdbtest1/2011.01.02 q).Q.chk `:hdbtest1 -
The heap tally reported by \w or .Q.w[] was incorrect for growing arrays on non-linux systems
e.g. q)a:((-16+`int$2 xexp 26)#0x0);a,:0x0;.Q.w[]`heap -
Now detects and exits if system essential functions are removed from .Q namespace
e.g. q).Q:{} -
Lower and upper now work with lists of char vectors
e.g. (upper;lower)@\:("aBC";"dEF") -
Enumerating an enumeration to a file wrote garbage into the file
e.g. q)`:foo?`bar?10000?`3;get`:foo
2011.08.20¶
(q.k only, q binaries remain as 2011.08.16)
Fixes and improvements¶
-
q.k - table count is now long, to accomodate daily taq counts exceeding 2 billion rows.
e.g. select count i by date from trade where date within 2011.08.01 2011.08.05
2011.08.16¶
Fixes and improvements¶
-
find modified for floats to avoid using any attribute on lhs if lengths don't warrant it.
e.g. q)l:("i"$1e6)?1.0;s:asc l;q:("i"$1e6)?l;system each "t ",/:("q in s";"q in l") -
q.k - var redefined
e.g. q)dev 5#10.51 -
q.k - aj and aj0 now unkey 2nd table. i.e. 2nd table may now have a key.
e.g. q)aj[`a`b;([]a:1 1 2;b:1 1 2;c:`a`b`c);([a:0 1 2;b:0 1 2]d:3 4 5)]
2011.08.01¶
Fixes and improvements¶
-
dict,() was throwing type since 2011.07.28
e.g. q)(`a`b!1 2),()
2011.07.28¶
Fixes and improvements¶
-
http requests were not detecting the correct "content length" in an http response.
e.g. q)count (`$":http://download.thinkbroadband.com")"GET /5MB.zip HTTP/1.0\r\n\r\n" -
dict,table did not provide null value if the table had no rows
e.g. q)(`foo`bar!1 2),0#([foo:3 4];baz:`a`b) -
exec,select,update on a dictionary containing a null in its key threw 'type if the incoming was from an absolute reference in namespace.
e.g. q).test.a:`c;update x:.test.a from``x!(`a;`b)
2011.07.22¶
Fixes and improvements¶
- 0n div 1 and 0.5 xbar 0n - were reporting non null value, since 2011.07.08
2011.07.21¶
Fixes and improvements¶
-
files containing a single vector with a `u attribute were erroneously being read in full rather than mapped, since 2010.12.03.
e.g. q)get `:testu set `u#til 1000 -
\ts did not nest correctly wrt space usage.
e.g. q)a:til 100000000 q)\ts {delete a from `.;value"\\ts 1+1"}[]
2011.07.14¶
-
potentially improve performance of initial constraint of real column of select .. where sym in syms
where sym has `p# or `s# and is sorted and syms is not sorted. -
parsing a csv file with a single byte with value \n would cause a segfault.
e.g. q)("SSSISI";",")0:`:foo.csv -
q.k - .h.xd incorrectly handled nested columns when the select has no constraint
e.g. q).h.xd select from t where date=2011.07.09
2011.07.08¶
Fixes and improvements¶
-
select distinct corrupted the heap, causing a random crash later, since 2011.05.24
-
q.k - .Q.fl - lj was unable to handle nested columns when the select has no constraint
e.g. q)t:([]sym:`a`b`c;ids:("123";"abc";"ghert"));t1:([]sym:`a`b`c`f;ids:("xy";"adf";"ksff";"kdfa")); q).Q.dpft[`:temptest;.z.D;`sym;`t1];.Q.dpft[`:temptest;.z.D;`sym;`t]; q)(select from t where date=2011.07.08) lj 1!select from t1 where date=2011.07.08 -
padding of char vectors could cause a wsfull if a null length was supplied. Now throws 'length.
e.g. q)0N$"Hello world" -
removed the limit on number of slave threads - was 16, now unlimited
-
mod on floats had precision problems; now uses a comparison tolerance floor for the underlying implementation of div.
e.g. q)1.448 mod .0001 -
read0 or read1 could result in wsful if attempted to read a file > 2 billion bytes
2011.06.20¶
Fixes and improvements¶
-
select name:distinct col from t was returning incorrect type (enlisted).
e.g. q) select c1:distinct a from ([]a:1 2;b:`x`y) -
Amend at depth for monadic functions did not work for tables, was throwing nyi.
e.g. q)t:([]a:5#.Q.an);.[t;(2 3;`a);upper]; -
upserting into a 'stepped' dictionary could result in an illegal object; now blocked, throws 'step
e.g. q)t:`s#([a:`a`b`c;asofdt:2001.01.01 2002.02.02 2003.03.03]data:1 2 3) q)0N!`t upsert update a:`d from select from t where a=`a The correct way to update this object is t:`#t;t:`s#keys[t]xasc t upsert ..
2011.06.13¶
Fixes and improvements¶
-
distinct [float|long|timespan|timestamp|datetime] vector/list with more than 1 billion elements could crash, since v1.0.
-
remove limit for length of arg for system call.
e.g. q)system "q ",2000#" -arg 123" -
some lambdas could execute incorrectly if first constraint in a where clause, since v1.0
e.g. q)select from([]c:0 1)where{x<=y}[c;2]
2011.06.07¶
Fixes and improvements¶
-
0 xexp -1 was returning 0f; now it returns 0w.
-
Linked columns in splayed tables failing ('type) since 2011.05.15
e.g. q)master:([]id:til 3;qty:5 10 15);detail:([]id:til 5;masterid:5?3;slice:5?4);update masterid:`master!master[`id]?masterid from`detail q)`:master/ set master;`:detail/ set detail q)\l . q)select id,slice,masterid.qty from detail
2011.06.01¶
Fixes and improvements¶
-
select from partitioned table where the first clause was not a constraint on the partition field was not filtering
the field correctly if constrained later in the same select. Of course, the partition field should always be the first constraint anyway, since 2011.04.30 -
hopen `::5000 was hanging, since 2011.05.15
-
remove khp* functions from kdb+ build as these are c-library functions only
-
improved performance of uncached read0/read1 (and hence .Q.fs) under windows
2011.05.24¶
Fixes and improvements¶
-
select distinct c1:a,c2:b from([]a:1 2;b:`x`y) was throwing 'c1
select distinct .. if there is a 'by' then the distinct becomes part of first expression otherwise select distinct .. is distinct select -
select 1,2,3 from([]x:1 2 3) was crashing
-
hopen(`:file;timeout) was crashing or generating wsful. Timeout is a sockets-only feature, hence this now throws 'type.
-
desc/xdesc on symbol types was not threadsafe causing a crash in multithreaded modes
e.g. q taq -s 2 t:get`:2000.10.02/trade;(`sym xdesc)peach(t;t) -
"U"$"13:00:00" was returning 0Nu instead of 13:00
2011.05.16¶
(q.k only, no change to q binary)
Fixes and improvements¶
-
q.k - var and cov definitions needed a cast to float
e.g. dev 100 46341 -
q.k - added .Q.fsn which allows a cleaner override of the chunk size, n, for .Q.fs
2011.05.15¶
Fixes and improvements¶
-
select i from splay/partition was crashing, since 2011.04.30
-
removed redundant memcpy for zlib file decompression
-
Tighten up switching between multithread input queue (listen on negative port) and single threaded (positive port). When trying to
-
switch to listen on a
1) positive port, checks that no threaded connections exist. 2) negative port, checks no connections exist on the main thread. If checks fail, it throws 'existing connections.
2011.04.30¶
Fixes and improvements¶
-
parsing of negative minute,second and time literals was erroneously extending to the next highest resolution time type.
e.g. -10:00 -
select from a splayed table now maps files for the duration of the select, to reduce the number of times that a file is reopened/remapped.
this has a performance advantage for compressed files as the decompression is performed only once for the select. Select from partitioned tables benefits by extention, as these contain splayed tables. -
block \x if authentication in place (via cmd line -u/-U) or readonly (via cmd line -b)
-
Properly detect and report exceeding the limit (4096) of concurrently open compressed files. File descriptor limits are
sockets - 1022 uncompressed files - unlimited by kdb+ (2 billion) compressed files - 4096 -
q.k - refined excel generation functions in .h namespace.
.h.ed / single table .h.edsn / dict of tables .h.es /sheet .h.eb /workbook -
q.k - added distinct as one of .Q.a0 i.e. an aggregator.
(the map-reduce does: (?:;,/ of the partition distincts)) as select distinct .. by from a partitioned table was not executing distinct across the partitions. The behavior of distinct has been refined and behaves as follows - given select distinct a by b from t distinct can be used as an aggregator if there is a 'by'. unfortunately if there is no 'by' select distinct a,b from t has a different special meaning(meant to mimic sql92), namely distinct select a,b from t previously select distinct from t would work, but now throws a rank error similar to other unary ops. The fix is to use column names explicitly. -
block comparison of ordinal temporal types (MDZP) with cardinal temporal types (UVTN)
e.g. .z.p<21:00 -
saving mapped lists of char vectors to csv was failing
e.g. q)`:t/ set([]a:("ab";"cd");b:("ef";"gh"));t:get`:t/;save`:t.csv -
q.k - saving a table with null datetime to .xls was throwing 'length error
e.g. q)t:([]enlist 0Nz);save `:t.xls
2011.04.14¶
(q.k only, no change to q binary)
Fixes and improvements¶
-
q.k - aj was failing for joins where the join column was specified as scalar not a list
e.g. aj[`time;...]
2011.04.12¶
Fixes and improvements¶
-
q.k - escape open angle brackets in http error messages by default
-
ipc serialization was crashing if the generated message was between 1999999987 and 1999999994 bytes long, since 2011.03.23.
e.g. q)-8!1999999994#0x0 -
q.k - changed aj/asof to use pure q code rather than built in 2:.
-
propagate 0N 0W -0W in time conversions
e.g. q)`datetime`year`month`week`mm`dd$\:/:(-0Wd;0Wd;-0Wp;0Wp;-0Wz;0Wz) -
q.k - extend ej to handle empty cases correctly
e.g. q)98h~type ej[`c1;([]c1:0#`;c2:0#0n);([]c1:`cc`cc`dd`ee;c3:5 6 7 8f)]
2011.03.26¶
Fixes and improvements¶
-
ipc compression could potentially cause heap corruption in extremely rare cases, since 2.6 2010.02.02
-
read/write csv files which use " to embed a delimeter; treats embedded " as in excel (i.e. " have to be doubled).
e.g. (enlist"*";",")0:-14!"asd\"qwe,qw" / can use -14!x to properly double embedded quotes n.b. (enlist"*";",")0: csv loader does not handle embedded \n's -
q.k - rollback change to count hdb partitions on startup when slave threads used, as loading of large databases was taking much longer. Side effect is that partitioned tables cannot be selected from within peach. Work around is to explicitly count such tables before such usage.
2011.03.23¶
Fixes and improvements¶
-
q.k - extended ej to be more general, enabling nested key fields (like varchar)
-
q.k - added wj1, a window join for points instead of step function
-
c-function ktn(type,count) now checks that count is within (0;2 billion)
-
n?0b sometimes falsely reported domain error
-
now blocks creating/mapping files that contain more than 2 billion elements
e.g. do[2;`:testdb/test upsert([]a:2000000000#0x0)] -
prev(1 2;3 4 5) was returning 0N as the first element rather than `int$(). Since 2010.05.18
2011.03.20¶
Fixes and improvements¶
-
update to a partitioned table was throwing 'par and then crashing
e.g. q)`:db/2001.01.01/t/ set ([]a:1 2;b:1 2) q)\l /tmp/foo q)`t upsert `c`d!1 2 -
q.k - extend xbar to work with timestamps/timespans
e.g. 0D00:01:00 xbar .z.N -
if kdb+ was started with no stdin, it could fail to find k4.lic file
-
assigning to a keyword within a function over ipc was crashing
e.g. q)f:{g:{}};.q.g:{};-9!-8!f / g is the keyword in this instance
2011.03.14¶
Fixes and improvements¶
-
for comma-escaping, load text was not behaving the same for single char vector as for a list of char vectors.
e.g. q)(("**";",")0:enlist"\"q,w\",we")~enlist each("**";",")0:"\"q,w\",we" -
(types;widths)0:file was crashing if it was instructed to read more bytes than were available
e.g. q)`:test 1:"This file only has 28 bytes\n"; q)(enlist"c";enlist 1)0:(`:test;0j;28); / should only try 27 -
aggregation functions with linked columns from partitioned tables was failing with 'nyi
e.g. using the linked column setup from the 2011.03.07 entry with any of the following q)select avg t2link.e by c from t1 q)select sum abs t2link.e by c from t1 q)select t2link.e by c from t1 -
rollback changes (2011.03.07) to fby with strings or nested vectors due to a conflict with uniform functions.
For now, fby (update by) should only allow aggrs on vectors, not nested, because both allow scalar extension. e.g. q)exec (maxs;str like "") fby id from ([]id:`foo`bar;str:("foo";"bar")) prior to 2011.03.07 was returning (,0b,0b) and since then,00b -
attempts to (erroneously) lookup foreign key on a column of dicts was crashing
e.g. select b.b from([a:1#`]b:enlist`c`d!``)where null a
2011.03.07¶
Fixes and improvements¶
-
q.k added prior keyword, defined as k){x':y}
-
extend linked columns from disk to allow chaining of foreign keys such as select a.b.c from t
e.g t1:([]a:1 2 3;b:4 5 6;c:7 8 9);t2:([]c:7 8 9;d:8 9 10;e:11 12 13);t3:([]e:11 12 13;f:14 15 16;g:17 18 19) t1:update t2link:`t2!t2[`c]?c from t1;t2:update t3link:`t3!t3[`e]?e from t2 `:testdb/2011.03.01/t1/ set t1;`:testdb/2011.03.01/t2/ set t2;`:testdb/2011.03.01/t3/ set t3 \l testdb select a,b,t2link.t3link.g from t1 -
q.k - hdb with slave threads now scans the partitioned count (populates .Q.pn) when loading a partititioned table,
otherwise a 'noupdate error can occur later in a slave thread as .Q.pn is a global. -
table,\:keyedTable was crashing if table was nested. Now throws 'rank error.
e.g. ([]a:2 enlist/`foo) ,\: ([a:`foo`bar]b:1 2) -
Added check for when file compression is constrained by too few kernel structures on linux (vm.max_map_count).
-
"P"$ and "N"$ enhanced to parse unix times.
e.g. "P"$"1298906304.667573216" -
next,rank,xrank and xprev now signal `rank when passed atoms
-
For symbols, extended deal to same length limit (8) as rand; previously deal was limited to length 7.
e.g. -5?`8 -
conforming dicts were not collapsing to a table
e.g. raze flip 1 cut([]x:1 1) -
For partitioned tables, as of 2.6, meta t has returned the "representative" (and most recent, last) partition of t.
meta select from t where date=dateNotInHdb, was returning meta info from the first partition. Now it too uses the last partition. -
fby didn't work with strings (or other nested types)
e.g. select from([]x:1 2 2;y:("baz";"quux";"quuux"))where y like'(last;y)fby x -
.z.vs was not firing in case of error
e.g. q)t:([] s:`a`b`c; i:1 2 3);.z.vs:{0N!(x;y)};t[0]:(`d;4f)
2011.02.16¶
Fixes and improvements¶
-
logging database was not rolling back correctly in case of error
e.g. start kdb+ with q -l log q)0"t:([] s:`a`b`c; i:1 2 3)" q)0"t[0]:(`d;4f)" -
can't use view as foreign key, now blocked for dicts too.
e.g. q)t:([fname:`a`b]lname:`c`c) q)v::t q)update `v$name from`name`age!(`a;20) -
improve select a.b.c from tuple (introduced in 2.7 2010.12.17), previously threw 'c.b
e.g. t:([a:`a`b]b:1 2);s:([c:`t$`a`b]d:1 2f);select f.c.b from first([]f:`s$`a`b) -
t,:L (tuple,:list) was crashing since 2.7 2011.01.24, now throws 'type error.
e.g. d:(`a`b!1 2);d,:([]a:1 2;b:1 2) -
Since 2.6 2010.09.08, 'accp error was losing the context of the error and hence showing wrong (OS specific) text.
e.g. was "Bad file Descriptor" instead of "Too many open files". -
grouping/distinct of compound lists with 'negative' nulls was not recognizing the nulls correctly
e.g group flip("F"$("-x";"x");2)
2011.02.04¶
New¶
-
keyed table composition, has the same behaviour as dictionary composition, i.e. functionally as
-
given 2 keyed tables, K1 K2, applying K2 to K1 results in key[K2]!K1 value K2
e.g.([n:1 2 3]c:("baz";"quux";"quuux"))([s:`a`b`c]n:1 2 3)
Fixes and improvements¶
-
potentially, in extremely obscure cases, a sym compare might have matched incorrectly. This affects finding unique rows
in tables where at least one column is a sym. -
allow upsert of empties
e.g.([x:1 2]y:3 4)upsert([]x:`int$()) -
allow switching of garbage collect to immediate(1) mode instead of deferred(0),
via command line option g. Immediate mode is the 2.5/2.6 default, deferred is the 2.7 default. e.g. to use immediate mode, invoke as q -g 1 -
added additional ipc msg validation check.
-
given t-tuple(aka record aka simplesymdict),T-table(list of tuples) and K-keyedtable(T!T)
T,t and t,T promote but T,K and K,T are now blocked as they are meaningless. T,\:K didn't check for K properly causing a crash, e.g. ([a:1 2]b:`a`b),\:([]a:1 2;b:`a`b) -
Block assigment via Table.field notation as it allowed creation of structures that did not conform, causing a crash later.
use Table[`field]:... instead. Table.field notation is ok for reading. e.g. creation of a nonconforming structure .a.a:([] d: 1 1 1; p:10 10 20);.a.a.b:(`a`b!1 2);1#.a.a -
0!x was not decrementing ref count of x in the event of a type error
e.g.0!() -
display of nested enum types was incorrect
e.g. q)t:([a:("asd";"qwe")]b:2 3);([]`t!0 1)
2011.01.24¶
Fixes and improvements¶
-
flip() was at sometime later causing a seg fault since 2.7 2011.01.20
-
,\: miscalculated the intersection of the fields resulting in a seg fault
e.g. ([]a:1 2;b:2 3),\:([a:0#0]b:0#0) -
Given table(T) and keyedtable(K)
-
T:1000#(flip `a`b`c!(`a`z;1 2;`d`i));K:([a:`a`b]b:2 3;c:`i`o)
x#/:T (and K) x_/:T (and K) are caught and translated to the constant time: flip x op flip T e.g. `a`b#/:T
2011.01.22¶
Fixes and improvements¶
-
copying objects larger than 2GB was failing since previous release, 2011.01.20.
-
grouping/distinct of datetime types was not processing 'negative' nulls correctly
e.g distinct "z"$"F"$("-x";"x") -
reallow shortened u,v,t tokens which were blocked when time parsing became more strict in 2010.12.03.
e.g. 20u,20v,20t -
extended record,keyedtable and table,\:keyedtable to handle overlapping and extending fields.
-
x,\:y was seg faulting if one of the keys in y is not in x
e.g ([]a:1 2),\:([a:1 2;b:2 3]c:1 2)
2011.01.20¶
New¶
-
Implemented over/scan/each prior for tables.
e.g. {x+y}/[([]a:til 2)] {x+y}/[`a`b!1 2;([]a:til 2)] {x+y}\[([]a:til 2)] {x-y}':[([]a:1 3 10)] -
Leftjoin is builtin for
record,keyedTable - for test below, approx. 5 times faster than record lj keyedTable table,\:keyedTable This is why it is called left join, as it does one update for every record on the left. For now all incoming fields must be all in(i.e. update) or all out(extend). e.g. / set up record, keyedTable, count and table for test r:`a`b`c`d!(`a;2;3.4;`w);d:([]a:`a`b)!([]b:2 3;d:`i`o);n:100000;t:n#(r;@[r;`a;:;`q]); \t do[100;t lj d] \t do[n;r lj d] \t do[100;t,\:d] \t do[n;r,d]
Fixes and improvements¶
-
calling code in dynamically loaded libraries on linux could crash randomly, since v1.0
-
select from symbol could result in an infinite recursive loop and consequent crash due to stack exhaustion, since 2.6 2009.08.20.
-
Now blocked by allowing just one level of indirection, as originally intended, throwing 'type if further levels are detected.
e.g. t:`t;select from t -
Parsing of datetimes with "YYMMDD.." was erroneously returning 0Nz since 2.7 2010.12.03
e.g. "Z"$"110101 08:42:46" -
Removed KXHEAPDEBUG (added 2010.10.13) and assoc processing.
-
Was crashing if the sort column name was missing from select[m n;<colname] from ...
e.g. select[4 2;<] from([]a:til 10) -
Fast column select (by recognizing: field#/:table)
e.g. given table t:([]a:...;b:...), and keyed table d:([x:...]a:...;b:...) `a`b#/:t is a little faster than select a,b from t `a`b#/:d is much faster than 1!select x,a,b from d -
For better performance, uses memcpy from glib/crt instead of proprietary memcpy.
-
Redid flip code from 2.6 2010.05.10 change
2010.12.17¶
Fixes and improvements¶
-
appending an empty list to a nested type was throwing 'type since 2.7 2010.07.09
e.g. `:test set("hello";"world");`:test upsert() -
reallow 0t,0v and 0u which were blocked when time parsing became more strict in 2010.12.03.
-
cleaned up logic for file/socket descriptors being inherited by child processes - see 2010.09.08 entry.
2010.12.06¶
New¶
-
Enable foreign key lookups for dictionaries and time function lookups
e.g. t:([a:`a`b]b:3 4);d:`x`y!(`t$`a;12:34);exec x.b,y.hh from d d:enlist[`x]!enlist .z.p;exec x.month from d -
for consistency with "F"$, parse scientific notation literals with positive exponent as a double
rather than evaluating as a real+int. e.g. 4e+07="F"$string 40000000f -
@[0;0;+;0] was returning a projection instead of throwing a type error.
2010.12.03¶
Fixes and improvements¶
-
loading a file created with v2.5 which contained only `g#0#0h caused a crash.
n.b. this particular file created with with versions>2.5 is not compatible with versions<=2.5. -
parsing of times was too permissive, resulting in incorrect values if : and . were in wrong positions.
e.g. (10:10.20;2010:10.20;10:10000:20.000;2010.10.10T10:10.20;2010.10.10D10:10.20;1D10:10.20) -
Print c call stack in the event of a crash under OSX
2010.11.30¶
Fixes and improvements¶
- (internal) kdb+ could crash if stringify was not already initialized when an error was encountered, since v1.0.
2010.11.29¶
Fixes and improvements¶
-
cor, cov, dev and var were not working correctly on selects from partitions when no constraints were used, since 2.6 2009.10.15.
e.g. `:db/test/2010.09.20/t/ set([]p:1 1 1 2 2;r:1 2 3 4 5); `:db/test/2010.09.21/t/ set([]p:10 11;r:2 3); \l db/test {(x cor y)~z}[(select r from t)`r;(select p from t)`p;first (select r cor p from t)`p] -
Querying an unknown file based table could caush a crash
e.g. select from (flip enlist[`x]!`:t/) where i<1 -
wj wasn't giving consistent results for joins using a single column
e.g. wj[-2 1+\:t.time;`time;t;(q;(::;`ask);(::;`bid);(::;`time))] wj[-2 1+\:t.time;enlist `time;t;(q;(::;`ask);(::;`bid);(::;`time))] wj[-2 1+\:t.time;`sym`time;t;(q;(::;`ask);(::;`bid);(::;`time))] given q:([]sym:9#`ibm; time: 10:01:01 + til 9; ask: 101 + til 9; bid:98 + til 9); t:([]sym:3#`ibm; time: 10:01:01 10:01:04 10:01:08; price: 100 101 105); f:`sym`time;w:-2 1+\:t.time; -
`mm`hh`dd`uu$\:.z.Z was failing if any of these global variables mm,hh,dd,uu were set.
A side effect of this fix is that these variable names cannot be used as enum targets e.g. q)mm:`a`b`c;`mm$`c`b 'type
2010.11.18¶
Fixes and improvements¶
-
was leaking memory on thread exit. This manifests itself when using multithreaded input queue (i.e. listening on a negative port)
or calling m9() from a shared library that uses multithreading.
2010.11.15¶
Fixes and improvements¶
-
.Q.gc[] was releasing partial blocks of memory only, since 2010.10.13
-
Out of sync enums and enum targets was crashing
e.g.s:`p#`sym!1 0;sym:`symbol$();iasc s
2010.10.13¶
New¶
-
To assist developers of shared libraries - heap corruption checks are performed when allocating or freeing objects.
Scenarios caught are (1)Decrementing reference count too many times (2)Continuing to use an object after it has been freed. Enabled with the environment variable KXHEAPDEBUG, e.g. with bash shell, export KXHEAPDEBUG=1 N.B. this does have a performance impact, and hence is not recommended for use in production.
Fixes and improvements¶
-
q.k - rollback var and cor to pre-kdb+2.6 2009.10.15 definitions, as although less tolerant as it lost precision
on a list of numbers all the same, it worked for multiple dimensions. -
a negative time specified on the command line would cause kdb+ to become unresponsive, e.g. q -t -200
2010.10.07¶
New¶
-
?[condition;true expr;false expr] now works with atoms
e.g. update c:?[a=1;3;4] from `a`b!1 2 e.g. select from ([]a:1 2 3) where a>?[1b;2;1] -
-22!x provides a shortcut to count -8!x, i.e. how many bytes an uncompressed ipc message will require
Fixes and improvements¶
-
peach with file compression could cause a crash due to race condition when loading the zlib shared library.
-
report unmatched "[" in ssr function was buggy since 2010.09.02, gave false positive for ssr["abcdef";"[cd][de]";"DE"]
2010.09.18¶
Fixes and improvements¶
-
vector conditional was confused when mixing enums and syms,
e.g. f:`e`f`g`h;?[0011b;`a`b`c`d;`f$`e`f`g`h] used to return `f$`e`f`` and now returns `e`f`c`d which, if needed, can be re-enumerated with `f$ or `f? -
load libz.so.1 instead of libz.so, as some systems don't have the symlnk in place
2010.09.08¶
Fixes and improvements¶
-
file/socket descriptors were being inherited by child processes (e.g. via system"...") - present since initial version of kdb+.
This meant file descriptors in use by a terminated parent process at the time of creating the child process would remain in existence until the child process terminated.
2010.09.07¶
Fixes and improvements¶
-
-9-8!sums was reporting 'badMsg
-
file compression could potentially not detect a bad read from the input source.
2010.09.02¶
New¶
-
Add extra validation checks for compressed files.
-
File compression is now compatible with the AHA367-PCIe GZIP Compression/Decompression Accelerator card (see http://aha.com).
This card and drivers are a slot-in compatible replacement for the zlib libraries for software compression.
Fixes and improvements¶
-
report unmatched "[" in ssr function, e.g. ssr["ab[d";"[";"c"] will throw 'unmatched [.
n.b. to replace "[" with ssr use "[[]", e.g. ssr["ab[d";"[[]";"c"] -
func each prior on some mixed lists was crashing, e.g. prev(0f;1), deltas(0f;1), (+':)(0f;1). since 2.7 2010.05.18
2010.08.23¶
Fixes and improvements¶
-
multithreaded hdb using compressed files could crash when accessing the files.
-
-0n and -0N now parse as nulls.
-
erroneously tried to parse incorrect timestamp format (expects colons not dots) e.g. 2010.01.01D01.01.001000000
New¶
- allow compare of times and timespans, e.g. (<;>;<=;>=;<>;=).\:12:31,2010.04.12D12:30
2010.08.19¶
Fixes and improvements¶
-
interning more than approx 85 million symbols on 64bit version would cause an erroneous wsful. Note that if you have more than about
50000 interned symbols then your schema is almost certainly storing unique strings which are better stored as char vectors. Use .Q.w[] to observe symbol internalization stats. -
.Q.w[] (and hence \w 0) was reporting compressed file memory usage as mapped rather than as used/heap.
-
-21!x was returning long types for `algorithm and `logicalBlockSize values. Changed to int types to be consistent with -19!x.
-
vectors backed by compressed files could not be passed reliably into peach as a param.
-
could fail to map a compressed file if OS low on memory; added call to garbage collect and then retry the map.
-
wsful check was failing and causing crash for unix 32bit versions when >4GB was requested, e.g. 1000000000#1
-
increased the limit on number of open files from 1024 to 4096.
2010.08.10¶
Fixes and improvements¶
-
allow dots in dir name for logging, e.g. q us.sales.equity/a -l
-
if .z.pi was returning anything other than a char vector it could print garbage; e.g. .z.pi:{0N!value x}
2010.08.05¶
INITIAL 2.7 PRODUCTION RELEASE
New¶
- .Q.gc[] now maps to -20! for garbage collect
Fixes and improvements¶
- "Z"$"23-OCT-09" was returning 0Nz, due to the upper case T.
2010.07.27¶
New¶
-
added file compression for windows.
-
removed verify check during file compression. To verify, do get[`:compressedFile]~get`:uncompressedFile
-
allow compressing of an already compressed file (n.b. output file must still be different to input file)).
-
file compression enabled for PLAY mode.
Fixes and improvements¶
-
increased upper logicalBlockSize limit for file compression to 1MB (i.e. 2 xexp 20), and also
checks that the min logicalBlockSize is at least the cpu pageSize.
2010.07.23¶
Fixes and improvements¶
-
hopen (or khp/khpu from c) could fail if 0 was the socket descriptor allocated.
-
file decompression using algorithm 1 was leaking memory.
-
processing incoming aync msgs whilst awaiting a sync response was causing .z.w/.z.u to lose context
e.g. (hopen`::5000)"(neg .z.w)\"(neg .z.w)`\""; .z.u
2010.07.21¶
Fixes and improvements¶
-
ignore case when reading http headers, e.g. Content-Length vs Content-length
-
malformed messages are now passed to .z.bm callback as single arg (handle;bytes) as a debug aid, no longer printed to stdout.
2010.07.16¶
Fixes and improvements¶
-
Malformed ipc message error changed from 'bad to 'badmsg.
-
saving data to a file where the data was sourced from a compressed file was sometimes throwing 'bad access
e.g. `:file set get `:compressedFile -
importing data from non-native endian system via -17!`:filename was crashing for vectors with attributes.
New¶
-
-9!x also checks for malformed data structures in uncompressed messages.
-
Malformed ipc messages received over the wire will print up to 2000 bytes of the message to stdout.
2010.07.14¶
Fixes and improvements¶
- File decompression was causing crash, started with release 2010.07.09
2010.07.13¶
Fixes and improvements¶
- msg validator was blocking error response and `g#data
2010.07.11¶
New¶
-
uncompressed ipc messages are now more thoroughly checked for malformed data structures,
and if found throw a 'bad error and disconnect the socket it was received on.
2010.07.09¶
Fixes and improvements¶
-
file compression -
checks that target file is a different name to the source file. throws 'compressed if source file is already compressed. -
allow deeper nesting of (), limit was 15, now it is 100. e.g. value raze 100#'"()"
-
enum compare was erroneously matching null, e.g. u:enlist`x;select from([]b:`s#`u$``x) where b in `x
-
appending a different nested type to a nested type was crashing; now it throws 'type
e.g. .[`:test/;();,;([]a:(1 2;3 4))];.[`:test/;();,;([]a:(`a`b;`c`d))];get`:test/
New¶
-
Memory allocator defers giving memory back to OS until explicitly invoked with -20!0
-
compressed file info can be accessed with -21!`:filename
2010.06.10¶
Fixes and improvements¶
- 1 0n except 0n was not removing the null (since 2009.09.15, root cause was 0n in 0n failing as in does not use comparison tolerance).
2010.06.08¶
Fixes and improvements¶
-
thread lambda select had problems seeing thread locals and params inside mainthread lambda with parallel select, e.g.
`:test/1/t/`:test/2/t/ set\:([]a:1 2); system "l test";{[d]select a from t where a in exec from {select a from t}[d]}[]; broke in 2.6 2009.08.20 (thread lambda inside parallel lambda)
2010.06.02¶
Fixes and improvements¶
-
msum extended to work with dictionaries, e.g. 3 msum til[6]!1 2 3 5 7 11
-
?[10b;([]1 2);([]3 4)] throws 'nyi not 'type
-
'core renamed to 'cores to avoid confusion with a core dump message. 'cores signifies that the number of licensed cores has been exceeded.
-
Connecting to an unresponsive socket threw different errors depending whether a timeout is used.
-
e.g. hopen[`:127.0.0.1:9999] 'conn: Connection refused
-
record#keyedtable was crashing. e.g. r:(flip(enlist`id)!enlist())!();r(enlist `id)#r
-
@[([]1 2);::;0#] was crashing
-
partial mapping of uncompressed files (e.g. via .Q.fs) was using incorrect offsets in the file, since first release of 2.7t.
2010.05.18¶
Fixes and improvements¶
-
(NUC) changed compression format to reduce disk seeks
-
deltas(1 2 3;4 5 6) was throwing 'length
2010.05.17¶
Fixes and improvements¶
-
loading a `s#enum without the enum target was throwing g0 error
-
-17!x where x was non-native endian `p#sym enum was crashing
-
on windows sometimes the requested port to listen on/connect to was erroneously interpreted
-
file compression disabled in PLAY version - now throws 'play
-
seg fault backtrace under osx was stuck in an endless loop
-
min on a sorted list was not ignoring nulls, e.g. min asc 0n 1
2010.05.11¶
Fixes and improvements¶
-
improved backtrace info should a segfault occur.
-
upsert on a keyed table with dicts as values was failing if a new key element was added (since 2009.08.07 release)
-
e.g. t:([a:`a`b]v:(`n`m!(`a;1 2 3);`a`b`c!(1;2;`a)));r:([a:enlist`x]v:enlist enlist[`a]!enlist 1 2);t,:r
-
-9!x was failing with 'length error if x was serialised on a non-native endian system.
e.g. (x:-8!1 on sparc, then -9!x on intel) -9!0x000000000000000dfa00000001 -
IPC deserialization of data compressed on non-native endian system was crashing.
i.e. sparc systems communicating with intel systems via ipc with messages large enough to activate compression (>2000 bytes) would cause crash during deserialization. -
zlib was being loaded even if decompression did not use it
2010.05.04¶
Fixes and improvements¶
-
\w 0 was not reporting correct usage of internalized symbols (since 2010.04.30)
-
compressing a file was leaking memory
-
file compression can now use the same compression algorithm as used in IPC, specify algorithm as 1,level is ignored, e.g
`:test set 10000000?10;-19!(`:test;`:ctest;17;1;0);get[`:test]~get`:ctest -
Moved zlib library dependency to run-time, i.e. if not using zlib compression it doesn't try to load zlib library.
2010.04.30¶
New¶
-
enhanced internalization of symbols to reduce latency spikes during insertion. This won't be noticeable to users who have a sensible schema,
but those who have millions of unique symbols in a process will find that the peak cost per insertion has been reduced. e.g. {s:.z.p;`$x;t,:.z.p-s;}each string til 20000000;max t
2010.04.28¶
New¶
-
file compression (linux,osx,solaris)
reads compressed and uncompressed files generate compressed files with -19!(`:infile;`:outfile;blockSize;algorithim;level) sets the logical block size to 2 xexp blockSize, the larger the blocksize the more efficient sequential access, but slower sparse/random access. currently algorithm must be 2 (gzip) and respective levels valid from 0 to 9. e.g. using gzip, level 6, 128kB block size `:test set 10000000?100;-19!(`:test;`:ctest;17;2;6);get[`:test]~get`:ctest append to compressed file not yet supported for compression, best performance will be when infile and outfile reside on different disks Note new library dependency - zlib is available from http://www.zlib.net or via your distributions package manager, e.g. yum install zlib