i store many sub records map in same top record, need remove sub records according passing keys, plan use udf implement it. when invoked java, log shows length 0. why? , how correct this? thanks!
in java =>
val ids = array(1,2,3) value.get(ids)
in lua udf =>
function remove_keys(rec, binname, rmkeys) info("value(%s) valtype(%s)", tostring(rec), type(rec)); info("value(%s) valtype(%s)", tostring(binname), type(binname)); info("value(%s) valtype(%s)", tostring(rmkeys), type(rmkeys)); info("binname(%s)", binname) info("len(%s)", tostring(#rmkeys)) ... end
try:
string binname = "binname"; list<value> rmkeys = new arraylist<value>(); rmkeys.add(value.get("key1")); client.execute(policy, key, packagename, "remove_keys", value.get(binname), value.get(rmkeys));
Comments
Post a Comment