constant introduced

This commit is contained in:
VaclavT 2021-08-16 14:53:23 +02:00
parent 3a55007c5b
commit 273ab66da9
3 changed files with 4 additions and 2 deletions

View File

@ -329,7 +329,7 @@ namespace usql {
m_lexer.skipToken(TokenType::keyword_by);
do {
int col_index = -1;
int col_index = FUNCTION_CALL;
bool asc = true;
auto token_type = m_lexer.tokenType();

View File

@ -8,6 +8,8 @@
#include <string>
#include <vector>
static const int FUNCTION_CALL = -1;
namespace usql {
enum class ColumnType {

View File

@ -199,7 +199,7 @@ std::unique_ptr<Table> USql::execute_select(SelectFromTableNode &node) {
for (auto idx = 0; idx < result->columns_count(); idx++) {
auto row_col_index = source_table_col_index[idx];
if (row_col_index == -1) { // TODO introduce constant here
if (row_col_index == FUNCTION_CALL) {
auto evaluated_value = eval_value_node(table, *row, node.cols_names->operator[](idx).value.get());
ValueNode *col_value = evaluated_value.get();