I don’t understand why my 1.3 test is failing. Please find a copy of my code and a picture of my test results attached.
Thanks.
.f1.createLapTable:{[eventInput;sensorInput]
uniqueSensor: distinct select sensorId from sensorInput;
rack:(select from eventInput) cross uniqueSensor;
w:(rack[`time];rack[`endTime]);
f:wj[w;`date`sensorId`time;rack;(select from sensor;(avg;`sensorValue))];
f:select session, sensorId, lapId,time,endTime,sensorValue from f;
f
}
Within your window join, you are selecting from sensor instead of the sensorInput parameter you've passed into the function. This could be what is creating incorrect values in your table.