if(!empty($this->author)){
$sql = new Expression("(SELECT name FROM book_authors WHERE id = product_book.book_id)");
$row = (new Query())
->from('product_book')
->where('product_book.product_id=products.id')
->andWhere(['product_book.book_name' => 'book_authors'])
->andFilterWhere(['in', $sql, $this->author]);
$query->andFilterWhere(['exists', $row]);
}