Skip to content

Commit 9834a69

Browse files
committed
1. rename varialbes in ClpQueryRunner
2. use consistent type for numRows in ClpQueryRunner 3. remove spdlog version in CMakeLists.txt and change find_package to resolve_dependency for curl 4. fix readerIndex type in ClpDataSource 5. add SMALLINT in ClpDataSource
1 parent f26ba13 commit 9834a69

4 files changed

Lines changed: 13 additions & 11 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,15 +494,16 @@ if(${VELOX_ENABLE_CLP_CONNECTOR})
494494
velox_resolve_dependency(clp)
495495

496496
set(spdlog_SOURCE BUNDLED)
497-
velox_resolve_dependency(spdlog 1.12.0)
497+
velox_resolve_dependency(spdlog)
498498

499499
velox_set_source(msgpack-cxx)
500500
velox_resolve_dependency(msgpack-cxx)
501501

502502
velox_set_source(absl)
503503
velox_resolve_dependency(absl)
504504

505-
find_package(CURL 7.68.0 REQUIRED)
505+
set(curl_SOURCE BUNDLED)
506+
velox_resolve_dependency(curl)
506507
find_package(ANTLR REQUIRED)
507508
endif()
508509

velox/connectors/clp/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ velox_add_library(
2121
ClpDataSource.cpp
2222
ClpTableHandle.cpp)
2323

24-
velox_link_libraries(velox_clp_connector PRIVATE clp-s-search velox_connector
25-
simdjson::simdjson)
24+
velox_link_libraries(velox_clp_connector
25+
PRIVATE clp-s-search simdjson::simdjson velox_connector)
2626

2727
target_compile_features(velox_clp_connector PRIVATE cxx_std_20)
2828

velox/connectors/clp/ClpDataSource.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ void ClpDataSource::addFieldsRecursively(
7979
break;
8080
case TypeKind::INTEGER:
8181
case TypeKind::BIGINT:
82+
case TypeKind::SMALLINT:
8283
case TypeKind::TINYINT:
8384
clpColumnType = search_lib::ColumnType::Integer;
8485
break;
@@ -160,7 +161,7 @@ std::optional<RowVectorPtr> ClpDataSource::next(
160161
return nullptr;
161162
}
162163
completedRows_ += rowsScanned;
163-
uint64_t readerIndex = 0;
164+
size_t readerIndex = 0;
164165
const auto& projectedColumns = cursor_->getProjectedColumns();
165166
if (projectedColumns.size() != fields_.size()) {
166167
VELOX_USER_FAIL(

velox/connectors/clp/search_lib/ClpQueryRunner.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ void ClpQueryRunner::init(
3838
continue;
3939
}
4040

41-
// Try to find a matching column in m_column_map
41+
// Try to find a matching column in columnMap
4242
bool foundReader = false;
43-
for (const auto node_id : nodeIds) {
44-
auto column_it = columnMap.find(node_id);
45-
if (column_it != columnMap.end()) {
46-
projectedColumns_.push_back(column_it->second);
43+
for (const auto nodeId : nodeIds) {
44+
auto columnIt = columnMap.find(nodeId);
45+
if (columnIt != columnMap.end()) {
46+
projectedColumns_.push_back(columnIt->second);
4747
foundReader = true;
4848
break;
4949
}
@@ -60,7 +60,7 @@ void ClpQueryRunner::init(
6060
}
6161

6262
uint64_t ClpQueryRunner::fetchNext(
63-
size_t numRows,
63+
uint64_t numRows,
6464
const std::shared_ptr<std::vector<uint64_t>>& filteredRowIndices) {
6565
size_t rowsfiltered = 0;
6666
size_t rowsScanned = 0;

0 commit comments

Comments
 (0)