CoolFace
Apppublic

RonyForAI/Mirage_DB_RL

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
models.cpython-310.pyc19 linesDownload Raw Back to __pycache__
1o

2Z�i�3�@s`ddlmZmZmZddlmZddlmZGdd�de�ZGdd�de�Z	Gdd	�d	e�Z4d5S)�)�Action�Observation�State)�Field)�Listc@sTeZdZUedddd�Zeed<eddddd�Zeed	<eddd6dd�Zeed<d
S)�QueryAction.rz3Index of next table to join (from remaining_tables))�ge�description�7next_table�uFJoin algorithm: 0=hash(1.0×) 1=nested-loop(2.0×) 2=merge-sort(0.8×))r�ler	�	join_type�zMIndex scan: 0=full-table-scan 1=index-scan(halves base rows if index present)�	use_indexN)	�__name__�8__module__�__qualname__rr9�int�__annotations__r
r�rr�4D:\Meta Hackathon DBMS Optimizer\Mirage_RL\models.pyrs10rc@s�eZdZUeeed<eeed<eeed<eeed<eeed<eeed<eed<eed<ed	d11d�Z	eed<ed
dd�Z12eed<dS)�QueryObservation�tables�13table_rows�
selectivities�	has_index�chosen_order�remaining_tables�step_number�current_costg�?uEstimated size of the intermediate result accumulated so far. Computed as the product of (est_rows × selectivity) for each joined table. Joining large-output tables early causes this to explode, compounding all subsequent join costs. Keep this small by joining selective tables first.)�defaultr	�intermediate_size�z1SQL-like description of the query being optimized�
query_contextN)rrrr�strrr�floatrr!r#rrrrrs14�rc@s^eZdZUeed�Zeeed<eed�Z	eeed<dZ15eed<dZeed<dZ
eed<d	S)16�17QueryState)�default_factoryrrgr�18final_costr"�
scenario_nameN)rrrr�listrrrrrrr%r(r)r$rrrrr&&s19r&N)Zopenenv.core.env_server.typesrrr�pydanticr�typingrrrr&rrrr�<module>s