mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-26 17:34:41 +00:00
Fix Vertica column fetch query (#11424)
* Fix vertica column fetch query * fix timestamp datatype
This commit is contained in:
parent
186eb252d7
commit
3f65c8ab0f
@ -145,16 +145,12 @@ def _get_column_info( # pylint: disable=too-many-locals,too-many-branches,too-m
|
|||||||
args = ()
|
args = ()
|
||||||
elif attype in ("timestamptz", "timetz"):
|
elif attype in ("timestamptz", "timetz"):
|
||||||
kwargs["timezone"] = True
|
kwargs["timezone"] = True
|
||||||
if charlen:
|
|
||||||
kwargs["precision"] = int(charlen)
|
|
||||||
args = ()
|
args = ()
|
||||||
elif attype in (
|
elif attype in (
|
||||||
"timestamp",
|
"timestamp",
|
||||||
"time",
|
"time",
|
||||||
):
|
):
|
||||||
kwargs["timezone"] = False
|
kwargs["timezone"] = False
|
||||||
if charlen:
|
|
||||||
kwargs["precision"] = int(charlen)
|
|
||||||
args = ()
|
args = ()
|
||||||
elif attype.startswith("interval"):
|
elif attype.startswith("interval"):
|
||||||
field_match = re.match(r"interval (.+)", attype, re.I)
|
field_match = re.match(r"interval (.+)", attype, re.I)
|
||||||
|
@ -35,7 +35,8 @@ VERTICA_GET_COLUMNS = textwrap.dedent(
|
|||||||
FROM v_catalog.columns col
|
FROM v_catalog.columns col
|
||||||
LEFT JOIN v_catalog.comments com
|
LEFT JOIN v_catalog.comments com
|
||||||
ON com.object_type = 'COLUMN'
|
ON com.object_type = 'COLUMN'
|
||||||
AND com.object_name LIKE CONCAT(CONCAT(col.table_name, '_%.'), col.column_name)
|
AND com.object_id = col.table_id
|
||||||
|
AND com.child_object = col.column_name
|
||||||
WHERE lower(table_name) = '{table}'
|
WHERE lower(table_name) = '{table}'
|
||||||
AND {schema_condition}
|
AND {schema_condition}
|
||||||
UNION ALL
|
UNION ALL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user