Implement sample interpolation in query layer.