/**
  * {@inheritdoc}
  */
 public function getMaxThreadPerThread(CommentInterface $comment)
 {
     $query = $this->database->select('comment_field_data', 'c')->condition('entity_id', $comment->getCommentedEntityId())->condition('field_name', $comment->getFieldName())->condition('entity_type', $comment->getCommentedEntityTypeId())->condition('thread', $comment->getParentComment()->getThread() . '.%', 'LIKE')->condition('default_langcode', 1);
     $query->addExpression('MAX(thread)', 'thread');
     return $query->execute()->fetchField();
 }