This is an automated email from the ASF dual-hosted git repository.

hanahmily pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git


The following commit(s) were added to refs/heads/main by this push:
     new a4e45a7a Add trace related QL test cases (#811)
a4e45a7a is described below

commit a4e45a7a6700360a0b153a6374546fdebf3b16c7
Author: mrproliu <[email protected]>
AuthorDate: Fri Oct 17 15:17:11 2025 +0800

    Add trace related QL test cases (#811)
---
 .../data/input/eq_endpoint_order_duration_asc.ql   | 22 +++++++++++++++++++++
 .../input/eq_service_instance_order_time_asc.ql    | 22 +++++++++++++++++++++
 .../data/input/eq_service_order_timestamp_desc.ql  | 22 +++++++++++++++++++++
 test/cases/trace/data/input/eq_trace_id.ql         | 21 ++++++++++++++++++++
 .../data/input/eq_trace_id_and_service_unknown.ql  | 21 ++++++++++++++++++++
 test/cases/trace/data/input/having_query_tag.ql    | 22 +++++++++++++++++++++
 .../trace/data/input/having_query_tag_cond.ql      | 22 +++++++++++++++++++++
 test/cases/trace/data/input/in_empty_span_ids.ql   | 22 +++++++++++++++++++++
 test/cases/trace/data/input/in_trace_ids.ql        | 21 ++++++++++++++++++++
 test/cases/trace/data/input/multi_group_new_tag.ql | 21 ++++++++++++++++++++
 .../trace/data/input/multi_group_sort_duration.ql  | 23 ++++++++++++++++++++++
 .../cases/trace/data/input/multi_group_tag_type.ql | 21 ++++++++++++++++++++
 .../trace/data/input/multi_group_unchanged.ql      | 21 ++++++++++++++++++++
 test/cases/trace/data/input/order_duration_desc.ql | 21 ++++++++++++++++++++
 .../cases/trace/data/input/order_timestamp_desc.ql | 21 ++++++++++++++++++++
 .../trace/data/input/order_timestamp_desc_limit.ql | 22 +++++++++++++++++++++
 16 files changed, 345 insertions(+)

diff --git a/test/cases/trace/data/input/eq_endpoint_order_duration_asc.ql 
b/test/cases/trace/data/input/eq_endpoint_order_duration_asc.ql
new file mode 100644
index 00000000..2c2b2066
--- /dev/null
+++ b/test/cases/trace/data/input/eq_endpoint_order_duration_asc.ql
@@ -0,0 +1,22 @@
+# 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 () FROM TRACE sw IN test-trace-group
+TIME > '-15m'
+WHERE endpoint_id = '/item_endpoint'
+ORDER BY duration ASC
diff --git a/test/cases/trace/data/input/eq_service_instance_order_time_asc.ql 
b/test/cases/trace/data/input/eq_service_instance_order_time_asc.ql
new file mode 100644
index 00000000..af91c5f3
--- /dev/null
+++ b/test/cases/trace/data/input/eq_service_instance_order_time_asc.ql
@@ -0,0 +1,22 @@
+# 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 () FROM TRACE sw IN test-trace-group
+TIME > '-15m'
+WHERE service_instance_id = 'webapp_instance_1'
+ORDER BY timestamp ASC
diff --git a/test/cases/trace/data/input/eq_service_order_timestamp_desc.ql 
b/test/cases/trace/data/input/eq_service_order_timestamp_desc.ql
new file mode 100644
index 00000000..9cf1fd4a
--- /dev/null
+++ b/test/cases/trace/data/input/eq_service_order_timestamp_desc.ql
@@ -0,0 +1,22 @@
+# 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 () FROM TRACE sw IN test-trace-group
+TIME > '-15m'
+WHERE service_id = 'webapp_service'
+ORDER BY timestamp DESC
diff --git a/test/cases/trace/data/input/eq_trace_id.ql 
b/test/cases/trace/data/input/eq_trace_id.ql
new file mode 100644
index 00000000..59cf9b54
--- /dev/null
+++ b/test/cases/trace/data/input/eq_trace_id.ql
@@ -0,0 +1,21 @@
+# 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 FROM TRACE sw IN test-trace-group
+TIME > '-15m'
+WHERE trace_id = 'trace_001'
diff --git a/test/cases/trace/data/input/eq_trace_id_and_service_unknown.ql 
b/test/cases/trace/data/input/eq_trace_id_and_service_unknown.ql
new file mode 100644
index 00000000..9230816e
--- /dev/null
+++ b/test/cases/trace/data/input/eq_trace_id_and_service_unknown.ql
@@ -0,0 +1,21 @@
+# 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 FROM TRACE sw IN test-trace-group
+TIME > '-15m'
+WHERE trace_id = 'trace_001' AND service_id = 'unknown'
diff --git a/test/cases/trace/data/input/having_query_tag.ql 
b/test/cases/trace/data/input/having_query_tag.ql
new file mode 100644
index 00000000..aa377dd5
--- /dev/null
+++ b/test/cases/trace/data/input/having_query_tag.ql
@@ -0,0 +1,22 @@
+# 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, span_id, operation_name, query FROM TRACE zipkin IN 
zipkinTrace
+TIME > '-15m'
+WHERE query HAVING ('SELECT * FROM users') AND (span_id = 'span_002' AND 
operation_name = '/db/query')
+ORDER BY zipkin-timestamp DESC
diff --git a/test/cases/trace/data/input/having_query_tag_cond.ql 
b/test/cases/trace/data/input/having_query_tag_cond.ql
new file mode 100644
index 00000000..885d711e
--- /dev/null
+++ b/test/cases/trace/data/input/having_query_tag_cond.ql
@@ -0,0 +1,22 @@
+# 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, span_id, operation_name, query FROM TRACE zipkin IN 
zipkinTrace
+TIME > '-15m'
+WHERE query HAVING ('SELECT * FROM users')
+ORDER BY zipkin-timestamp DESC
diff --git a/test/cases/trace/data/input/in_empty_span_ids.ql 
b/test/cases/trace/data/input/in_empty_span_ids.ql
new file mode 100644
index 00000000..0f73b2e3
--- /dev/null
+++ b/test/cases/trace/data/input/in_empty_span_ids.ql
@@ -0,0 +1,22 @@
+# 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 FROM TRACE sw IN test-trace-group
+TIME > '-15m'
+WHERE span_id IN ()
+ORDER BY timestamp DESC
diff --git a/test/cases/trace/data/input/in_trace_ids.ql 
b/test/cases/trace/data/input/in_trace_ids.ql
new file mode 100644
index 00000000..0dfa9667
--- /dev/null
+++ b/test/cases/trace/data/input/in_trace_ids.ql
@@ -0,0 +1,21 @@
+# 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 FROM TRACE sw IN test-trace-group
+TIME > '-15m'
+WHERE trace_id IN ('trace_001', 'trace_002', 'trace_003')
diff --git a/test/cases/trace/data/input/multi_group_new_tag.ql 
b/test/cases/trace/data/input/multi_group_new_tag.ql
new file mode 100644
index 00000000..b084b435
--- /dev/null
+++ b/test/cases/trace/data/input/multi_group_new_tag.ql
@@ -0,0 +1,21 @@
+# 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, service_id, error_message FROM TRACE sw IN test-trace-group, 
test-trace-updated
+TIME > '-15m'
+WHERE trace_id IN ('trace_001', 'trace_002', 'trace_009', 'trace_010')
diff --git a/test/cases/trace/data/input/multi_group_sort_duration.ql 
b/test/cases/trace/data/input/multi_group_sort_duration.ql
new file mode 100644
index 00000000..3560afc1
--- /dev/null
+++ b/test/cases/trace/data/input/multi_group_sort_duration.ql
@@ -0,0 +1,23 @@
+# 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 FROM TRACE sw IN test-trace-group, test-trace-updated
+TIME > '-15m'
+WHERE duration >= 500
+ORDER BY duration DESC
+LIMIT 3
diff --git a/test/cases/trace/data/input/multi_group_tag_type.ql 
b/test/cases/trace/data/input/multi_group_tag_type.ql
new file mode 100644
index 00000000..201546a9
--- /dev/null
+++ b/test/cases/trace/data/input/multi_group_tag_type.ql
@@ -0,0 +1,21 @@
+# 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, service_id, state FROM TRACE sw IN test-trace-group, 
test-trace-updated
+TIME > '-15m'
+WHERE trace_id IN ('trace_001', 'trace_002', 'trace_009', 'trace_010')
diff --git a/test/cases/trace/data/input/multi_group_unchanged.ql 
b/test/cases/trace/data/input/multi_group_unchanged.ql
new file mode 100644
index 00000000..858d1bbb
--- /dev/null
+++ b/test/cases/trace/data/input/multi_group_unchanged.ql
@@ -0,0 +1,21 @@
+# 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, service_id FROM TRACE sw IN test-trace-group, 
test-trace-updated
+TIME > '-15m'
+WHERE trace_id IN ('trace_001', 'trace_002', 'trace_009', 'trace_010')
diff --git a/test/cases/trace/data/input/order_duration_desc.ql 
b/test/cases/trace/data/input/order_duration_desc.ql
new file mode 100644
index 00000000..978134d9
--- /dev/null
+++ b/test/cases/trace/data/input/order_duration_desc.ql
@@ -0,0 +1,21 @@
+# 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 () FROM TRACE sw IN test-trace-group
+TIME > '-15m'
+ORDER BY duration DESC
diff --git a/test/cases/trace/data/input/order_timestamp_desc.ql 
b/test/cases/trace/data/input/order_timestamp_desc.ql
new file mode 100644
index 00000000..30ee2a6e
--- /dev/null
+++ b/test/cases/trace/data/input/order_timestamp_desc.ql
@@ -0,0 +1,21 @@
+# 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 () FROM TRACE sw IN test-trace-group
+TIME > '-15m'
+ORDER BY timestamp DESC
diff --git a/test/cases/trace/data/input/order_timestamp_desc_limit.ql 
b/test/cases/trace/data/input/order_timestamp_desc_limit.ql
new file mode 100644
index 00000000..4562d881
--- /dev/null
+++ b/test/cases/trace/data/input/order_timestamp_desc_limit.ql
@@ -0,0 +1,22 @@
+# 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 () FROM TRACE sw IN test-trace-group
+TIME > '-15m'
+ORDER BY timestamp DESC
+LIMIT 2

Reply via email to