From 287f3fb3d897f15a30dcbcaa4f75c968b4432635 Mon Sep 17 00:00:00 2001 From: ksrinath Date: Fri, 26 Apr 2024 13:14:09 +0530 Subject: [PATCH 1/2] fix(backend): do not lower-case dataset key parts i.e. data platform instance --- .../com/linkedin/metadata/search/utils/BrowsePathV2Utils.java | 3 +-- 1 file changed, 1 insertion(+), 2 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)); } From 835f1db6b0fcab57bf951fb172d8707d77c70c80 Mon Sep 17 00:00:00 2001 From: ksrinath Date: Fri, 26 Apr 2024 23:59:40 +0530 Subject: [PATCH 2/2] testcase fix --- .../linkedin/metadata/search/utils/BrowsePathV2UtilsTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);