From dda138fa63163d87ff78d6e757c8bf3fdf2937b9 Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Mon, 21 Oct 2024 22:17:19 +0200 Subject: [PATCH] - --- libs/filer/workspace_files_extensions_client.go | 7 ++++++- libs/notebook/ext.go | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libs/filer/workspace_files_extensions_client.go b/libs/filer/workspace_files_extensions_client.go index 4b10bf7da..4b6c8679f 100644 --- a/libs/filer/workspace_files_extensions_client.go +++ b/libs/filer/workspace_files_extensions_client.go @@ -47,7 +47,12 @@ func (w *workspaceFilesExtensionsClient) getNotebookStatByNameWithExt(ctx contex nameWithoutExt := strings.TrimSuffix(name, string(ext)) // File name does not have an extension associated with Databricks notebooks, return early. - if _, ok := notebook.ExtensionToLanguage[ext]; !ok { + if !slices.Contains([]notebook.Extension{ + notebook.ExtensionPython, + notebook.ExtensionR, + notebook.ExtensionScala, + notebook.ExtensionSql, + notebook.ExtensionJupyter}, ext) { return nil, nil } diff --git a/libs/notebook/ext.go b/libs/notebook/ext.go index f8d5a8503..3c8274a50 100644 --- a/libs/notebook/ext.go +++ b/libs/notebook/ext.go @@ -20,7 +20,6 @@ var ExtensionToLanguage = map[Extension]workspace.Language{ ExtensionSql: workspace.LanguageSql, // The platform supports all languages (Python, R, Scala, and SQL) for Jupyter notebooks. - ExtensionJupyter: workspace.LanguageUnknown, } func GetExtensionByLanguage(objectInfo *workspace.ObjectInfo) Extension {