fix: bug fixes — full join operators, HASH formula, filter float values, chat delete loader#14
Merged
Conversation
|
| Filename | Overview |
|---|---|
| backend/backend/application/config_parser/constants.py | Adds HASH to FORMULA_DICT; categorised as "Text" but the function returns a numeric (int64) type, inconsistent with all other numeric-output formulas in the codebase which use "Math". |
| backend/formulasql/functions/text.py | HASH rewritten to accept ≥1 inputs, concatenate via ibis string addition, call .hash() with no arguments, and output 'numeric' — correctly matches the ibis API and is consistent with how CONCATENATE is implemented. |
| frontend/src/ide/chat-ai/PastConversationActions.jsx | Adds isDeleting state and Spin feedback during deletion, following the existing isSaving/Spin pattern. No new issues introduced beyond the previously-flagged try/finally without catch. |
| frontend/src/ide/editor/no-code-configuration/configure-joins.jsx | Passes joinType prop to Filter and auto-trims criteria to first condition with operator reset to EQ when switching to Full join type. Logic is sound. |
| frontend/src/ide/editor/no-code-toolbar/formula-editor.jsx | Adds HASH to FUNCTION_SIGNATURES with min:1, max:Infinity — correctly surfaces the function in the formula editor UI. |
| frontend/src/ide/editor/no-code-ui/filter/filter.jsx | Three independent fixes: float-friendly regex with sanitizeNumericSegment post-processing; Full join operator restriction + Add-filter button disabled for Full; BETWEEN removed from all join operator lists. All changes are correct. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User selects Join Type] --> B{Join Type?}
B -->|Full| C[Trim criteria to first condition\nReset operator to EQ\nDisable Add another filter]
B -->|Cross| D[Filter operators to EQ only]
B -->|Inner / Left / Right| E[All operators except\nNULL, NOTNULL, BETWEEN]
subgraph HASH_Formula["HASH Formula — text.py"]
H1[Receive n inputs] --> H2{n >= 1?}
H2 -->|No| H3[raise ValueError]
H2 -->|Yes| H4[Cast each input to string]
H4 --> H5[Concatenate all strings]
H5 --> H6[Call .hash with no args]
H6 --> H7[Output type: numeric int64]
end
subgraph Float_Sanitise["Float Filter Sanitisation — filter.jsx"]
F1[User types numeric value] --> F2[Strip non-digit / dot / minus chars]
F2 --> F3[sanitizeNumericSegment\npreserve leading minus\ncollapse extra dots]
F3 --> F4[Store clean value]
end
Prompt To Fix All With AI
This is a comment left during a code review.
Path: backend/backend/application/config_parser/constants.py
Line: 325-328
Comment:
**`function_type` mismatch — HASH is categorised as "Text" but returns a numeric value**
The HASH entry uses `"function_type": "Text"`, but `text.py` explicitly sets `data_types[node['outputs'][0]] = 'numeric'` and ibis `.hash()` returns `IntegerValue` (int64). Every other formula that produces a numeric output (all of `math.py`) uses `"function_type": "Math"`.
If the frontend uses `function_type` to group or filter formulas in the picker, users scanning the **Text** category will encounter a function that yields an integer, which is unexpected. Consider changing this to `"Math"` to match the output semantics and be consistent with the rest of the codebase.
```suggestion
"HASH": {
"key": "HASH",
"value": "HASH",
"description": (
"Returns a hash of the concatenated values. Accepts one or more columns."
" \n Example: HASH(col1) or HASH(col1, col2, col3)"
),
"function_type": "Math",
},
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (3): Last reviewed commit: "lint fixes" | Re-trigger Greptile
tahierhussain
requested changes
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Why
.hash()which takes zero arguments,causing a TypeError
/\D/g), blocking valid float inputs like3.14or-5.5needed for decimal comparisonsHow
Full Join operators (
filter.jsx,configure-joins.jsx):["Cross", "Full"].includes(joinType)joinType === "Full"joinTypeprop fromconfigure-joins.jsxto theFiltercomponentHASH formula (
text.py,constants.py,formula-editor.jsx):== 2to>= 1to accept variable number of columnsCONCATENATEfunction.hash()with no arguments, matching ibis API signature (Value.hash(self) -> IntegerValue)data_typesoutput from'string'to'numeric'to match the actual int64 return typeFORMULA_DICTand frontendFUNCTION_SIGNATURESFloat filter values (
filter.jsx):/\D/gto/[^\d.-]/gfor regular value and BETWEEN fields/[^\d,]/gto/[^\d,.-]/gdataType === "number"which reads from the LHS column'sdata_type— String and other types are unaffectedChat delete loader (
PastConversationActions.jsx):isDeletingstate, shows<Spin size="small" />during the delete API callisSaving/<Spin>pattern already used for edit operations in the same componentCan this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)
Database Migrations
Env Config
Relevant Docs
Value.hash()API: takes no arguments, returns IntegerValue (int64).hash()to database-native functions: PostgreSQL →HASHTEXTEXTENDED(), Snowflake →HASH(), BigQuery →FARM_FINGERPRINT(), DuckDB →HASH()Related Issues or PRs
Dependencies Versions
Notes on Testing
==operator available, no BETWEEN, no "Add another filter"=HASH(col1)→ produces integer hash values=HASH(col1, col2, col3)→ works across all supported databases3.14,-5.5→ acceptedScreenshots
Checklist
I have read and understood the Contribution Guidelines.