hit an error in ibis with this expression
t[t.omnisci_geo.point_n(point_idx).x().name('point_a_x'), t.omnisci_geo.point_n(point_idx).y().name('point_a_y'), t.omnisci_geo.point_n(point_idx+1).x().name('point_b_x'), t.omnisci_geo.point_n(point_idx+1).y().name('point_b_y')].execute()
with an error of
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
~/omnisci-datascience/lib/python3.7/site-packages/ibis/expr/operations.py in equals(self, other, cache)
99 try:
--> 100 return cache[key]
101 except KeyError:
KeyError: (GeoPointN(ref_0
DatabaseTable[table]
TypeError: geo_equals() got an unexpected keyword argument 'cache'
9:08
which gets called via all_equals in ibis/expr/operations.py, i assume ibis is trying to helpfully dedup projections?
def all_equal(left, right, cache=None):
"""Check whether two objects `left` and `right` are equal.
Parameters
----------
left : Union[object, Expr, Node]
right : Union[object, Expr, Node]
cache : Optional[Dict[Tuple[Node, Node], bool]]
A dictionary indicating whether two Nodes are equal
"""
if cache is None:
cache = {}
if util.is_iterable(left):
# check that left and right are equal length iterables and that all
# of their elements are equal
return (
util.is_iterable(right)
and len(left) == len(right)
and all(
itertools.starmap(
functools.partial(all_equal, cache=cache), zip(left, right)
)
)
)
if hasattr(left, 'equals'):
return left.equals(right, cache=cache)
return left == right
from Todd: