File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ void SendDocumentAdd(DocumentAddOptions const& opt) {
125125 document_value1.set_field_type (dingodb::pb::common::ScalarFieldType::DATETIME);
126126 auto now = std::chrono::system_clock::now ();
127127 std::string time_str = ToRFC3339 (now);
128- document_value1.mutable_field_value ()->set_string_data (time_str);
128+ document_value1.mutable_field_value ()->set_datetime_data (time_str);
129129 std::cout << " doc_id: " << opt.document_id << " ,time_str:" << time_str << std::endl;
130130 (*document_data)[" col5" ] = document_value1;
131131 }
Original file line number Diff line number Diff line change @@ -265,7 +265,7 @@ butil::Status DocumentIndex::Add(const std::vector<pb::common::DocumentWithId>&
265265 break ;
266266 case pb::common::ScalarFieldType::DATETIME:
267267 date_column_names.push_back (field_name);
268- date_column_docs.push_back (document_value.field_value ().string_data ());
268+ date_column_docs.push_back (document_value.field_value ().datetime_data ());
269269 break ;
270270 case pb::common::ScalarFieldType::BOOL:
271271 bool_column_names.push_back (field_name);
You can’t perform that action at this time.
0 commit comments