protected function getRightFieldValue($rightField, $comparison): array
    {
        if ($comparison == 'in' || $comparison == 'not in') {
            $rightField = '(' . implode(', ', $this->quoter->quoteArray((array)$rightField)) . ')';
        } elseif ($comparison == 'greatest' ||
            $comparison == 'least' ||
            $comparison == 'coalesce' ||
            $comparison == 'interval' ||
            $comparison === 'strcmp') {
            $comparison = '= ' . $comparison;
            $rightField = '(' . implode(', ', $this->quoter->quoteArray((array)$rightField)) . ')';
        } elseif ($comparison === '=' && $rightField === null) {
            $comparison = 'IS';
            $rightField = $this->quoter->quoteValue($rightField);
        } elseif (($comparison === '<>' || $comparison === '!=') && $rightField === null) {
            $comparison = 'IS NOT';
            $rightField = $this->quoter->quoteValue($rightField);
        } elseif ($comparison === 'between' || $comparison === 'not between') {
            $between1 = $this->quoter->quoteValue($rightField[0]);
            $between2 = $this->quoter->quoteValue($rightField[1]);
            $rightField = sprintf('%s AND %s', $between1, $between2);
        } elseif ($rightField instanceof RawExp) {
            $rightField = $rightField->getValue();
        } else {
            $rightField = $this->quoter->quoteValue($rightField);
        }

        return [$rightField, strtoupper($comparison)];
    }