Skip to content

Commit

Permalink
fix(flink): cast map key lookups because flink requires exact type ma…
Browse files Browse the repository at this point in the history
…tches (#8724)
  • Loading branch information
cpcloud authored Mar 21, 2024
1 parent fb7e533 commit 6893a5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ibis/backends/flink/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def visit_Literal(self, op, *, value, dtype):
def visit_MapGet(self, op, *, arg, key, default):
if default is NULL:
default = self.cast(default, op.dtype)
return self.f.coalesce(arg[key], default)
return self.f.coalesce(arg[self.cast(key, op.arg.dtype.key_type)], default)

def visit_ArraySlice(self, op, *, arg, start, stop):
args = [arg, self.if_(start >= 0, start + 1, start)]
Expand Down

0 comments on commit 6893a5f

Please sign in to comment.