feat: Optimize SQL entity handling without creating temporary tables by cutoutsy · Pull Request #5695 · feast-dev/feast
# Generate the Trino SQL query from the query context if type(entity_df) is str: table_reference = f"({entity_df})" query = offline_utils.build_point_in_time_query( query_context, left_table_query_string=table_reference,
results = client.execute_query(f"SELECT * FROM {table_name} LIMIT 1") results = client.execute_query(f"SELECT * FROM ({entity_df}) LIMIT 1")
limited_entity_df = pd.DataFrame( data=results.data, columns=results.columns_names