lszskye commented on code in PR #372:
URL: https://github.com/apache/paimon-cpp/pull/372#discussion_r4236218919


##########
src/paimon/core/io/file_index_evaluator.cpp:
##########
@@ -147,6 +151,63 @@ Result<std::shared_ptr<InputStream>> 
FileIndexEvaluator::ExtractIndexInputStream
     return std::shared_ptr<InputStream>();
 }
 
+namespace {
+
+Result<std::vector<std::shared_ptr<FileIndexReader>>> OpenSearchReaders(
+    const std::shared_ptr<arrow::Schema>& data_schema, const std::string& 
field_name,
+    const CoreOptions& core_options, const std::shared_ptr<DataFileMeta>& 
file_meta,
+    const std::shared_ptr<InputStream>& input_stream, const 
std::shared_ptr<MemoryPool>& pool) {
+    std::shared_ptr<arrow::Field> field = 
data_schema->GetFieldByName(field_name);

Review Comment:
   Could we map the search field from the current table schema to each file’s 
schema by field ID before executing File Index Search? Currently, 
OpenSearchReaders() looks up the request’s field_name directly in the file 
schema, so renaming embedding to vec causes searches against older files to 
fail with Search field 'vec' does not exist in data schema.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to