Skip to content

Commit 5c265fd

Browse files
Test sorting on float and half_float in nyc_taxis
1 parent ecf899a commit 5c265fd

File tree

3 files changed

+70
-1
lines changed

3 files changed

+70
-1
lines changed

nyc_taxis/challenges/default.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,30 @@
9696
"warmup-iterations": 50,
9797
"iterations": 100
9898
},
99+
{
100+
"operation": "desc_sort_tip_amount_float",
101+
"clients": 1,
102+
"warmup-iterations": 10,
103+
"iterations": 50
104+
},
105+
{
106+
"operation": "asc_sort_tip_amount_float",
107+
"clients": 1,
108+
"warmup-iterations": 10,
109+
"iterations": 50
110+
},
111+
{
112+
"operation": "desc_sort_tip_amount_half_float",
113+
"clients": 1,
114+
"warmup-iterations": 10,
115+
"iterations": 50
116+
},
117+
{
118+
"operation": "asc_sort_tip_amount_half_float",
119+
"clients": 1,
120+
"warmup-iterations": 10,
121+
"iterations": 50
122+
},
99123
{
100124
"operation": "distance_amount_agg",
101125
"warmup-iterations": 50,

nyc_taxis/index.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@
4343
"type": "scaled_float"
4444
},
4545
"tip_amount": {
46-
"type": "double"
46+
"type": "float",
47+
"fields": {
48+
"half_float": {
49+
"type": "half_float"
50+
}
51+
}
4752
},
4853
"payment_type": {
4954
"type": "keyword"

nyc_taxis/operations/default.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,46 @@
11661166
"body": { "pragma": { "data_partitioning": "doc" } }
11671167
},
11681168
{%- endif -%}{# non-serverless-doc-partitioning-marker-end #}
1169+
{
1170+
"name": "desc_sort_tip_amount_float",
1171+
"operation-type": "search",
1172+
"index": "nyc_taxis",
1173+
"body": {
1174+
"sort" : [
1175+
{"tip_amount" : "desc"}
1176+
]
1177+
}
1178+
},
1179+
{
1180+
"name": "asc_sort_tip_amount_float",
1181+
"operation-type": "search",
1182+
"index": "nyc_taxis",
1183+
"body": {
1184+
"sort" : [
1185+
{"tip_amount" : "asc"}
1186+
]
1187+
}
1188+
},
1189+
{
1190+
"name": "desc_sort_tip_amount_half_float",
1191+
"operation-type": "search",
1192+
"index": "nyc_taxis",
1193+
"body": {
1194+
"sort" : [
1195+
{"tip_amount.half_float" : "desc"}
1196+
]
1197+
}
1198+
},
1199+
{
1200+
"name": "asc_sort_tip_amount_half_float",
1201+
"operation-type": "search",
1202+
"index": "nyc_taxis",
1203+
"body": {
1204+
"sort" : [
1205+
{"tip_amount.half_float" : "asc"}
1206+
]
1207+
}
1208+
},
11691209
{
11701210
"name": "sort_by_ts_query",
11711211
"operation-type": "search",

0 commit comments

Comments
 (0)