mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-24 17:59:52 +00:00
Fix Mysql bigint (#8665)
* Fix mysql bigint cast * Remove upgrade from dockerfiles
This commit is contained in:
parent
91d0460b27
commit
ff028a6eb0
@ -57,8 +57,8 @@ USER airflow
|
||||
# Argument to provide for Ingestion Dependencies to install. Defaults to all
|
||||
ARG INGESTION_DEPENDENCY="all"
|
||||
RUN pip install --upgrade pip
|
||||
RUN pip install --upgrade openmetadata-managed-apis --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.3.3/constraints-3.9.txt"
|
||||
RUN pip install --upgrade openmetadata-ingestion[${INGESTION_DEPENDENCY}]
|
||||
RUN pip install "openmetadata-managed-apis==0.12.2.4" --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.3.3/constraints-3.9.txt"
|
||||
RUN pip install "openmetadata-ingestion[${INGESTION_DEPENDENCY}]==0.12.2.4"
|
||||
# Uninstalling psycopg2-binary and installing psycopg2 instead
|
||||
# because the psycopg2-binary generates a architecture specific error
|
||||
# while authrenticating connection with the airflow, psycopg2 solves this error
|
||||
|
@ -67,7 +67,7 @@ RUN pip install "."
|
||||
|
||||
WORKDIR /home/airflow/ingestion
|
||||
ARG INGESTION_DEPENDENCY="all"
|
||||
RUN pip install --upgrade ".[${INGESTION_DEPENDENCY}]"
|
||||
RUN pip install ".[${INGESTION_DEPENDENCY}]"
|
||||
|
||||
# Uninstalling psycopg2-binary and installing psycopg2 instead
|
||||
# because the psycopg2-binary generates a architecture specific error
|
||||
|
@ -43,6 +43,15 @@ def _(element, compiler, **kw):
|
||||
return f"SUM(CAST({proc} AS NUMERIC))"
|
||||
|
||||
|
||||
@compiles(SumFn, Dialects.MySQL)
|
||||
def _(element, compiler, **kw):
|
||||
"""MySQL uses (UN)SIGNED INTEGER to cast to BIGINT
|
||||
https://dev.mysql.com/doc/refman/8.0/en/cast-functions.html
|
||||
"""
|
||||
proc = compiler.process(element.clauses, **kw)
|
||||
return f"SUM(CAST({proc} AS UNSIGNED INTEGER))"
|
||||
|
||||
|
||||
@compiles(SumFn, Dialects.Snowflake)
|
||||
@compiles(SumFn, Dialects.Vertica)
|
||||
def _(element, compiler, **kw):
|
||||
|
Loading…
x
Reference in New Issue
Block a user