mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-16 12:33:08 +00:00
* Fixed athena modulo function * fixed modulo function for MySQL and escaped perc char in base modulo function * Removed compilation logic for MSSQL * fixed python formating * Added modulo and random logic for oracle * Fixed py format
This commit is contained in:
parent
38b04b76a9
commit
2f29c5fe93
@ -57,6 +57,9 @@ def _(element, compiler, **kw):
|
|||||||
@compiles(ModuloFn, Dialects.Redshift)
|
@compiles(ModuloFn, Dialects.Redshift)
|
||||||
@compiles(ModuloFn, Dialects.Snowflake)
|
@compiles(ModuloFn, Dialects.Snowflake)
|
||||||
@compiles(ModuloFn, Dialects.Postgres)
|
@compiles(ModuloFn, Dialects.Postgres)
|
||||||
|
@compiles(ModuloFn, Dialects.Athena)
|
||||||
|
@compiles(ModuloFn, Dialects.MySQL)
|
||||||
|
@compiles(ModuloFn, Dialects.Oracle)
|
||||||
def _(element, compiler, **kw):
|
def _(element, compiler, **kw):
|
||||||
|
|
||||||
value, base = validate_and_compile(element, compiler, **kw)
|
value, base = validate_and_compile(element, compiler, **kw)
|
||||||
|
@ -83,3 +83,9 @@ def _(*_, **__):
|
|||||||
def _(*_, **__):
|
def _(*_, **__):
|
||||||
"""Postgres random logic"""
|
"""Postgres random logic"""
|
||||||
return "ABS((RANDOM() * 100)::INTEGER)"
|
return "ABS((RANDOM() * 100)::INTEGER)"
|
||||||
|
|
||||||
|
|
||||||
|
@compiles(RandomNumFn, Dialects.Oracle)
|
||||||
|
def _(*_, **__):
|
||||||
|
"""Oracle random logic"""
|
||||||
|
return "ABS(DBMS_RANDOM.VALUE) * 100"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user