hanahmily commented on code in PR #810:
URL: 
https://github.com/apache/skywalking-banyandb/pull/810#discussion_r2439889053


##########
docs/interacting/bydbql.md:
##########
@@ -331,7 +331,10 @@ integer_literal ::= [0-9]+
     *   **`TIME > '-30m'`**: Sets `begin` to 30 minutes ago.
     *   **`TIME BETWEEN '-1h' AND 'now'`**: Sets `begin` to 1 hour ago and 
`end` to current time.
 *   **`WHERE conditions`**: Maps to `criteria`.
-*   **`ORDER BY field`**: Maps to `order_by`.
+*   **`ORDER BY` clause**: Maps to `order_by`. Supports the following forms:
+    *   **`ORDER BY field`**: Maps to `order_by` with ascending sort by 
default.
+    *   **`ORDER BY field DESC` / `ORDER BY field ASC`**: Adds an explicit 
sort direction while targeting the specified field.
+    *   **`ORDER BY DESC` / `ORDER BY ASC`**: Shorthand that omits the field 
and relies on the resource's default order key. Use this when you only need to 
flip the default ordering direction.

Review Comment:
   ```suggestion
       *   **`ORDER BY TIME DESC` / `ORDER BY TIME ASC`**: Shorthand that 
relies on the timestamps.
   ```



##########
test/cases/stream/data/input/order_desc.ql:
##########
@@ -0,0 +1,20 @@
+# Licensed to Apache Software Foundation (ASF) under one or more contributor
+# license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright
+# ownership. Apache Software Foundation (ASF) licenses this file to you under
+# the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+SELECT trace_id, duration, data_binary FROM STREAM sw IN default
+TIME > '-15m'
+ORDER BY DESC

Review Comment:
   ```suggestion
   ORDER BY TIME DESC
   ```



##########
test/cases/stream/data/input/order_asc.ql:
##########
@@ -0,0 +1,20 @@
+# Licensed to Apache Software Foundation (ASF) under one or more contributor
+# license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright
+# ownership. Apache Software Foundation (ASF) licenses this file to you under
+# the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+SELECT trace_id, duration, data_binary FROM STREAM sw IN default
+TIME > '-15m'
+ORDER BY ASC

Review Comment:
   ```suggestion
   ORDER BY TIME ASC
   ```
   
   Use `TIME` as measure did



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to