From dff31911bb8c86d2caaf160b45920fe4196572c9 Mon Sep 17 00:00:00 2001 From: Hitesh Khandelwal Date: Wed, 12 Jun 2024 18:00:38 +0530 Subject: [PATCH] when sort is empty return null --- .../apache/atlas/model/discovery/ElasticsearchMetadata.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/intg/src/main/java/org/apache/atlas/model/discovery/ElasticsearchMetadata.java b/intg/src/main/java/org/apache/atlas/model/discovery/ElasticsearchMetadata.java index 8f6c9e9b3b..096ff82b83 100644 --- a/intg/src/main/java/org/apache/atlas/model/discovery/ElasticsearchMetadata.java +++ b/intg/src/main/java/org/apache/atlas/model/discovery/ElasticsearchMetadata.java @@ -31,7 +31,11 @@ public void addHighlights(Map> highlights) { public Object getSort() { return sort; } public void addSort(ArrayList sort) { - this.sort = sort; + if (sort.isEmpty()) { + this.sort = null; + } else { + this.sort = sort; + } } @Override