Skip to content

Commit e81bee8

Browse files
committed
test: switch KNN tests to vertical output format
1 parent 5bd939d commit e81bee8

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

test/clt-tests/mcl/auto-embeddings-openai-remote.rec

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,14 @@ if [ -n "$OPENAI_API_KEY" ] && [ "$OPENAI_API_KEY" != "dummy_key_for_testing" ];
123123
––– comment –––
124124
Test KNN search with text query parameter (auto-embeddings approach)
125125
––– input –––
126-
mysql -h0 -P9306 -e "SELECT id, knn_dist() FROM test_openai_remote WHERE knn(embedding, 3, 'machine learning and artificial intelligence')"
126+
mysql -h0 -P9306 -e "SELECT id, knn_dist() FROM test_openai_remote WHERE knn(embedding, 3, 'machine learning and artificial intelligence')\G"
127127
––– output –––
128-
#!/.*id.*knn_dist().*/!#
129-
#!/.*[12].*[0-9]+\.[0-9]+.*/!#
130-
#!/.*[12].*[0-9]+\.[0-9]+.*/!#
128+
*************************** 1. row ***************************
129+
id: #!/[12]/!#
130+
knn_dist(): #!/[0-9]+\.[0-9]+/!#
131+
*************************** 2. row ***************************
132+
id: #!/[12]/!#
133+
knn_dist(): #!/[0-9]+\.[0-9]+/!#
131134
––– comment –––
132135
Test KNN search with additional filtering
133136
––– input –––

test/clt-tests/mcl/auto-embeddings-voyage-remote.rec

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,14 @@ if [ -n "$VOYAGE_API_KEY" ] && [ "$VOYAGE_API_KEY" != "dummy_key_for_testing" ];
123123
––– comment –––
124124
Test KNN search with text query parameter (auto-embeddings approach)
125125
––– input –––
126-
mysql -h0 -P9306 -e "SELECT id, knn_dist() FROM test_voyage_remote WHERE knn(embedding, 3, 'machine learning and artificial intelligence')"
126+
mysql -h0 -P9306 -e "SELECT id, knn_dist() FROM test_voyage_remote WHERE knn(embedding, 3, 'machine learning and artificial intelligence')\G"
127127
––– output –––
128-
#!/.*id.*knn_dist().*/!#
129-
#!/.*[12].*[0-9]+\.[0-9]+.*/!#
130-
#!/.*[12].*[0-9]+\.[0-9]+.*/!#
128+
*************************** 1. row ***************************
129+
id: #!/[12]/!#
130+
knn_dist(): #!/[0-9]+\.[0-9]+/!#
131+
*************************** 2. row ***************************
132+
id: #!/[12]/!#
133+
knn_dist(): #!/[0-9]+\.[0-9]+/!#
131134
––– comment –––
132135
Test KNN search with additional filtering
133136
––– input –––

0 commit comments

Comments
 (0)