Ë
    èlÖiî  ã                   ó(   — d dl mZ d dlmZ 	 	 dd„Zy)é    )Úutils)ÚRowNc                 óª
  — |r|rt        d«      ‚|€|}g }t        |d«      }	t        j                  |«      }
|€(t	        t        t        | j                  «      «      «      }n‚|	r | j                  D �cg c]
  } ||«      ‘Œ }}n`|
rA|D �cg c]  }| j                  |   ‘Œ }}t        |D �cg c]  }|j                  «       ‘Œ c}Ž }n| j                  |   j                  «       }t        |d«      }t        j                  |«      }|€(t	        t        t        |j                  «      «      «      }nÒ|r |j                  D �cg c]
  } ||«      ‘Œ }}n°|rs|D �cg c]  }|j                  |   ‘Œ }}t        |D �cg c]  }|j                  «       ‘Œ c}Ž }|D �cg c]'  }|j                  j                  j                  |«      ‘Œ) }}n;|j                  |   }|j                  «       }|j                  j                  |«      g}t        | j                  «      }t        | j                  «      }t!        |j                  «      D ]p  \  }}|j"                  }|s|€||v rŒ|�||vrŒ"|| j$                  v r|j'                  d|z  «       n|j'                  |«       |j'                  |j(                  «       Œr |�0|s.|j+                  |j                  D �cg c]	  }||v sŒ|‘Œ c}«      }i }t!        |«      D ]/  \  }}||vrg ||<   ||   j'                  |j                  |   «       Œ1 g }| j,                  �|sg }nd}t!        |«      D �]_  \  }}|j/                  |d«      } |r| €t        d|z  «      ‚| r–| D ]�  }!t        | j                  |   «      }"t!        |!«      D ]  \  }#}$|€|#|v r|sŒ|"j'                  |$«       Œ! |j'                  t1        |"|«      «       | j,                  €Œp|rŒs|j'                  | j,                  |   «       Œ’ ŒÃ|rŒÆt        | j                  |   «      }"t!        |j                  «      D ]  \  }#}$|€|#|v r|sŒ|"j'                  d«       Œ! |j'                  t1        |"|«      «       | j,                  €�Œ>|r�ŒB|j'                  | j,                  |   «       �Œb |rpt3        |«      }%t!        |«      D ]W  \  }&}'|'|%v rŒdgt        | j                  «      z  t        |j4                  |&   «      z   }"|j'                  t1        |"|«      «       ŒY | j7                  ||||¬«      S c c}w c c}w c c}w c c}w c c}w c c}w c c}w c c}w )aq  
    Create a new table by joining two table's on common values. This method
    implements most varieties of SQL join, in addition to some unique features.

    If :code:`left_key` and :code:`right_key` are both :code:`None` then this
    method will perform a "sequential join", which is to say it will join on row
    number. The :code:`inner` and :code:`full_outer` arguments will determine
    whether dangling left-hand and right-hand rows are included, respectively.

    If :code:`left_key` is specified, then a "left outer join" will be
    performed. This will combine columns from the :code:`right_table` anywhere
    that :code:`left_key` and :code:`right_key` are equal. Unmatched rows from
    the left table will be included with the right-hand columns set to
    :code:`None`.

    If :code:`inner` is :code:`True` then an "inner join" will be performed.
    Unmatched rows from either table will be left out.

    If :code:`full_outer` is :code:`True` then a "full outer join" will be
    performed. Unmatched rows from both tables will be included, with the
    columns in the other table set to :code:`None`.

    In all cases, if :code:`right_key` is :code:`None` then it :code:`left_key`
    will be used for both tables.

    If :code:`left_key` and :code:`right_key` are column names, the right-hand
    identifier column will not be included in the output table.

    If :code:`require_match` is :code:`True` unmatched rows will raise an
    exception. This is like an "inner join" except any row that doesn't have a
    match will raise an exception instead of being dropped. This is useful for
    enforcing expectations about datasets that should match.

    Column names from the right table which also exist in this table will
    be suffixed "2" in the new table.

    A subset of columns from the right-hand table can be included in the joined
    table using the :code:`columns` argument.

    :param right_table:
        The "right" table to join to.
    :param left_key:
        Either the name of a column from the this table to join on, the index
        of a column, a sequence of such column identifiers, a
        :class:`function` that takes a row and returns a value to join on, or
        :code:`None` in which case the tables will be joined on row number.
    :param right_key:
        Either the name of a column from :code:table` to join on, the index of
        a column, a sequence of such column identifiers, or a :class:`function`
        that takes a ow and returns a value to join on. If :code:`None` then
        :code:`left_key` will be used for both. If :code:`left_key` is
        :code:`None` then this value is ignored.
    :param inner:
        Perform a SQL-style "inner join" instead of a left outer join. Rows
        which have no match for :code:`left_key` will not be included in
        the output table.
    :param full_outer:
        Perform a SQL-style "full outer" join rather than a left or a right.
        May not be used in combination with :code:`inner`.
    :param require_match:
        If true, an exception will be raised if there is a left_key with no
        matching right_key.
    :param columns:
        A sequence of column names from :code:`right_table` to include in
        the final output table. Defaults to all columns not in
        :code:`right_key`. Ignored when :code:`full_outer` is :code:`True`.
    :returns:
        A new :class:`.Table`.
    z0A join can not be both "inner" and "full_outer".NÚ__call__z%s2z1Left key "%s" does not have a matching right key.)Ú	row_names)Ú
