Skip to content

Commit

Permalink
feat(datafusion, flink, mssql): add uuid operation (#8545)
Browse files Browse the repository at this point in the history
Continued from [PR](#8438): 
add uuid operation for mssql, flink,  datafusion,
  • Loading branch information
jitingxu1 authored Mar 7, 2024
1 parent df2b69e commit 2f85a42
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions ibis/backends/datafusion/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class DataFusionCompiler(SQLGlotCompiler):
ops.Last: "last_value",
ops.Median: "median",
ops.StringLength: "character_length",
ops.RandomUUID: "uuid",
ops.RegexSplit: "regex_split",
}

Expand Down
1 change: 1 addition & 0 deletions ibis/backends/flink/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ class FlinkCompiler(SQLGlotCompiler):
ops.MapValues: "map_values",
ops.Power: "power",
ops.RandomScalar: "rand",
ops.RandomUUID: "uuid",
ops.RegexSearch: "regexp",
ops.StrRight: "right",
ops.StringLength: "char_length",
Expand Down
1 change: 1 addition & 0 deletions ibis/backends/mssql/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ class MSSQLCompiler(SQLGlotCompiler):
ops.Log10: "log10",
ops.Power: "power",
ops.RandomScalar: "rand",
ops.RandomUUID: "newid",
ops.Repeat: "replicate",
ops.Reverse: "reverse",
ops.StringAscii: "ascii",
Expand Down
7 changes: 1 addition & 6 deletions ibis/backends/tests/test_uuid.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"exasol": "UUID",
"flink": "CHAR(36) NOT NULL",
"impala": "STRING",
"mssql": "uniqueidentifier",
"postgres": "uuid",
"risingwave": "character varying",
"snowflake": "VARCHAR",
Expand All @@ -42,11 +43,8 @@ def test_uuid_literal(con, backend):

@pytest.mark.notimpl(
[
"datafusion",
"druid",
"exasol",
"flink",
"mssql",
"mysql",
"oracle",
"polars",
Expand All @@ -64,11 +62,8 @@ def test_uuid_function(con):

@pytest.mark.notimpl(
[
"datafusion",
"druid",
"exasol",
"flink",
"mssql",
"mysql",
"oracle",
"polars",
Expand Down

0 comments on commit 2f85a42

Please sign in to comment.