Skip to content
Prev Previous commit
Next Next commit
fix: Refactor string_fields assignment to filter features by dtype an…
…d requested features

Signed-off-by: Yassin Nouh <70436855+YassinNouh21@users.noreply.github.com>
  • Loading branch information
YassinNouh21 committed Apr 9, 2025
commit e1f0cae70ed7248d7ec947805493ae54210ceec6
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,13 @@ def retrieve_online_documents_v2(

distance_metric_sql = SUPPORTED_DISTANCE_METRICS_DICT[distance_metric]

string_fields = []
string_fields = [
feature.name
for feature in table.features
if feature.dtype.to_value_type().value == 2
and feature.name in requested_features
]

for feature in table.features:
if (
feature.dtype.to_value_type().value == 2
Expand Down