mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
refactor: migrate table chart to new API (#10270)
* refactor: migrate table chart to new API * chore: bump superset-ui to 0.17.0 * Fix Cypress tests * Apply soft-conversion to numeric metrics Fix time column formatting test * Add translation to chart does not exist error * Bump to 0.17.1
This commit is contained in:
@@ -158,28 +158,22 @@ class BaseEngineSpec: # pylint: disable=too-many-public-methods
|
||||
try_remove_schema_from_table_name = True # pylint: disable=invalid-name
|
||||
run_multiple_statements_as_one = False
|
||||
|
||||
# default matching patterns for identifying column types
|
||||
db_column_types: Dict[utils.GenericDataType, Tuple[Pattern[Any], ...]] = {
|
||||
# default matching patterns to convert database specific column types to
|
||||
# more generic types
|
||||
db_column_types: Dict[utils.GenericDataType, Tuple[Pattern[str], ...]] = {
|
||||
utils.GenericDataType.NUMERIC: (
|
||||
re.compile(r"BIT", re.IGNORECASE),
|
||||
re.compile(r".*DOUBLE.*", re.IGNORECASE),
|
||||
re.compile(r".*FLOAT.*", re.IGNORECASE),
|
||||
re.compile(r".*INT.*", re.IGNORECASE),
|
||||
re.compile(r".*NUMBER.*", re.IGNORECASE),
|
||||
re.compile(
|
||||
r".*(DOUBLE|FLOAT|INT|NUMBER|REAL|NUMERIC|DECIMAL|MONEY).*",
|
||||
re.IGNORECASE,
|
||||
),
|
||||
re.compile(r".*LONG$", re.IGNORECASE),
|
||||
re.compile(r".*REAL.*", re.IGNORECASE),
|
||||
re.compile(r".*NUMERIC.*", re.IGNORECASE),
|
||||
re.compile(r".*DECIMAL.*", re.IGNORECASE),
|
||||
re.compile(r".*MONEY.*", re.IGNORECASE),
|
||||
),
|
||||
utils.GenericDataType.STRING: (
|
||||
re.compile(r".*CHAR.*", re.IGNORECASE),
|
||||
re.compile(r".*STRING.*", re.IGNORECASE),
|
||||
re.compile(r".*TEXT.*", re.IGNORECASE),
|
||||
re.compile(r".*(CHAR|STRING|TEXT).*", re.IGNORECASE),
|
||||
),
|
||||
utils.GenericDataType.TEMPORAL: (
|
||||
re.compile(r".*DATE.*", re.IGNORECASE),
|
||||
re.compile(r".*TIME.*", re.IGNORECASE),
|
||||
re.compile(r".*(DATE|TIME).*", re.IGNORECASE),
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user