作者 yangfu

验证sql增加索引排序

@@ -474,6 +474,7 @@ func (tableService *TableService) ValidExprSql(ctx *domain.Context, cmd *command @@ -474,6 +474,7 @@ func (tableService *TableService) ValidExprSql(ctx *domain.Context, cmd *command
474 sql := "select " + selectValue + " as expr" 474 sql := "select " + selectValue + " as expr"
475 if len(set.KeysStr()) > 0 { 475 if len(set.KeysStr()) > 0 {
476 sql += " from " + strings.Join(set.KeysStr(), ",") 476 sql += " from " + strings.Join(set.KeysStr(), ",")
  477 + sql += " order by id "
477 sql += " limit 1" 478 sql += " limit 1"
478 } 479 }
479 //tx := starrocks.DB.Exec(sql) 480 //tx := starrocks.DB.Exec(sql)