Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-1893174: The __repr__ method in TimestampType shows an incorrect field. #2916

Open
Yoshi-Egawa opened this issue Jan 23, 2025 · 0 comments
Assignees
Labels
bug Something isn't working triaged

Comments

@Yoshi-Egawa
Copy link
Contributor

Please answer these questions before submitting your issue. Thanks!

  1. What version of Python are you using?

    Python 3.11.11 (main, Dec 4 2024, 23:02:28) [GCC 12.2.0]

  2. What operating system and processor architecture are you using?

    Linux-6.10.14-linuxkit-aarch64-with-glibc2.36

  3. What are the component versions in the environment (pip freeze)?

    snowflake-connector-python==3.12.4
    snowflake-snowpark-python==1.26.0

  4. What did you do?

    import datetime
    from snowflake.snowpark.session import Session
    
    connection_parameters: dict[str, int | str] = {
        "user": "<user_name>",
        "password": "<password>",
        "account": "<account_name>",
        "role": "<role_name>",
        "warehouse": "<warehouse_name>",
        "database": "<database_name>",
        "schema": "<schema_name>",
    }
    
    session = Session.builder.configs(connection_parameters).create()
    
    df = session.create_dataframe(
        [[datetime.datetime.now()]],
        schema=["TIMESTAMP"],
    )

    The result of df.schema is:

    StructType([StructField('TIMESTAMP', TimestampType(tz=ntz), nullable=False)])
    
  5. What did you expect to see?

    I expected df.schema to display one of the following:

    StructType([StructField('TIMESTAMP', TimestampType(timezone=TimestampTimeZone('ntz')), nullable=False)])
    

    or:

    StructType([StructField('TIMESTAMP', TimestampType(timezone=TimestampTimeZone.NTZ)), nullable=False)])
    
  6. Can you set logging to DEBUG and collect the logs?

    Since this is not a runtime error, enabling DEBUG logging may not provide additional useful information.

@Yoshi-Egawa Yoshi-Egawa added bug Something isn't working needs triage Initial RCA is required labels Jan 23, 2025
@github-actions github-actions bot changed the title The __repr__ method in TimestampType shows an incorrect field. SNOW-1893174: The __repr__ method in TimestampType shows an incorrect field. Jan 23, 2025
@sfc-gh-jrose sfc-gh-jrose self-assigned this Jan 23, 2025
@sfc-gh-jrose sfc-gh-jrose added triaged and removed needs triage Initial RCA is required labels Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged
Projects
None yet
Development

No branches or pull requests

2 participants