diff --git a/backend/zeno_backend/database/select.py b/backend/zeno_backend/database/select.py index b15830bb..70174e26 100644 --- a/backend/zeno_backend/database/select.py +++ b/backend/zeno_backend/database/select.py @@ -1004,10 +1004,13 @@ def filered_short_string_column_values( db = Database() short_ret: list[str] = [] if not req.is_regex: - if not req.whole_word_match: + if req.whole_word_match: + req.filter_string = f"% {req.filter_string} %" + else: req.filter_string = f"%{req.filter_string}%" + if not req.case_match: - req.filter_string = req.filter_string.lower() + req.filter_string = req.filter_string.upper() returned_strings = db.connect_execute_return( sql.SQL("SELECT {} from {} WHERE UPPER({}) LIKE %s;").format( sql.Identifier(req.column.id), @@ -1044,7 +1047,7 @@ def filered_short_string_column_values( else: returned_strings = db.connect_execute_return( - sql.SQL("SELECT {} from {} WHERE {} LIKE %s").format( + sql.SQL("SELECT {} from {} WHERE {} SIMILAR TO %s").format( sql.Identifier(req.column.id), sql.Identifier(project), sql.Identifier(req.column.id), diff --git a/backend/zeno_backend/database/util.py b/backend/zeno_backend/database/util.py index b046c173..78c54349 100644 --- a/backend/zeno_backend/database/util.py +++ b/backend/zeno_backend/database/util.py @@ -24,7 +24,9 @@ def resolve_metadata_type(data_frame: pd.DataFrame, column: str) -> MetadataType elif pd.api.types.is_datetime64_any_dtype(dtype): return MetadataType.DATETIME elif pd.api.types.is_string_dtype(dtype): - return MetadataType.NOMINAL + if data_frame[column].nunique() < 20: + return MetadataType.NOMINAL + return MetadataType.OTHER return MetadataType.OTHER diff --git a/frontend/src/lib/components/general/Header.svelte b/frontend/src/lib/components/general/Header.svelte index 65a5a339..f862d8cd 100644 --- a/frontend/src/lib/components/general/Header.svelte +++ b/frontend/src/lib/components/general/Header.svelte @@ -37,19 +37,19 @@
goto(`${getProjectRouteFromURL($page.url)}/explore`)} /> goto(`${getProjectRouteFromURL($page.url)}/compare`)} /> goto(`${getProjectRouteFromURL($page.url)}/chart`)} /> @@ -60,7 +60,7 @@ {#if currentTab?.includes('explore') || currentTab?.includes('compare')} collapseHeader.set(!$collapseHeader)} /> @@ -70,21 +70,21 @@ {#if currentTab?.includes('project') && $project && $project.ownerName === user?.name} (projectEdit = true)} /> {/if} goto(`/account`)} />
authToken.set(undefined)} /> diff --git a/frontend/src/lib/components/general/HeaderIcon.svelte b/frontend/src/lib/components/general/HeaderIcon.svelte index e2596580..5b8a6201 100644 --- a/frontend/src/lib/components/general/HeaderIcon.svelte +++ b/frontend/src/lib/components/general/HeaderIcon.svelte @@ -1,32 +1,29 @@ - + + + diff --git a/frontend/src/lib/components/instance-views/ListView.svelte b/frontend/src/lib/components/instance-views/ListView.svelte index 7a8ac77d..f080b4cf 100644 --- a/frontend/src/lib/components/instance-views/ListView.svelte +++ b/frontend/src/lib/components/instance-views/ListView.svelte @@ -118,7 +118,7 @@ {/if} - +