Skip to content

Commit

Permalink
fix column order
Browse files Browse the repository at this point in the history
  • Loading branch information
nablaone committed May 10, 2024
1 parent f1b18a0 commit d575514
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion quesma/clickhouse/quesma_communicator.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ func (lm *LogManager) GetAllColumns(table *Table, query *model.Query) []string {
// we have to extract again different parts like where clause and columns to build a proper result
func (lm *LogManager) ProcessQuery(ctx context.Context, table *Table, query *model.Query, columns []string) ([]model.QueryResultRow, error) {
colNames, err := table.extractColumns(query, false)

rowToScan := make([]interface{}, len(colNames)+len(query.NonSchemaFields))
if err != nil {
return nil, err
}

rows, err := executeQuery(ctx, lm, table.Name, query.StringFromColumns(colNames), columns, rowToScan)
rows, err := executeQuery(ctx, lm, table.Name, query.StringFromColumns(colNames), colNames, rowToScan)
if err == nil {
for _, row := range rows {
row.Index = table.Name
Expand Down

0 comments on commit d575514

Please sign in to comment.