MCPcopy Create free account
hub / github.com/BIT-DataLab/LakeBench / online_query

Function online_query

join&union/Frt12/online_process/all_entity_com30.py:144–165  ·  view source on GitHub ↗
(file_ls,queue,query_result,max_k)

Source from the content-addressed store, hash-verified

142 return result
143
144def online_query(file_ls,queue,query_result,max_k):
145 for filename in file_ls:
146 if filename.endswith('.csv'):
147 # 构建完整的文件路径
148 file_path = os.path.join(query_folder_path, filename)
149 file_label_path = os.path.join(query_label_path, filename)
150
151 query_label_df = pd.read_csv(file_label_path)
152
153 query_second_column = read_sencond_column(file_label_path )
154
155 # query_path = r'tar1.csv'
156 query_path_df = pd.read_csv(file_path,low_memory=False,lineterminator='\n',)
157
158 result = all_entity_score(query_label_df, query_second_column, fnames, cand_value_labels, second_column, 2, 2
159 , all_candidate_attribute, query_path_df)
160 file_result = find_largest_(result, max_k)
161 tmp = {}
162 tmp[filename] = file_result
163 query_result.put(tmp)
164 queue.put(1)
165 queue.put((-1, "test-pid"))
166
167s = time.time()
168query_result = multiprocessing.Manager().Queue()

Callers

nothing calls this directly

Calls 3

read_sencond_columnFunction · 0.70
all_entity_scoreFunction · 0.70
find_largest_Function · 0.70

Tested by

no test coverage detected