EnxDev commented on code in PR #44713:
URL: https://github.com/apache/superset/pull/44713#discussion_r4137492700


##########
superset/db_engine_specs/elasticsearch.py:
##########
@@ -31,12 +31,34 @@
     SupersetDBAPIOperationalError,
     SupersetDBAPIProgrammingError,
 )
+from superset.utils.core import GenericDataType
 
 if TYPE_CHECKING:
     from superset.models.core import Database
 
 logger = logging.getLogger()
 
+# Elasticsearch/OpenSearch field types that the default column type mappings
+# do not recognize. DOUBLE, FLOAT, INTEGER, LONG, BOOLEAN and DATETIME are
+# already covered by the defaults.
+FIELD_TYPE_MAPPINGS = (

Review Comment:
   We pin elasticsearch-dbapi 0.2.13, and its `get_type` never returns these 
names. `byte`, `short`, `scaled_float` and `unsigned_long` aren't in its map, 
so they fall back to `String()`, and `half_float` comes back as a plain 
`Float`. On the current pin these columns show up as STRING (or FLOAT), so 
nothing here matches until preset-io/elasticsearch-dbapi#126 ships in 0.2.14, 
and that isn't tagged yet.
   
   Could we bump `requirements/*.txt` and the pyproject floor here once 0.2.14 
is out, or at least say in the description that this depends on it? Otherwise 
people will upgrade expecting the fix and nothing will change.



-- 
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