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

[SDENT 180] support for fail fast type casting #1542

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

Conversation

vatsalmevada
Copy link
Contributor

@vatsalmevada vatsalmevada commented Mar 27, 2020

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 casting
failure 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 for
casting failures, the query will be failed altogether whenever first type cast
error occurs.

The configuration property is snappydata.failOnCastError which defaults
to 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

  • added new tests

Other PRs

TIBCOSoftware/snappy-spark#201

Vatsal Mevada added 3 commits March 24, 2020 15:23
conversions based on configuration property
`snappydata.failFastTypeCasting`.
instead of using generic RuntimeException
- Adding tests for more scenarios
Copy link

@kneeraj kneeraj left a 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?

@vatsalmevada
Copy link
Contributor Author

vatsalmevada commented Mar 27, 2020

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.

@sumwale sumwale force-pushed the master branch 2 times, most recently from a466d26 to ea127bd Compare April 12, 2022 10:05
@sumwale sumwale force-pushed the master branch 2 times, most recently from 99ec79c to c7b84fa Compare June 12, 2022 04:19
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.

None yet

2 participants