The statement can be the same as before. You just have to create a new Statement instance for the 2nd query and cannot reuse the instance you passed to the execute_udf_on_query method:
Thank you, but it does not seems to work, as only the second filter is applied (udf filter is not applied).
Maybe the problem is that result of udf filter is map?
MAP('{“maker”:“…”})
The client.execute_udf_on_query() command applies a Record UDF to each record that matches the query statement filter. It is meant to update/create records as a background operation on the server. This command does not return any data. See https://www.aerospike.com/docs/guide/record_udf.html.
The second client.query() command should match the same set of records as the first command (since the same query filter is applied), and return the data to the application. There is no UDF filter applied in this command.