snowflakedb / snowflakedb/snowpark-python

SNOW-3217477: `lower` does not return string type

Open
#4,111 1 comment 0 reactions 2 assignees View on GitHub

@sfc-gh-yixie is already working on this.

Since Mar 10, 2026.

bug local testing status-triage_done
Dominant language
Python
Stars
341
Forks
155
Avg merge
4d 16h
Merged PRs (30d)
27

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.