Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-1818

SqlEntityProcessor should do something (like throw an error) if DOT_PATTERN is not matched

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Won't Fix
    • None
    • None
    • None

    Description

      Looking like we should do something if DOT_PATTERN does not match a primary key (rather then get the resulting nullpointer exception) - I'm not really up on DIH, so I'm not sure if that is something we never expect to see, but even in that case it might be nice to add an else throw illegalstate or something with a "we should never get here" comment - just for future DIH devs.

            Object val = context.resolve("dataimporter.delta." + primaryKey);
            if (val == null) {
              Matcher m = DOT_PATTERN.matcher(primaryKey);
              if (m.find()) {
                val = context.resolve("dataimporter.delta." + m.group(1));
              }
            }
            sb.append(primaryKey).append(" = ");
            if (val instanceof Number) {
              sb.append(val.toString());
            } else {
              sb.append("'").append(val.toString()).append("'");
            }
      

      Attachments

        Issue Links

          Activity

            People

              jdyer James Dyer
              markrmiller@gmail.com Mark Miller
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: