calcite
calcite copied to clipboard
[CALCITE-4025] Fix early exit in DelegatingScope#fullyQualify
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).
LGTM, except I would "" empty string instead of null
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).