protected function translateCriteria(array $filter, array &$joins)
    {
        list($column, $type) = $this->join(explode('.', $filter['column']), $joins);

        switch (true) {
            case is_array($filter['value']):
                $values = [];

                foreach ($filter['value'] as $value) {
                    $values[] = $this->adapter->getDriver()->quote($value, $type);
                }

                $comparison = ' IN (' . implode(', ', $values) . ')';
                break;

            case is_null($filter['value']):
                $comparison = ' IS NULL';
                break;

            default:
                $comparison = ' = ' . $this->adapter->getDriver()->quote($filter['value'], $type);
        }

        return $column . $comparison;
    }