kdb+ 3.2 Release Notes¶
This page details the latest features and improvements released to kdb+ 3.2.
2016.12.22¶
Fixes and improvements¶
-
select with a group by sorted time was returning badly formed result (with potential crash) if it was not the only grouped column. e.g.
q)([minute:`p#00:00 01:00;s:`a`b];p:3 4f)~select p:first p by time.minute,s from([]time:`s#0 1 1t;s:`a`b`b;p:3 4 5f) -
.Q.gc[] leaked 16 bytes on each invocation when slave threads are in use.
q).Q.gc[];0N!.Q.w[]`used;do[100;.Q.gc[]];0N!.Q.w[]`used; -
bin was not matching 0n at offset 0, since 3.2 2014.07.19. e.g.
q)0 1 2 3~0n 1 2 3 bin 0n 1 2 3 -
Fixed width parsing using 0: and 1: were not ignoring double quotes inside symbol fields, since 3.3 2015.06.09. e.g.
q)(3#`hello;3#`$"wor\"ld")~("SS";6 6)0:3#enlist"hello wor\"ld"
2016.03.09¶
Fixes and improvements¶
-
`g attr data could be incorrect from appending an object with a g attr to an empty `g#(), leaking memory. e.g.
q)do[1000;a:`g#100000#`a`b;b:`g#();b,:a;delete a,b from`.] / leaked memory q)a:`g#();b:`g#99#til 3;a,:b;delete a,b from`.;3 4 5~distinct `g#99#3+til 3 / incorrect index data -
`g attr data was not updated for lists when a single element was amended, now drops g attr. e.g.
q)~/[distinct each(`#;::)@'2#enlist@[`g#(1 2;3 4;1 2);1;:;5 6]] -
Update from dict could crash instead of throwing mismatch. e.g.
q)update a:@[a;`d;:;`e]from(enlist`a)!enlist(enlist`b)!enlist`c
2016.02.02¶
Fixes and improvements¶
-
Saving mappable data could have stored an incorrect ref count in the header,
causing a memory leak later when reading, since 2016.01.27. Ref counts can be checked with q){$[(0xfe<>x 0)|" ">(x:read1 x)1;0b;any x$[" "=x 1;4;4+8 xbar 5+x?0x00]+til 4]}`:filename If this returns 1b, you should use this release to load and re-save your file.
2016.01.27¶
Fixes and improvements¶
-
continously throwing 'close for http posts where multiple reads were necessary and connection was closed by client before all content received.
-
bin with lhs of table with `g#() could cause a crash, since 3.2. e.g.
q)n:1000000;([]`g#();0)bin([]n?`3;n#0) -
writing the same object to multiple files concurrently could cause a crash; e.g.
q){[x;y](hsym`$string y)set x}[0 1]peach til 100; -
.z.w was sometimes incorrect for slave threads inside peach, affecting access control. e.g.
q)hopen[5001]"{.z.w}peach 0 1"
2015.12.02¶
Fixes and improvements¶
-
directory listings were not sorted on windows; this could stop splayed tables loading on some filesystems.
-
was crashing when sym interning space exhausted (approx. 1.4 billion), now exits with error "too many syms".
-
16 vs j was corrupting memory for j > 2 billion, since v3.0. e.g.
q)16 vs 9223372036854775807;.Q.gc[] / gc can help trigger a crash on a corrupted heap -
on disk sort, and -23!x could crash for compressed enums. e.g.
q).z.zd:17 1 0;`:x set `sym!2129916#0i;-23!get`:x;hdel`:x;1b
2015.09.25¶
Fixes and improvements¶
-
check length in received ipc header is not negative. Was causing wsfull, now throws 'parse.
-
revert pj to fill with 0i to avoid inconsistent cast to J for I+I. e.g.
q)([s:`a`b]n:1 2i)pj([s:`a`b]n:3 4i) -
dangling dependencies could cause a crash. e.g.
q)`:a set 0#` q)b::c.d q)\l a q)c.d:1 / crash -
self-referencing views could crash if the view was invalidated during eval. e.g.
q)t::t+b:1 -
Reloading of password file (via \U) could cause a crash.
-
q.k - .j.k now skips {}[] in json strings. e.g.
q)(`a`b!(1f;"aa}aa"))~.j.k .j.j `a`b!(1;"aa}aa")
2015.05.27¶
Fixes and improvements¶
-
select now checks that the length of used columns in a splay are of the same length. Previously it could crash. e.g.
q)`:t/ set([]a:500#0;b:0);`:t/b set asc 5000#0 1i;select from `:t/ where b=max b -
x div T was crashing. Now throws 'type. e.g.
q)0 div ([]0 1)
2015.05.22¶
Fixes and improvements¶
-
kdb+ could crash after a mismatch error. e.g.
q)([a:`p#1 2 3]c:3 4 5),([a:`p#4 5 6]d:3 4 5) -
parsing as minutes could crash if the minutes were partial. e.g.
q)h:hopen`:file.txt;h(4091#"a"),",23:3";hclose h;("*U";",")0:`:file.txt
2015.05.18¶
Fixes and improvements¶
-
Added svar to .Q.res.
-
Casting floats to booleans was incorrectly rounding -.5<x<.5 to 0b. This affects 'any'.e.g.
q)1110111b~"b"$-1 -.5 -.4 0 .4 .5 1 -
appending to files with type 0 was rewriting whole file since 3.0 2011.11.25.
q)`:a set (`a;0);`:a upsert (`b;1)
2015.04.23¶
Fixes and improvements¶
-
Some binary ops were incorrect when both args were keyed tables, since 2015.03.04. e.g.
q)([s:`a`b]n:1 2)=([s:`b`a]n:10 20)
2015.04.07¶
New¶
- distributed each now reverts to each if .z.pd is not defined.
Fixes and improvements¶
-
kdb+ could stall at 0% cpu or crash when decompressing files if very low on memory.
-
sorting a vector of longs which had both 0N and 0W did not sort. e.g.
q)(`s#0N 0 1 0W)~asc 0N 1 0 0W -
.Q.fsn no longer requires a \n as last char in file. e.g.
q).Q.fsn[::;`test.txt 1:"test\nnewlines";10]
2015.03.24¶
Fixes and improvements¶
-
raze was broken for lists which contained empty tables, since 3.2 2015.02.10. e.g.
q)~/[(raze;{x,y}/)@\:(();([]a:0#0);())] -
distinct, group and by with type H were performing significantly more poorly than long,int,byte. e.g.
q)n:10000000;t:([]a:n?100;b:n?5h;c:n?5h);system"ts do[10;select sum a by b,c from t]"
2015.03.21¶
Fixes and improvements¶
-
update was sensitive to column order for scalar extention, since 2015.03.19. e.g.
q)([]`a`a;0)~update x:`a,x1 from([]``;0)
2015.03.19¶
Fixes and improvements¶
-
i#/:T was throwing type since 3.2 2015.03.04. e.g.
q)1#/:([a:1 2]b:3 4) -
if an update threw an error, sometimes this could cause a crash. e.g.
q)@[value;"update raze a from([]a:enlist enlist[`a]!enlist 0)";{"type"~x}]
2015.03.05¶
(windows only)
New¶
- okx function exported to c-api for windows builds.
2015.03.04¶
Fixes and improvements¶
-
var dev cov cor were throwing 'rank if passed () or an atom.
q)(0f;0f;0n;0f;();();();())~(dev 1;var 1;cor[1;1];cov[1;1]),((dev;var)@\:()),(cov;cor).\:2#() -
update could create a keyed table of different length columns. Now throws 'length.
q)update b:2 3 4 from([a:2 3]b:2 3) -
select was crashing for an optimized path when the grouped column was also selected. e.g.
q)select a by a from([]a:`p#0 1;b:0 1)where a in 0 -
select was slow for an optimized path when the column was enumerated. e.g.
q)a:`p#asc`sym?1000000?`5;c:value -10000?a;system"ts select count i by a from([]a;b:1000000#0x0)where a in c" -
S#/:T was behaving differently to (S#)each T if S referenced non-existent columns, throwing a 'length error. e.g.
q)`a`b`c#/:([]a:1 2 3;b:10 20 30) -
some binary ops on dicts were not commutative, order sensitive, or sensitive to missing keys. e.g.
q){(x+y)~y+x}[(`a`b`c!1 2 3);(`a`b`c!1 0 1.5)] q)(`a`b`c!1 2 3)*(`a`c`b!1 0 1f) q)(`a`b`c!1 2 3)*(`a`b!1 0f)
2015.02.10¶
Fixes and improvements¶
-
grouped column rename was incorrect for select .. by s:a from ([]a:`g#...) where a in b. e.g.
q)t:([]a:`a`a`b`c`d;b:til 5);f:{select count i by s:a from x where a in `a`b`c};f[update `g#a from t]~f t -
raze was throwing 'type for some lists which contained tables. e.g.
q)~/[(raze;{x,y}/)@\:("ab";([]a:til 2))] -
q.k - svar did not consider nulls. e.g.
q)(5%3)~svar 1 2 3 4 0n
2015.01.20¶
Fixes and improvements¶
-
Amending an atom could cause a crash. e.g.
q).[("aa";" ";"bbb");1 2;upper] -
select count x was incorrectly ignoring the argument to count for certain queries, since v3.1 2013.05.15. e.g.
q)([]enlist 0)~select count b where b>2 from ([]a:`p#`a`a`b`c;b:til 4)where a=`a
2015.01.14¶
Fixes and improvements¶
-
select .. by sym from t where sym in ...,time<vector could throw 'type. Also time>vector. e.g.
q)select by sym from([]sym:`p#`a`b;p:0 1;time:2#.z.T)where sym in`,time<0#.z.T
2015.01.12¶
Fixes and improvements¶
-
reverted dev,var to assume population (rather than sample, N-1, since v3.2 2014.02.07), and added sdev,svar,scov for sample set. e.g.
q)(dev;sdev)@\:1 3 9
2015.01.08¶
Fixes and improvements¶
-
select .. by fn sym from t where sym in ... (sym with p or g attr) was not invoking fn since v3.2 2014.05.03. e.g.
q)select avg v by string sym from ([]sym:`p#`aa`aa`bb`bb`cc`cc`cc`dd`dd`dd;v:til 10)where sym in `aa`cc
2015.01.05¶
Fixes and improvements¶
-
.Q.bv did not support the explicit use of a partition field in anything but the initial constraint of a select for a fabricated partition. e.g.
q)select date,time from t where data=missingDate -
Find (and hence ops that use find) was slow for some data distributions, since 2014.12.05.
q)a:`p#asc 90000?10000i;b:10000?1000i;system"t:10 a?b"
2014.12.05¶
Fixes and improvements¶
-
mapped nested find was crashing, since 2014.11.26. e.g.
q)`:f set enlist"ab";()?get`:f
2014.11.26¶
Fixes and improvements¶
-
in,bin was erroneously sensitive to sort attr with compound types. e.g.
q)(10b;10b)~([] a:0 1; b:`)in/:(([] a:0 0; b:`);([] a:`s#0 0; b:`)) -
.Q.MAP[] was erroneously removing the key from inmem keyed tables.
-
find could crash for ()?int vector. e.g.
q)()?til 99 -
min/max on an empty sorted vector was returning null. e.g.
q)all~/'[(min;max)@/:\:(`s#0#0;0#0)] -
binr was incorrect for vectors with underlying 32bit ints with equal values. e.g.
q)((0 0 1 1 2;0 1 1 2 2);(0 0 1 1 2;0 1 1 2 2))~(bin;binr).\:/:((1 3 5;1 2 3 4 5);(1 3 5i;1 2 3 4 5i))
2014.11.18¶
(updated)
Fixes and improvements¶
-
binr was incorrect for vectors with underlying 32bit ints or floats. e.g.
q)(1 1;2 2;3 3)~(bin;binr;?).\:(2013.01.01 2013.01.05 2013.01.10;2013.01.06 2013.01.06) q)(2 2;3 3;4 4)~(bin;binr;?).\:(1 2 3 5.;2#4.)
2014.11.13¶
Fixes and improvements¶
-
sending var,dev,cor and cov over ipc to older versions of kdb+ caused the remote to crash. Now serializes to compatible lambdas. e.g.
q)({dev x};{var x};{cov[x;y]};{cor[x;y]})~{-9!-8!x}each(dev;var;cov;cor) -
q.k - typo in a2 was causing dev and var to fail on segmented tables.
2014.11.01¶
Fixes and improvements¶
-
linux only - appending to a `g#vector was leaking memory and causing a crash at some point later. e.g.
q)v:`g#1 2 3;do[20000;v,:1000?100];delete v from `.;.Q.gc[];.Q.w[] -
linux only - appending to a vector was causing the heap to expand unnecessarily. e.g.
q)do[5;v:til 10;do[20;v,:v];.Q.w[]`heap]
2014.10.23¶
Fixes and improvements¶
-
File compression using the hardware compression cards from AHA was printing zlib and then erroring out, since 3.2t 2014.05.07.
-
Rollback \c default from 100 1000 to 25 80
2014.10.04¶
Fixes and improvements¶
-
catenate would cause a crash under error conditions, e.g. mismatch. Since kdb+3.2 2014.09.19.
q)t:([a:1 2 3]b:4 5 6;c:7 8 9);t1:([a:3 4]c:20 30);@[value;"t,t1";{"mismatch"~x}];-3!t;
2014.09.29¶
Fixes and improvements¶
-
.Q.MAP was failing if there was a keyed table in the default namespace, or if there were no partitions in the directory.
-
vector [bin|binr] matrix was erroneously executing as vector ? matrix since 3.0 2012.07.26. e.g.
q)(-360 124 bin(34 35;37 38))~-360 124 bin/:(34 35;37 38)
2014.09.21¶
New¶
- Badly encoded lambdas (from other vendors' ipc drivers) could cause kdb+ to crash. Now throws 'bad lambda with the supposed lambda text.
2014.09.19¶
New¶
-
Improved performance of ? and = for lists, particularly for concurrent access. e.g. with slave threads
q)c:10000000#enlist"";lu:("";"ab";"cd";"de";"efg");system"ts {x;lu?c;} peach til 4"
Fixes and improvements¶
-
In a multithreaded-query, file decompression on windows was contending for internal locks inefficiently.
-
Updating a dict where value is a vector, an existing entry changes type, and a new entry is of existing type, was crashing. e.g.
q)(`a`b!2 3),`a`c!2.3,4 -
var and dev threw 'type when passed a dict, since v3.2t 2014.01.11. e.g.
q)2.5~var `a`b`c`d`e!1 2 3 4 5
2014.09.12¶
New¶
- Pass http OPTIONS method through to .z.pm as (`OPTIONS;requestText;requestHeaderDict)
Fixes and improvements¶
-
q.k - Rollback immediate map of splayed tables with \l dir (added 2014.05.03), as this does not work well with compressed splays.
-
q.k - .Q.MAP[] now maps top level tables in hdb as well as partitioned tables.
-
Sending msgs >4GBs through a websocket was crashing.
-
Block until msg received in handle h, h[], was crashing for websockets if the remote disconnected.
2014.08.26¶
Fixes and improvements¶
-
Set DAZ (denormals-are-zero) in MXCSR register under windows.
-
Websocket upgrade response during handshake was potentially corrupted.
-
Added filenames to 'no append to q2 file format/'no append to zipped enums error msgs.
-
Allow scalar extention for optimized select by col,scalar from t. e.g.
q)select by s,date:.z.d from ([]s:`p#1#`A;t:0) where s in `A
2014.08.25¶
(updated)
Fixes and improvements¶
-
Ignore leading zeros when parsing ints/longs, also applies to literals. e.g.
q)all(5629512419115621="J"$"000000005629512419115621";419115621i="I"$"419115621") -
The optimized case for multithreaded select was throwing type for a scalar rhs arg to in. e.g.
q)select by s from([]s:`p#1#`A;t:1#0)where s in `A
2014.08.22¶
First production release of kdb+ 3.2.
Fixes and improvements¶
-
w32 only - bin search on tables when table had no `p# was erroneous. e.g.
q)all{0 1~([]sym:`a`b;date:.z.d)bin([]sym:`a`b;date:.z.d)}each til 10000 -
q.k - .j.k was writing erroneously to global .j.n making it unsuitable for peaching.
-
q.k - .Q.bv had an error for using first rather than last partition.
-
q.k - .Q.MAP now works with segmented databases.
-
q.k - save`:t.xls did not correctly encode <, > and & using XML entities. e.g.
q)t:update SymbolColumn:`$StringColumn from ([]StringColumn:("a<b";"a,b";"a>b";"a&b"));save `:t.xls -
Add more context to noamend and noupdate errors - now shows which globals were being changed. e.g. 'noupdate `. `a
-
x like "" would not match ` under some common scenarios. e.g.
q)delete s from`.;(`s?`a`)like ""
2014.08.08¶
New¶
-
enhanced websocket client to allow username:password to be specified as part of the url. e.g.
q)`:ws://username:password@127.0.0.1:5001 "GET / HTTP/1.1\r\nHost: 127.0.0.1:5001\r\n\r\n" -
q.k - .Q.bv (which builds virtual tables for partitions which lack those tables) currently takes the last found partition
per table for each missing table's prototype('empty'). .Q.bv[] continues to take last, .Q.bv with an arg other than :: will cause it to take first. It adds missing tables to .Q.pt.
Fixes and improvements¶
-
Tweaked timeout logic (\T) for windows as last release introduced a small performance hit.
-
q.k - Added res to .Q.id. .Q.id can be used to rename columns, as it removes characters that interfere with select etc,
and adds "1" to column names which clash with commands in .q namespace. -
q.k - .Q.l now binds data to vars as soon as it is loaded to help overcome this edge-case of enum dependencies
q)a:`b`a;`:db/a set a;`:db/b set ([]b:`s#`a?`a`b);delete a from `.;system"l db"
2014.07.31¶
New¶
-
allow single escape \ for \/ in char vector (to support json). e.g.
q)"S"$"he\/llo" -
json [de]serialization is now part of q.k. Previously it was separate at http://kx.com/q/e/json.k. e.g.
q){x~0N!.j.k 0N!.j.j x}`a`b!0 1f It can now be used for save(/load)`:t.json, which uses a multiple json object per file format, i.e. no encapsulating []. -
support HTTP/1.1 Transfer-Encoding: chunked responses
Fixes and improvements¶
-
Added `var`dev`cov`cor`enlist to .Q.res
-
Tweaked timeout logic (\T) for windows.
-
Improved error message for s-fail when applying `s# and underlying enum target missing. e.g.
q)myenum:`b`a;v:`myenum?`a`b;delete myenum from`.;`s#v / now throws 's-fail; missing enum target: myenum
2014.07.26¶
New¶
-
Added websocket client functionality. .z.ws must be defined before opening a websocket, e.g.
q).z.ws:{0N!x;} / print incoming msgs to console, no echo. Then open a websocket, e.g. q)r:(`$":ws://host:port")""GET / HTTP/1.1\r\nHost: host:port\r\n\r\n" If successful it will return a 2 element list of (handle;http response), e.g. (3i;"HTTP/1.1 101 Switching Protocols\r\nConnection: Upgrade\r\nUpgrade: websocket\r\nSec-WebSocket-Accept: HSmrc0sMlYUkAGmm5OPpG2HaGWk=\r\nSec-WebSocket-Extensions: permessage-deflate\r\n\r\n") and from that point on will callback via .z.ws when msgs arrive. To send msgs, use neg[handle]"text" or neg[handle]byteVector. If the protocol upgrade from http to websocket failed, it returns the 2 element list, with the handle as 0Ni, e.g. (0Ni;"HTTP/1.1 400 Bad Request\r\nContent-Type: text/html; charset=UTF-8...") The response text is returned for debug purposes only; ideally, you need only be concerned whether the handle is valid. Any other error is thrown as usual, e.g. 'www.nonexist.badcom: No route to host Should you need to use websockets over ssl, e.g. wss://host:port, consider stunnel, and open from kdb+ to that stunnel with ws://. Basic Authentication can be passed in the char vector on opening, along with any other necessary fields such as cookies etc.
Fixes and improvements¶
- .Q.qt is now more strict in determining whether the input is a table.
2014.07.19¶
Fixes and improvements¶
-
allow multiple threads to decompress the same file. Previously this would throw
'"Fatal Error - file decompression faulting from thread which did not open file" a side-effect is that .Q.w[] now reports compressed files under `mapped rather than `used. -
improve performance of short left arg to binary search.
q)v:(10000000?1000f)-500f;system"t 0 1. bin v" -
(wsum)0 was being interpreted as exit 0. Now throws 'wsum.
-
When trying to append to a nested mappable file written by v2.8 or prior, throw '"no append to q2 file format"
rather than 'type.
2014.07.01¶
Fixes and improvements¶
-
casting negative times was truncating biased towards 0 rather than -0W. e.g.
q)-00:06 -00:05 -00:05~`minute$t:neg[00:05t]+ -1 0 1 q)-00:06 -00:05 -00:05~`minute$t:neg[0D00:05]+ -1 0 1
2014.06.30¶
Fixes and improvements¶
-
F wsum B was not ignoring nulls. Also allow B wsum B. e.g.
q)1 2f~(1 0n wsum 10b;101b wsum 101b) -
improve performance of reciprocal. e.g.
q)x:10000?1f;system"t do[1000;reciprocal x]" -
where clause had erronesouly relaxed the expected type. e.g.
q)select from([]0 1)where{}
2014.06.22¶
New¶
-
improved performance of amending keyed tables where a value column has a `g attr. e.g.
q)a:50#t:([a:`u#-15000000?0]b:`g#15000000#-5000000?0); q)system each("ts {t[x]:a[x]}enlist each exec a from a";"ts {t[x]:a[x]}each exec a from a";"ts {t[x]:a[x]}select a from a")
Fixes and improvements¶
-
added optimization for for 3 col aj (actually the underlying bin)
q)n:10000000;a:([]time:`s#0p+til n;a:`g#n?`2;b:n?10;c:n?10f);b:delete d from update d:c from 10000#a; q)\ts aj[`a`b`time;b;a] q)\ts (`a`b`time#a)bin`a`b`time#b -
in very unlikely circumstances, fnd and bin could return the wrong result if the lookup table had >2 billion.
Also amending a vector with `g attr if > 2 billion elements. -
tweaked to work with xinetd/netcat with ipc protocol. Was broken since 2.8 2012.02.05
-
min on a sorted vector with nulls was leaking memory. e.g.
q)min `s#0n 1;.Q.w[]`used
2014.06.18¶
Fixes and improvements¶
-
sorting > 2 billion elements could result in a crash, or be inefficient.
-
til n, where n<0 now throws 'domain instead of 'limit. e.g.
q)til -1 -
B wsum B now throws 'nyi instead of 'wsm. e.g.
q)010b wsum 010b -
n cut partitioned table now throws 'par instead of 'limit. e.g.
q)10 cut t
2014.06.03¶
New¶
- expanded mlim (number of mapped nested files) from 251 to 32767.
Fixes and improvements¶
-
select was crashing if table field was not a table. e.g.
q)select from([]til 10), where x>5 -
Nested indexing of keyed tables was throwing 'type since 2014.03.16. e.g.
q)(([]rate:1.2 1.3);([]rate:1.2 1.3))~([month:2013.07 2013.08m]rate:1.2 1.3)([]month:(2013.07 2013.08m;2013.07 2013.08m)) -
dates outside supported literal domain (1709 thru 2290.12.31) compared with timespan could give wrong answer. e.g.
q)("d"$2921920)>2001.01.01D09:30
2014.05.09¶
Fixes and improvements¶
-
q.k added any,all to .Q.a0, which identifies builtin aggregates over partitions.
-
changed the order of writing paired files for nested columns; was f then f#, now it is f# then f.
-
websockets decompression could crash if garbage collect set to -g 1 (immediate).
-
improved ctrl-c handling under windows; was hanging if ctrl-c received during read0 0.
2014.05.08¶
Fixes and improvements¶
- websocket inflate had a bug and also did not conform to autobahn wesocket testsuite v0.6.0; it now passes all tests.
2014.05.07¶
New¶
-
Support automatic websockets compression according to http://tools.ietf.org/html/draft-ietf-hybi-permessage-compression-17
Depends on zlib shared lib at runtime, otherwise falls back to non-compressed mode. -
q.k - added dsave to make it easy to .Q.en `p#sym and save; expects sym as first col.
-
q.k - rload changed to map all singleton splayed tables; eliminates all the open,map,unmap,close overhead. e.g.
q)`:dir dsave`t`q
Fixes and improvements¶
-
setting a group attribute on a table could cause a lockup. e.g.
q)`g#([]a:2 3) -
list amend was causing a crash when passed a scalar. e.g.
q)x:1;x[;1]:1
2014.05.03¶
New¶
-
improved performance of select .. by sym from t where sym in ...,.. when sym has a `g or `p attribute.
Uses peach for both in mem and on disk tables. For single-threaded, approx 6x faster in mem, 2x faster on disk, and uses less memory - mileage will vary. Also for partitioned db's select .. by sym,.. from t where date ..,sym in ..,.. -
q.k map single splayed files.
-
appending a sorted vector to a sorted vector on disk now just appends to the file if the sort can be retained.
Previously it would rewrite the whole file - which is usual is the file has any attribute. e.g. q)`:file set `#1 2;`:file upsert`#3 4 -
exec/select by a,b now sets sort/part attr for those cols. Enhancement to that released on 2014.02.07, now multiple cols. e.g.
q)(`s#([a:`p#1 2;b:2 3]c:3 4);(`s#([a:`s#1 2]b:2 3;c:3 4)))~{(select by a,b from x;select by a from x)}asc([]a:1 2;b:2 3;c:3 4)
Fixes and improvements¶
-
aggregating partial expressions would crash across partitioned databases. e.g.
q)`:p/0/t/`:p/1/t/ set\:([]a:til 10);system"l p";select sum(a+)from t -
q.k - v2.8 lj behaviour is available as ljf.
-
relax intolerance to trailing whitespace after sec-websocket-key during opening handshake.
-
allow int vector for lhs for take and drop. e.g.
q)0N!(0 1 2;3 4;5 6 7 8;enlist 9)~0 3 5 9i _ til 10;(til 5;5+til 5)~2 0Ni#til 10 -
`g attr on list was not being retained during update, and was leaking memory when list was freed. e.g.
q)a:`g#();a,:enlist"ab";`g=attr a -
ss was entering an infinite loop when passed a vector > 2 billion and pattern > 1 char. e.g
q)s:(0Wi+32)?.Q.an;ss[s;"ab"]
2014.03.16¶
New¶
-
retain `p attr if both args to catenate have `p attr, and parted info conforms. e.g.
q)0N!`p=attr(`p#1 1 2 2),(`p#3 3 4 4);0N!`p<>attr(1 1 2 2),(`p#3 3 4 4 1 1)
Fixes and improvements¶
-
exec/select by col crashed since 2014.02.07 if an error was thrown by a built-in fn. e.g.
q)`:testdb/0/t/`:testdb/1/t/ set\:([]a:0 1);system"l testdb";select med a by a from t -
views were not showing as stale correctly with \B
-
improve performance of searching on compound key e.g. x:([]a:..)cross([]b:..)
q)n:1000000;d:.z.d;t1:([]date:d;a:n?`4;b:n?1000f;c:n?1000000);m:100000;t2:([date:d;a:m?`4];b:m?1000f;d:m?1000) q)0N!system"ts t1 lj update date:`#date from t2";system"ts t1 lj update date:`s#date from t2" -
appending to a vector which has `g attr could seg fault, since 3.2t 2014.01.11. e.g.
q)a:`g#`$();a,:`a`b`c
2014.03.04¶
New¶
-
allow some messaging threads other than main.
Handles must still be opened in the main thread. If any msgs are pending on the handle when used in a slave thread, 'pending msgs will be thrown. Sending an async msg in a slave thread will block until it is fully sent.
Fixes and improvements¶
-
add scalar extend lhs for wavg, so it is consistent with wsum.
q)((2 2 2;2)wsum\:1 2 3;(2 2 2;2)wavg\:1 2 3)
2014.02.07¶
Fixes and improvements¶
-
var and dev now use N-1 instead of N for calcs.
-
tightened up parsing of timespan - don't allow : before the D. e.g.
q)2013:08:15D17 -
block cat of splayed tables. e.g.
q)n:til 3;`:test/c/ set([]n;3);system"l test";c,'([]y:n) -
allow \ts:n expr, as a shortcut for \ts do[n;expr]
-
exec/select by col now sets sort attr for that col. e.g.
q)meta select a by b from ([]a:`a`b`c;b:1 2 3) -
match of mapped nested vectors was incorrect. e.g.
q)`:t/ set([]x:(1 2;3 4);y:(1 2;5 6));t:get`:t/;t[`x]~t`y -
0w<=0w and 0w>=0w were evaluating to 0b since initial v3.1 release.
2014.01.11¶
NUC (Not Upwardly Compatible)¶
Not backward compatible. Changes existing behavior.
-
views cannot be triggered for recalc from socket threads - throws 'threadview.
-
view loop detection is no longer performed during view creation; now is during the view recalc.
-
var dev cov cor enlist are now reserved words.
-
var dev cov no longer accept atoms, throwing 'rank.
-
cor now throws 'rank if passed atoms (used to throw 'type).
-
`g attr can be set on a vector in main thread only.
New¶
-
allow views to use their previous value as part of their recalc.
q)v::$[b;1;v+1] q)b:1;0N!v;b:0;v -
q.k - views, in addition to vars, are now also returned by default http handler.
-
improved performance of var,dev,cov,cor.
e.g. q)a:1+b:1000?2.3;n:100000;system each("t:n var a";"t:n dev a";"t:n a cov b";"t:n a cor b") -
removed limit on number of concurrent vectors which can have `g attr.
-
\c - Console width,height now defaults to 100 1000, previously was 25 80; LINES,COLUMNS environment vars override it.