diff --git a/extension/fts/src/function/query_fts_index.cpp b/extension/fts/src/function/query_fts_index.cpp index 83c2f54686e..4af6050d2e1 100644 --- a/extension/fts/src/function/query_fts_index.cpp +++ b/extension/fts/src/function/query_fts_index.cpp @@ -127,13 +127,13 @@ static common::offset_t tableFunc(TableFuncInput& data, TableFuncOutput& output) query = stringFormat("CALL drop_project_graph('PK')"); runQuery(clientContext, query); } - if (localState->numRowsOutput >= localState->result->getNumTuples()) { + if (localState->numRowsOutput >= localState->result->getTable()->getNumTuples()) { return 0; } auto resultTable = localState->result->getTable(); resultTable->scan(output.vectors, localState->numRowsOutput, 1 /* numRowsToScan */); localState->numRowsOutput++; - return 1; + return output.dataChunk.state->getSelSize(); } std::unique_ptr initLocalState( diff --git a/src/planner/plan/plan_read.cpp b/src/planner/plan/plan_read.cpp index 6c83e4333f6..aadd260e44a 100644 --- a/src/planner/plan/plan_read.cpp +++ b/src/planner/plan/plan_read.cpp @@ -146,7 +146,7 @@ void Planner::planGDSCall(const BoundReadingClause& readingClause, gdsCall->computeFactorizedSchema(); probePlan.setLastOperator(gdsCall); if (gdsCall->constPtrCast()->getInfo().func.name == "QFTS") { - auto op = plan->getLastOperator()->getChild(0)->getChild(0)->getChild(1); + auto op = plan->getLastOperator()->getChild(0); auto prop = bindData->getNodeInput()->constCast().getPropertyExpression( "df");