-
Notifications
You must be signed in to change notification settings - Fork 98
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-1649161 Fix NaN value handling in schematization #920
Conversation
9d85b23
to
62ab727
Compare
import org.junit.jupiter.params.provider.Arguments; | ||
import org.junit.jupiter.params.provider.MethodSource; | ||
|
||
public class SnowflakeSinkServiceV2AvroSchematizationIT { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic of this test is the same as before with added NaN
field. A couple of things I fixed here:
- Use String constants to avoid typos
- Use awaitility instead of custom code
- Use
StringUtils.deleteWhitespace
instead of custom code - Use JUnit assertions instead of assert
- Use Junit
@BeforeEach
/@AfterEach
- Restructure the code to have a given / when / then
- Move test data to test class
- Make assertion explicit (if you have doubts take a look at what happens in
checkTableContentOneRow()
)
So while it still can be better please keep your review bar at reasonable level here :)
@@ -204,6 +204,5 @@ if [ $testError -ne 0 ]; then | |||
RED='\033[0;31m' | |||
NC='\033[0m' # No Color | |||
echo -e "${RED} There is error above this line ${NC}" | |||
cat $APACHE_LOG_PATH/kc.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we need it at all. Printing 10k log lines might be useful in CI but for local development it makes things worse.
62ab727
to
2d2fda9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Overview
SNOW-1649161
Special floating point value
NaN
was causing exception with schematization enabled. The reason for this failure was parsing data to an intermediate JsonNode format and then callingwriteValueAsString
which returned""NaN""
.This PR contains:
NaN
working in Snowpipe / Snowpipe Streaming ingestionPre-review checklist
snowflake.ingestion.method
.Yes
- Added end to end and Unit Tests.No
- Suggest why it is not param protected