stop QuerySelect from Showing filter?

Hello,
I require to select chunks of my data, by specific values of, for example IDs. following the results showed here, i am using the function that i described as extractSelectionByListOfValues_old in my second comment, as it showed to be the one that performed better.

This ‘works’, with a slight issue, if i use this inside a python function, when the function does the QuerySelect it will automatically Show my filter where i am applying it. where if i simply do the
QuerySelect by copy paste on the python console, this does not happen.

here is a simple example:

from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()
sphere1 = Sphere(registrationName='Sphere1')
UpdatePipeline(time=0.0, proxy=sphere1)

def check(filter=[]):
    filter = GetActiveSource()
    QuerySelect(QueryString='(id == 0)',FieldType='CELL',InsideOut=0)
    return ExtractSelection(Input=filter)

cell0=check(sphere1)

If i run this on the terminal (copy paste), it will create the sphere, show it select the id==0 and extract it.
now if i hide everything and do:

SetActiveSource(sphere1)
QuerySelect(QueryString='(id == 0)',FieldType='CELL',InsideOut=0)
ExtractSelection(Input=filter)

the sphere will not be shown.
is there any way to avoid this display? i would be okey with a ‘block all show signals with a function and then allow them again with another one’

is there any more intelligent easy (specially fast) way to achieve this without QuerySelect? as this is bringing me some issues (the display being created each time, and in the newer versions of paraview a bunch of warnings, which ‘polutes’ the output of the terminal)

Sounds like a bug to me, ill try when I can.

from a testing different ways, it looks like the first time we use QuerySelect on a filter it will Show() it. if we hide it and use it again on same filter it will not show it. just the first time we apply it to a filter that does not had been shown. furthemore, it looks like it requires a renderviewer. if there is non, QuerySelect will fail (and the Show would explain why it fails with an error if there is no renderviewer).

I confirm the behavior and I agree its an issue, please open it: https://gitlab.kitware.com/paraview/paraview/-/work_items

issue created

also:

is there any more intelligent easy (specially fast) way to achieve this without QuerySelect?

any inputs in this regard?