Refactor S3ResourceFilter to support S3ResourceQuery transformations.