change nxcals query return type to series
3 unresolved threads
3 unresolved threads
I tried to first migrate just pm queries to pd.Series, but it appeared to be more difficult to migrate partially than just migrate everything at once.
Merge request reports
Activity
Filter activity
assigned to @smazenou
- Resolved by Andreas Verdoner Barba
217 217 return unpack_single_element(results) 218 218 219 219 220 def _query_nxcals_by_variables_with_series( 221 spark: SparkSession, 222 system: str, 223 start_time: int | str | datetime, 224 duration: int | tuple[int, str], 217 217 return unpack_single_element(results) 218 218 219 219 220 def _query_nxcals_by_variables_with_series( 221 spark: SparkSession, 222 system: str, 223 start_time: int | str | datetime, 367 387 max_latest_data_point_search_period, 368 388 ) 369 if isinstance(variables, list): 370 return res if isinstance(res, list) else [res] 371 372 if isinstance(res, list): 373 if len(res) > 1: 374 raise ValueError( 375 f"Querying NXCALS returned more than one result for the following parameters: " 376 f"system: CMW, start_time: {start_time}, duration: {duration}, variables: {variables}" 377 ) 378 return res[0] 379 return res 380 389 381 390 382 391 @check_arguments_not_none() mentioned in commit 010111ed
Please register or sign in to reply