aminghadersohi opened a new pull request, #44713: URL: https://github.com/apache/superset/pull/44713
### SUMMARY Elasticsearch/OpenSearch columns can report the field types `BYTE`, `SHORT`, `HALF_FLOAT`, `SCALED_FLOAT` and `UNSIGNED_LONG` (the mapping type names; elasticsearch-dbapi reflects them this way in preset-io/elasticsearch-dbapi#126). None of Superset's default column type mappings match these names, so such dataset columns get no generic type and are not treated as numeric. This adds `column_type_mappings` for the five names to both `ElasticSearchEngineSpec` and `OpenDistroEngineSpec`: - `BYTE`, `SHORT` → `SmallInteger`, NUMERIC - `HALF_FLOAT`, `SCALED_FLOAT` → `Float`, NUMERIC - `UNSIGNED_LONG` → `BigInteger`, NUMERIC The names already covered by the defaults (`DOUBLE`, `FLOAT`, `INTEGER`, `LONG`, `BOOLEAN`, `DATETIME`, `STRING`) are unchanged. ### TESTING INSTRUCTIONS `pytest tests/unit_tests/db_engine_specs/test_elasticsearch.py`. The new parametrized `test_field_types_are_classified` covers both specs. Without the change, the 10 cases for the five new names fail; with it, all 49 tests in the file pass. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- 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]
