aminghadersohi commented on code in PR #44685:
URL: https://github.com/apache/superset/pull/44685#discussion_r4139848194


##########
superset/db_engine_specs/oracle.py:
##########
@@ -53,6 +55,31 @@ class OracleEngineSpec(BaseEngineSpec):
     max_column_name_length = 128
     supports_multivalues_insert = True
 
+    # Oracle-native type names the base mappings don't cover. NUMBER is 
Oracle's
+    # primary numeric type (reflected as e.g. "NUMBER" or "NUMBER(10, 2)"), and
+    # without these mappings such columns get no generic type, so they are not
+    # treated as numeric (no default SUM aggregate, excluded from numeric
+    # column lists). BLOB and RAW are binary and are intentionally left 
unmapped.
+    # The patterns are anchored on a word boundary so unrelated type names that
+    # merely share a prefix (e.g. a user-defined "NUMBERING" type) stay 
unmapped.
+    column_type_mappings = (
+        (
+            re.compile(r"^number\b", re.IGNORECASE),
+            types.Numeric(),
+            GenericDataType.NUMERIC,
+        ),
+        (
+            re.compile(r"^binary_(float|double)\b", re.IGNORECASE),
+            types.Float(),
+            GenericDataType.NUMERIC,
+        ),
+        (
+            re.compile(r"^n?clob\b", re.IGNORECASE),
+            types.Text(),
+            GenericDataType.STRING,
+        ),

Review Comment:
   Fixed in 1eecb6c99a8b34105dff2f56ef4455a7ed974e0f. Added the 
case-insensitive Oracle LONG mapping to Text / STRING ahead of the base numeric 
mapping, with regression cases for LONG and long and a documentation note. All 
45 Oracle db_engine_spec unit tests pass; all applicable pre-commit hooks pass, 
including mypy and pylint.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to