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-1313648 GO - Verify value bindings for all field types while exceeding CLIENT_STAGE_ARRAY_BINDING_THRESHOLD #1297

Open
wants to merge 29 commits into
base: master
Choose a base branch
from

Conversation

sfc-gh-ext-simba-jy
Copy link
Collaborator

@sfc-gh-ext-simba-jy sfc-gh-ext-simba-jy commented Jan 31, 2025

Description

SNOW-313648 Please explain the changes you made here.

  • Fixed the time difference when the timestamp value is before 1600
  • Add testing to validate that inserting data with the stage binding, array binding, and interface array binding are the same.

Checklist

  • Created tests which fail without the change (if possible)
  • Extended the README / documentation, if necessary

Copy link

codecov bot commented Feb 5, 2025

Codecov Report

Attention: Patch coverage is 67.44186% with 28 lines in your changes missing coverage. Please review.

Project coverage is 82.03%. Comparing base (580e7e8) to head (5dd97c1).

Files with missing lines Patch % Lines
converter.go 71.42% 18 Missing ⚠️
bind_uploader.go 56.52% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1297      +/-   ##
==========================================
- Coverage   82.16%   82.03%   -0.14%     
==========================================
  Files          55       55              
  Lines       13634    13670      +36     
==========================================
+ Hits        11203    11214      +11     
- Misses       2431     2456      +25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sfc-gh-ext-simba-jy sfc-gh-ext-simba-jy marked this pull request as ready for review February 5, 2025 22:31
@sfc-gh-ext-simba-jy sfc-gh-ext-simba-jy requested a review from a team as a code owner February 5, 2025 22:31
@sfc-gh-ext-simba-jy sfc-gh-ext-simba-jy changed the title SNOW-1313648 SNOW-1313648 GO - Verify value bindings for all field types while exceeding CLIENT_STAGE_ARRAY_BINDING_THRESHOLD Feb 6, 2025
bindings_test.go Outdated Show resolved Hide resolved
bindings_test.go Outdated Show resolved Hide resolved
bindings_test.go Outdated Show resolved Hide resolved
bindings_test.go Outdated Show resolved Hide resolved
bindings_test.go Show resolved Hide resolved
bindings_test.go Outdated Show resolved Hide resolved
bindings_test.go Outdated Show resolved Hide resolved
bindings_test.go Show resolved Hide resolved
converter.go Outdated Show resolved Hide resolved
converter.go Outdated Show resolved Hide resolved
bindings_test.go Show resolved Hide resolved
bindings_test.go Outdated Show resolved Hide resolved
bindings_test.go Outdated Show resolved Hide resolved
bindings_test.go Outdated Show resolved Hide resolved
converter.go Outdated Show resolved Hide resolved
bindings_test.go Outdated
@@ -1423,3 +1547,11 @@ func testInsertLOBData(t *testing.T, useArrowFormat bool, isLiteral bool) {
dbt.mustExec(unsetFeatureMaxLOBSize)
})
}

func getRandomDate() time.Time {
return time.Date(rand.Intn(1700)+1, time.January, rand.Intn(40), rand.Intn(40), rand.Intn(40), rand.Intn(40), rand.Intn(40), time.UTC)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why date is > 1700? we should test also values below 1582 (julian to gregorian calendar switch)

Copy link
Collaborator Author

@sfc-gh-ext-simba-jy sfc-gh-ext-simba-jy Feb 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I reproduced the error, the time shift occurred in the year before 1700/1/1 as far as I remember. However, we can use 1582 in this case. I replaced the value. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants