jt2594838 commented on code in PR #745:
URL: https://github.com/apache/tsfile/pull/745#discussion_r2985528919
##########
cpp/src/reader/table_query_executor.cc:
##########
@@ -88,6 +88,73 @@ int TableQueryExecutor::query(const std::string& table_name,
return ret;
}
+int TableQueryExecutor::query(const std::string& table_name,
+ const std::vector<std::string>& columns,
+ Filter* time_filter, Filter* id_filter,
+ Filter* field_filter, int offset, int limit,
+ ResultSet*& ret_qds) {
+ int ret = common::E_OK;
+ TsFileMeta* file_metadata = nullptr;
+ file_metadata = tsfile_io_reader_->get_tsfile_meta();
+ common::PageArena pa;
+ pa.init(512, common::MOD_TSFILE_READER);
+ MetaIndexNode* table_root = nullptr;
+ std::shared_ptr<TableSchema> table_schema;
+ if (RET_FAIL(
+ file_metadata->get_table_metaindex_node(table_name, table_root))) {
+ } else if (RET_FAIL(
+ file_metadata->get_table_schema(table_name, table_schema)))
{
+ }
+
+ if (IS_FAIL(ret)) {
+ ret_qds = nullptr;
+ return ret;
+ }
+ std::vector<std::string> lower_case_column_names(columns);
+ for (auto& column : lower_case_column_names) {
+ to_lowercase_inplace(column);
+ }
+ std::shared_ptr<ColumnMapping> column_mapping =
+ std::make_shared<ColumnMapping>();
+ for (size_t i = 0; i < lower_case_column_names.size(); ++i) {
+ column_mapping->add(lower_case_column_names[i], static_cast<int>(i),
+ *table_schema);
+ }
+ std::vector<common::TSDataType> data_types;
+ data_types.reserve(lower_case_column_names.size());
+ for (size_t i = 0; i < lower_case_column_names.size(); ++i) {
+ auto ind = table_schema->find_column_index(lower_case_column_names[i]);
+ if (ind < 0) {
+ delete time_filter;
Review Comment:
Double-check this, instead of removing the delete, more deletes are even
added.
--
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]