Skip to content
Snippets Groups Projects
Commit 5634fadb authored by vinodkc's avatar vinodkc Committed by gatorsmile
Browse files

[SPARK-21588][SQL] SQLContext.getConf(key, null) should return null


## What changes were proposed in this pull request?

In SQLContext.get(key,null) for a key that is not defined in the conf, and doesn't have a default value defined, throws a NPE. Int happens only when conf has a value converter

Added null check on defaultValue inside SQLConf.getConfString to avoid calling entry.valueConverter(defaultValue)

## How was this patch tested?
Added unit test

Author: vinodkc <vinod.kc.in@gmail.com>

Closes #18852 from vinodkc/br_Fix_SPARK-21588.

(cherry picked from commit 1ba967b2)
Signed-off-by: default avatargatorsmile <gatorsmile@gmail.com>
parent 734b144d
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment