Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Høxbro Hansen <[email protected]>
  • Loading branch information
ahuang11 and hoxbro authored Oct 10, 2024
1 parent 7c45173 commit 7ca3a78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions hvplot/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2175,8 +2175,7 @@ def _process_tiles_without_geo(self, data, x, y):
data = data.to_crs(epsg=3857)
return data, x, y
elif not is_lazy_data(data):
# no dask/ibis as to prevent eager evaluation
# https://github.com/holoviz/hvplot/pull/1432/files#r1789862990
# To prevent eager evaluation: https://github.com/holoviz/hvplot/pull/1432
min_x = np.min(data[x])
max_x = np.max(data[x])
min_y = np.min(data[y])
Expand Down
5 changes: 5 additions & 0 deletions hvplot/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,11 @@ def is_xarray(data):


def is_lazy_data(data):
"""Check if data is lazy
This checks if the datatype is Dask, Ibis, or Polars' LazyFrame.
It is useful to avoid eager evaluation of the data.
"""
if is_dask(data) or is_ibis(data):
return True
elif is_polars(data):
Expand Down

0 comments on commit 7ca3a78

Please sign in to comment.