File tree Expand file tree Collapse file tree 1 file changed +3
-20
lines changed
src/databricks/sql/backend/sea/utils Expand file tree Collapse file tree 1 file changed +3
-20
lines changed Original file line number Diff line number Diff line change @@ -111,25 +111,6 @@ def _create_filtered_result_set(
111111 arraysize = result_set .arraysize ,
112112 )
113113
114- @staticmethod
115- def _validate_column_index (result_set : SeaResultSet , column_index : int ) -> str :
116- """
117- Validate column index and return the column name.
118-
119- Args:
120- result_set: Result set to validate against
121- column_index: Index of the column to validate
122-
123- Returns:
124- str: Column name at the specified index
125-
126- Raises:
127- ValueError: If column index is out of bounds
128- """
129- if column_index >= len (result_set .description ):
130- raise ValueError (f"Column index { column_index } is out of bounds" )
131- return result_set .description [column_index ][0 ]
132-
133114 @staticmethod
134115 def _filter_arrow_table (
135116 table : Any , # pyarrow.Table
@@ -192,7 +173,9 @@ def _filter_arrow_result_set(
192173 A filtered SEA result set
193174 """
194175 # Validate column index and get column name
195- column_name = ResultSetFilter ._validate_column_index (result_set , column_index )
176+ if column_index >= len (result_set .description ):
177+ raise ValueError (f"Column index { column_index } is out of bounds" )
178+ column_name = result_set .description [column_index ][0 ]
196179
197180 # Get all remaining rows as Arrow table and filter it
198181 arrow_table = result_set .results .remaining_rows ()
You can’t perform that action at this time.
0 commit comments