Skip to content
  • Sean Owen's avatar
    8d872520
    [SPARK-16409][SQL] regexp_extract with optional groups causes NPE · 8d872520
    Sean Owen authored
    ## What changes were proposed in this pull request?
    
    regexp_extract actually returns null when it shouldn't when a regex matches but the requested optional group did not. This makes it return an empty string, as apparently designed.
    
    ## How was this patch tested?
    
    Additional unit test
    
    Author: Sean Owen <sowen@cloudera.com>
    
    Closes #14504 from srowen/SPARK-16409.
    8d872520
    [SPARK-16409][SQL] regexp_extract with optional groups causes NPE
    Sean Owen authored
    ## What changes were proposed in this pull request?
    
    regexp_extract actually returns null when it shouldn't when a regex matches but the requested optional group did not. This makes it return an empty string, as apparently designed.
    
    ## How was this patch tested?
    
    Additional unit test
    
    Author: Sean Owen <sowen@cloudera.com>
    
    Closes #14504 from srowen/SPARK-16409.
Loading