FQE-1719- Validate HubSpot Handler#11831
Conversation
|
🔒 Entelligence AI Vulnerability Scanner ✅ No security vulnerabilities found! Your code passed our comprehensive security analysis. |
Review Summary🏷️ Draft Comments (2)
🔍 Comments beyond diff scope (1)
|
Review Summary🏷️ Draft Comments (1)
|
Review Summary🏷️ Draft Comments (3)
|
Review Summary🏷️ Draft Comments (1)
|
| } | ||
| tables_data.append(table_info) | ||
| logger.info(f"Table '{table_name}' is accessible") | ||
| except Exception as meta_error: |
There was a problem hiding this comment.
This except is unnecessary - nothing can go wrong above
| "DATA_TYPE": col["data_type"], | ||
| "ORDINAL_POSITION": col["ordinal_position"], | ||
| "COLUMN_DEFAULT": None, | ||
| "IS_NULLABLE": "YES" if col["is_nullable"] else "NO", |
There was a problem hiding this comment.
_discover_columns returns is_nullable==None for all columns. Therefore, here "IS_NULLABLE" will be set to "NO". But this is not true - we can't say is column nullable or not. Better to set here None
| if non_null_values: | ||
| # Try to calculate numeric average for numeric columns | ||
| try: | ||
| numeric_values = [] | ||
| for v in non_null_values: | ||
| if isinstance(v, (int, float)): | ||
| numeric_values.append(float(v)) | ||
| elif isinstance(v, str) and v.replace(".", "").replace("-", "").isdigit(): | ||
| numeric_values.append(float(v)) | ||
|
|
||
| if numeric_values: | ||
| stats["average_value"] = round(sum(numeric_values) / len(numeric_values), 2) | ||
| except (ValueError, TypeError): | ||
| # Not numeric data, average stays None | ||
| pass |
There was a problem hiding this comment.
This may be too slow. If you need avg value, try this:
import pandas as pd
from pandas.api import types as pd_types
s = pd.Series(values)
if pd_types.is_numeric_dtype(s):
avg = s.mean()
Review Summary🏷️ Draft Comments (3)
|
Review Summary |
Frontend PR --> #3285
Fixes FQE-1719
Type of change
Verification Process
To ensure the changes are working as expected:
Unit tests
Checklist: