snowpark-python icon indicating copy to clipboard operation
snowpark-python copied to clipboard

SNOW-1597225: Selecting duplicate column using original df fails

Open GuyOmer opened this issue 1 year ago • 0 comments

Please answer these questions before submitting your issue. Thanks!

  1. What version of Python are you using?

    Python 3.10.13 (main, Feb 13 2024, 16:41:04) [Clang 15.0.0 (clang-1500.1.0.2.5)]

  2. What are the Snowpark Python and pandas versions in the environment?

    pandas==2.2.2 snowflake-snowpark-python==1.20.0

  3. What did you do?

from snowflake.snowpark import Session

s = Session.builder.config("local_testing", True).create()
df1 = s.create_dataframe([{'id': 1, 'foo': 'bar'}])
df2 = s.create_dataframe([{'id': 1, 'taz': 'baz'}])

df1.join(df2, on=df1['id'] == df2['id']).select(df2['id']).show() # KeyError: '"ID"'
  1. What did you expect to see?

Snowflake connection would know to resolve the ID column from df2.

GuyOmer avatar Aug 05 '24 12:08 GuyOmer