Skip to content

Commit d5ccf13

Browse files
account for empty table in arrow table filter
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent 89de17a commit d5ccf13

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/databricks/sql/backend/sea/utils/filters.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ def _filter_arrow_table(
116116
if not pyarrow:
117117
raise ImportError("PyArrow is required for Arrow table filtering")
118118

119+
if table.num_rows == 0:
120+
return table
121+
119122
# Convert allowed_values to PyArrow Array for better performance
120123
allowed_array = pyarrow.array(allowed_values)
121124

0 commit comments

Comments
 (0)