calcite icon indicating copy to clipboard operation
calcite copied to clipboard

[CALCITE-4025] Fix early exit in DelegatingScope#fullyQualify

Open laurentgo opened this issue 5 years ago • 2 comments

Address an issue in fullyQualify method when fully qualifying an identifier and the prefix cannot be resolved but could if name matching was not case sensitive, the method would throw an exception instead of trying to continue matching smaller prefixes (in case of compound columns keys).

laurentgo avatar Aug 17 '20 21:08 laurentgo

LGTM, except I would "" empty string instead of null

zinking avatar Aug 20 '20 13:08 zinking

I'm assuming you meant for this piece of code?

      // to capture possible suggestion if no table alias found
      SqlIdentifier suggestionPrefix = null;
      String suggestionName = null;

I'm not sure why an empty string would be a better choice here. There's no safety issue, and null captures the absence of a match clearly (vs a suggestion which would be an empty table name).

laurentgo avatar Aug 20 '20 20:08 laurentgo