public function getImportResults(ImportEntity $entity, array $columns) : QueryInterface
    {
        $sortCol = Hash::get($this->request->getQueryParams(), 'order.0.column', 0);
        $sortCol = array_key_exists($sortCol, $columns) ? $columns[$sortCol] : current($columns);

        $sortDir = Hash::get($this->request->getQueryParams(), 'order.0.dir', 'asc');
        if (!in_array($sortDir, ['asc', 'desc'])) {
            $sortDir = 'asc';
        }

        $table = TableRegistry::get('CsvMigrations.ImportResults');

        $query = $table->find('all')
            ->where([$table->aliasField('import_id') => $entity->id])
            ->order([$table->aliasField($sortCol) => $sortDir]);

        return $query;
    }