Skip to content

SNOW-3217477: lower does not return string type #4111

Description

@DPeled

Please answer these questions before submitting your issue. Thanks!

  1. What version of Python are you using?

    Python 3.11.13

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

     pandas==2.1.4
     pandas-gbq==0.31.0
     snowflake-snowpark-python==1.42.0
    
  3. What did you do?

    when running lower() on a variant column the result are returned as variant as well:

    >>> from snowflake.snowpark import Session
    >>> from snowflake.snowpark.functions import lit, lower
    >>> session = Session.builder.config('local_testing', True).create()
    >>> df = session.create_dataframe([[{"a": "AbC"}]], schema=['entry'])
    >>> df.select(lower(df.entry['a'])).collect()
    [Row(LOWER("ENTRY"['A'])='"abc"')]

    As you can see, the result is surrounded by "...".

  4. What did you expect to see?

    When executing in Snowflake

    SELECT lower('AbC'::variant)

    It returns just abc

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't workinglocal testingLocal Testing issues/PRsstatus-triage_doneInitial triage done, will be further handled by the driver team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions