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

to_char format change implemented #1221

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

sriram251-code
Copy link
Contributor

closes #1186

This pull request improve functionality of to_char() method, adding new features to handle quivalent date time format convertion from snowflake.

Previous Behavior:
Snowflake code input: to_char(pos.createdwhen,'yyyymmdd') --output: 20241112
Databricks code output: TO_CHAR(pos.createdwhen, 'yyyymmdd') --output: 20240012

After the fix:
Databricks code output: TO_CHAR(pos.createdwhen, 'yyyyMMdd') --output: 20241112

@sriram251-code sriram251-code self-assigned this Nov 19, 2024
@sriram251-code sriram251-code added the bug Something isn't working label Nov 19, 2024
Copy link

github-actions bot commented Nov 19, 2024

Coverage tests results

456 tests  +6   418 ✅ +2   5s ⏱️ -1s
  6 suites ±0    37 💤 +3 
  6 files   ±0     1 ❌ +1 

For more details on these failures, see this check.

Results for commit 377ea6d. ± Comparison against base commit 2b3d5f6.

♻️ This comment has been updated with latest results.

@jimidle
Copy link
Contributor

jimidle commented Nov 28, 2024

Has this already been changed in the core version? Also, the tests are failing.

- functions/to_char.sql *** FAILED ***
  === Unexpected output (expected vs actual) ===
   SELECT                                       SELECT
  !  TO_CHAR(CURRENT_TIMESTAMP(), 'yyyyMMdd')     TO_CHAR(CURRENT_TIMESTAMP(), 'yyyymmdd'); (AcceptanceSpec.scala:15)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: dateformat 'yyyymmdd' throwing error while executing the code in Databricks DBSQL
2 participants