-
Notifications
You must be signed in to change notification settings - Fork 200
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
[SDENT 180] support for fail fast type casting #1542
base: master
Are you sure you want to change the base?
Conversation
conversions based on configuration property `snappydata.failFastTypeCasting`.
instead of using generic RuntimeException - Adding tests for more scenarios
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.
Can you please add just one test for cluster and set the property on jdbc connection and check if all looks good.
Also why have you named in 'fail fast'? Just 'fail on cast error'. Curious?
@kneeraj To keep it shorter. Also it depicted the overall behaviour which is opposite of the existing "fail safe" behaviour. I am fine with "fail on cast error" too if "fail fast" sounds confusing. |
8b43301
to
2b254d9
Compare
2c254f0
to
0f2888f
Compare
a466d26
to
ea127bd
Compare
99ec79c
to
c7b84fa
Compare
Changes proposed in this pull request
Apache Spark handles type casting failures in a fail safe manner. Instead of
failing the entire query, Spark populates
null
values whenever type castingfailure occurs. Snappydata inherits the same behavior from Spark.
With this changes we are exposing a session level configuration to enable fail
fast behaviour for casting errors. i.e. instead of returning
null
values forcasting failures, the query will be failed altogether whenever first type cast
error occurs.
The configuration property is
snappydata.failOnCastError
which defaultsto
false
. Setting this property true will turn on fail fast casting behaviour.Note that these changes won't be available on smart connector mode as the
changes are done at the Spark layer.
Patch testing
Other PRs
TIBCOSoftware/snappy-spark#201