Skip to content

Commit 7d3ed62

Browse files
authored
cleanup code
1 parent 1c6cb01 commit 7d3ed62

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/wvlet_extension.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,6 @@ unique_ptr<FunctionData> WvletScriptFunction::Bind(ClientContext &context, Scala
4242
return nullptr;
4343
}
4444

45-
static std::string CleanSQL(const std::string& sql) {
46-
// Find first occurrence of "select" (case insensitive)
47-
std::string lower_sql = sql;
48-
std::transform(lower_sql.begin(), lower_sql.end(), lower_sql.begin(), ::tolower);
49-
auto pos = lower_sql.find("select");
50-
if (pos == std::string::npos) {
51-
throw std::runtime_error("No SELECT statement found in compiled SQL");
52-
}
53-
return sql.substr(pos);
54-
}
55-
5645
static unique_ptr<FunctionData> WvletBind(ClientContext &context, TableFunctionBindInput &input,
5746
vector<LogicalType> &return_types, vector<string> &names) {
5847
auto result = make_uniq<WvletBindData>();
@@ -67,13 +56,8 @@ static unique_ptr<FunctionData> WvletBind(ClientContext &context, TableFunctionB
6756
throw std::runtime_error("Failed to compile wvlet script");
6857
}
6958

70-
// Store the compiled SQL query
7159
result->query = std::string(sql_result);
7260

73-
// Set dummy type and name - will be updated during execution
74-
// return_types.push_back(LogicalType::INTEGER);
75-
// names.push_back("value");
76-
7761
// Create a temporary connection to execute the query and get the schema
7862
Connection conn(*context.db);
7963
auto result_set = conn.Query(result->query);

0 commit comments

Comments
 (0)