saksenasonali opened a new pull request, #773:
URL: https://github.com/apache/atlas/pull/773

   What changes were proposed in this pull request?
   Basic search can return approximateCount from the index even when additional 
in-memory filtering makes that total unreliable. This change tells clients when 
that count is exact for the query as executed.
   
   API / model
   
   Add optional approximateCountExact on AtlasSearchResult (Java + Python).
   Set approximateCountExact=true in basic search when the active processor 
reports an index-only count: Solr index query present, no graph query path, no 
classification filter, no graph predicate, and no entity attribute filters 
applied in memory (EntitySearchProcessor / EntityDiscoveryService).
   Default SearchProcessor.isApproximateCountExact() to false for other search 
paths.
   Tests
   
   EntitySearchProcessorTest: exact for type-only search; not exact for 
in-memory NEQ and STARTS_WITH filters.
   AtlasDiscoveryServiceTest: flag set for index-only basic search; omitted 
when in-memory filter applied; approximateCount increases when a matching 
entity is added.
   TestAtlasSearchResult: sets approximateCountExact in complete-result 
coverage.
   React UI
   
   Read approximateCountExact from basic search responses in SearchResult and 
pass through TableLayout → TablePagination.
   Server-side pagination footer: show ~ and (approx.) with a tooltip when the 
count is not exact; omit both when exact.
   Dev / E2E (postgres Docker)
   
   dev-support/scripts/e2e-basic-search-count.sh: live checks against 
/api/atlas/v2/search/basic (type-only vs in-memory qualifiedName filters).
   Docker: PostgreSQL JDBC in libext/ for ATLAS_BACKEND=postgres; run 
atlas_start.py -setup on first container boot; allow postgresql-*.jar in 
.dockerignore for image build.
   Validation doc: [Confluence — CDPD-40161 
validation](https://cloudera.atlassian.net/wiki/spaces/ENG/pages/12373032967/Validation+CDPD-40161+Basic+search+approximateCountExact+API+React+UI)
 (ENG / Atlas Engineering).
   
   How was this patch tested?
   Unit / integration
   
   EntitySearchProcessorTest (new + existing suite): exact vs in-memory filter 
behavior for approximateCountExact.
   AtlasDiscoveryServiceTest: basic search sets/omits the flag; approximate 
count updates after entity create.
   TestAtlasSearchResult (intg): model serialization includes 
approximateCountExact.
   Dashboard
   
   npm ci, npm run lint, npm run build / tsc on branch.
   Live API (Docker, postgres)
   
   Built atlas:latest from branch source; docker compose -f 
dev-support/atlas-docker/docker-compose.atlas.yml up with 
ATLAS_BACKEND=postgres.
   bash dev-support/scripts/e2e-basic-search-count.sh:
   Type-only hive_db → approximateCountExact=true
   hive_column with startsWith / endsWith on qualifiedName → flag not true
   UI
   
   Manual check documented in Confluence: index-only search footer without ~ / 
(approx.); filtered search with ~ and tooltip. (Automated browser check was 
skipped due to tooling timeout; API + proxied /api/atlas/v2/search/basic from 
Vite confirmed the flag.)
   Footer change is text-only (~, (approx.), tooltip). 
   
   Validation Doc: 
https://cloudera.atlassian.net/wiki/spaces/ENG/pages/12373032967/Validation+CDPD-40161+Basic+search+approximateCountExact+API+React+UI


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to