Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -981,15 +981,20 @@ public void addColumnNameBinding(Table table, Identifier logicalName, Column col

@Override
public String getPhysicalColumnName(Table table, String logicalName) throws MappingException {
return getPhysicalColumnName( table, getDatabase().toIdentifier( logicalName ) );
Identifier logicalColumnIdentifier = getDatabase().toIdentifier(logicalName);
if (logicalColumnIdentifier == null) {
throw new MappingException( String.format(
Locale.ENGLISH,
"Column with logical name \"[%s]\" in table [%s] cannot be mapped to column identifier.",
logicalName,
table.getName()
) );
}
return getPhysicalColumnName( table, logicalColumnIdentifier);
}

@Override
public String getPhysicalColumnName(Table table, Identifier logicalName) throws MappingException {
if ( logicalName == null ) {
throw new MappingException( "Logical column name cannot be null" );
}

Table currentTable = table;
String physicalName = null;

Expand Down