revision to support code addition in fptree_query [ci skip]