From 4c58feb7334bf871f1023e87faa7162119e4d69c Mon Sep 17 00:00:00 2001 From: ksrinath Date: Mon, 29 Apr 2024 19:33:29 +0530 Subject: [PATCH] fix(backend): do not lower-case dataset key parts for browse paths (#10385) --- .../com/linkedin/metadata/search/utils/BrowsePathV2Utils.java | 3 +-- .../linkedin/metadata/search/utils/BrowsePathV2UtilsTest.java | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/metadata-io/src/main/java/com/linkedin/metadata/search/utils/BrowsePathV2Utils.java b/metadata-io/src/main/java/com/linkedin/metadata/search/utils/BrowsePathV2Utils.java index 293af51772f07..459afaaac263f 100644 --- a/metadata-io/src/main/java/com/linkedin/metadata/search/utils/BrowsePathV2Utils.java +++ b/metadata-io/src/main/java/com/linkedin/metadata/search/utils/BrowsePathV2Utils.java @@ -67,8 +67,7 @@ public static BrowsePathsV2 getDefaultBrowsePathV2( BrowsePathEntryArray defaultDatasetPathEntries = getDefaultDatasetPathEntries(dsKey.getName(), dataPlatformDelimiter); if (defaultDatasetPathEntries.size() > 0) { - browsePathEntries.addAll( - getDefaultDatasetPathEntries(dsKey.getName().toLowerCase(), dataPlatformDelimiter)); + browsePathEntries.addAll(defaultDatasetPathEntries); } else { browsePathEntries.add(createBrowsePathEntry(DEFAULT_FOLDER_NAME, null)); } diff --git a/metadata-io/src/test/java/com/linkedin/metadata/search/utils/BrowsePathV2UtilsTest.java b/metadata-io/src/test/java/com/linkedin/metadata/search/utils/BrowsePathV2UtilsTest.java index 3c5ecc8713e77..b95b4efb34a7e 100644 --- a/metadata-io/src/test/java/com/linkedin/metadata/search/utils/BrowsePathV2UtilsTest.java +++ b/metadata-io/src/test/java/com/linkedin/metadata/search/utils/BrowsePathV2UtilsTest.java @@ -146,8 +146,8 @@ public void testGetDefaultBrowsePathV2WithoutContainers() throws URISyntaxExcept BrowsePathV2Utils.getDefaultBrowsePathV2( mock(OperationContext.class), datasetUrn, this.registry, '.', mockService, true); BrowsePathEntryArray expectedPath = new BrowsePathEntryArray(); - BrowsePathEntry entry1 = new BrowsePathEntry().setId("test"); - BrowsePathEntry entry2 = new BrowsePathEntry().setId("a"); + BrowsePathEntry entry1 = new BrowsePathEntry().setId("Test"); + BrowsePathEntry entry2 = new BrowsePathEntry().setId("A"); expectedPath.add(entry1); expectedPath.add(entry2); Assert.assertEquals(browsePathsV2.getPath(), expectedPath);