You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/02/28 13:07:44 UTC

[GitHub] [skywalking-banyandb] lujiajing1126 edited a comment on pull request #87: Add groupBy to the measure query request

lujiajing1126 edited a comment on pull request #87:
URL: https://github.com/apache/skywalking-banyandb/pull/87#issuecomment-1054237784


   > > In the current api design, as I understand, we can only have one single aggregation on a single field, SELECT AVG(field_A) FROM measure_A GROUP BY tag_A.
   > 
   > This is correct.
   > 
   > > An alternative approach would be to separate field projection as one_of,
   > 
   > I am a little confused about this `one_of`. (2) is clear, I am not sure what does (1) mean.
   
   I meant the following message,
   
   ```proto
   message FieldProjection {
       message Direct {
           string col = 1;
       }
       // EXPR(COL) AS ALIAS
       message Indirect {
           enum Expr {
               EXPR_UNSPECIFIED = 0;
               EXPR_COUNT = 1;
               EXPR_SUM = 2;
               EXPR_MIN = 3;
               EXPR_MAX = 4;
               EXPR_AVG = 5;
           }
           string col = 1;
           string alias = 2;
           Expr expr = 3;
       }
       oneof spec {
           // direct reference to the column
           Direct direct_ref = 1;
           // indirect reference with aggregation
           Indirect indirect_ref = 2;
       }
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org