ValueErrorÚhasattrr   Ú
issequenceÚtupleÚrangeÚlenÚ_rowsÚ_columnsÚzipÚvaluesÚ_keysÚindexÚlistÚ_column_namesÚ_column_typesÚ	enumerateÚnameÚcolumn_namesÚappendÚ	data_typeÚselectÚ
_row_namesÚgetr   ÚsetÚrowsÚ_fork)(ÚselfÚright_tableÚleft_keyÚ	right_keyÚinnerÚ
full_outerÚrequire_matchÚcolumnsÚright_key_indicesÚleft_key_is_funcÚleft_key_is_sequenceÚ	left_dataÚrowÚkeyÚleft_columnsÚcolumnÚright_key_is_funcÚright_key_is_sequenceÚ
right_dataÚright_columnsÚright_columnr   Úcolumn_typesÚir   ÚnÚ
right_hashÚvaluer    r   Ú
left_indexÚ
left_valueÚmatching_rowsÚ	right_rowÚnew_rowÚkÚvÚleft_setÚright_indexÚright_values(                                           úU/var/www/html/strategist-ai/venv_dbt/lib/python3.12/site-packages/agate/table/join.pyÚjoinrG      s=  € ñN ‘ÜÐKÓLÐLàÐØˆ	ð Ðä˜x¨Ó4ÐÜ ×+Ñ+¨HÓ5Ðð ÐÜœ%¤ D§J¡J£Ó0Ó1‰	á	Ø.2¯j©jÖ9 s‘X˜c•]Ð9ˆ	Ñ9á	Ø6>Ö?¨s˜Ÿ™ cÓ*Ð?ˆÐ?Ü¸ÖE¨f˜&Ÿ-™-�/ÒEÐF‰	ð —M‘M (Ñ+×2Ñ2Ó4ˆ	ä 	¨:Ó6ÐÜ!×,Ñ,¨YÓ7Ðð ÐÜœ5¤ [×%6Ñ%6Ó!7Ó8Ó9‰
á	Ø0;×0AÑ0AÖB¨‘i •nÐBˆ
ÑBá	Ø>GÖH°s˜×-Ñ-¨cÓ2ÐHˆÐHÜ¸ÖG¨v˜6Ÿ=™=�?ÒGÐHˆ
ØNWÖXÀs˜[×1Ñ1×7Ñ7×=Ñ=¸cÕBÐXÐÑXð #×+Ñ+¨IÑ6ˆØ!×(Ñ(Ó*ˆ
Ø(×1Ñ1×7Ñ7¸ÓEÐFÐô ˜×*Ñ*Ó+€LÜ˜×*Ñ*Ó+€Lä˜{×3Ñ3Ó4ò .‰	ˆˆ6Ø�{‰{ˆáØˆ 1Ð(9Ñ#9ØàÐ" t°7Ñ':Øà�4×$Ñ$Ñ$Ø×Ñ ¨¡Õ-à×Ñ Ô%à×Ñ˜F×,Ñ,Õ-ð.ð" Ð¡:Ø!×(Ñ(°[×5NÑ5NÖ)_°ÐRSÐW^ÒR^ª!Ò)_Ó`ˆà€Jä˜jÓ)ò 7‰ˆˆ5Ø˜
Ñ"Ø "ˆJ�uÑà�5Ñ× Ñ  ×!2Ñ!2°1Ñ!5Õ6ð	7ð €Dà‡�Ð"©:Ø‰	àˆ	ô #,¨IÓ"6ó ">Ñˆ
�JØ"Ÿ™ z°4Ó8ˆá˜]Ð2ÜÐPÐS]Ñ]Ó^Ð^ñ Ø*ò B�	Ü˜tŸz™z¨*Ñ5Ó6�ä% iÓ0ò &‘D�A�qØ�¨1Ð0AÑ+AÉ*Ø à—N‘N 1Õ%ð	&ð —‘œC ¨Ó6Ô7à—?‘?Ñ.²zØ×$Ñ$ T§_¡_°ZÑ%@ÕAñBò Ü˜4Ÿ:™: jÑ1Ó2ˆGä! +×";Ñ";Ó<ò %‘��1Ø�? qÐ,=Ñ'=ÁjØà—‘˜tÕ$ð	%ð �K‰Kœ˜G \Ó2Ô3à�‰Ò*³:Ø× Ñ  §¡°Ñ!<Ö=ðE">ñJ Ü�y“>ˆä(1°*Ó(=ò 	4Ñ$ˆK˜Ø˜hÑ&Øà�v¤ D§M¡MÓ 2Ñ2´d¸;×;KÑ;KÈKÑ;XÓ6YÑYˆGà�K‰Kœ˜G \Ó2Õ3ð	4ð �:‰:�d˜L¨,À)ˆ:ÓLÐLùòm :ùò @ùÚEùò Cùò IùÚGùÚXùò: *`s6   Á1T-Â	T2Â*T7Ä>T<ÅUÅ7UÆ,UË	UËU)NNFFFN)Úagater   Ú
agate.rowsr   rG   © ó    rF   ú<module>rL      s   ðÝ Ý ð inØôNMrK   