When you use AS to rename a column in SQL it creates a label for the column that is different than name. For PgSQL driver and some others, it is not important, getColumnLabel is delegated to getColumnLabel when getting column meta data from ResultsetMetadata. But for MariaDB this is not the case. And for MySQL when useOldAliasBehavior flag is false label and name are different.
For MariaDB, when we try to retrieve value of a column using rs.getBigInt(String), string is interpreted as column label, not name. So passing column name cause column not found error. It doesn't fallback to column name when it can resolve a label.
When processing metadata to retrieve columns we should get their labels, not names. Because we pass this to rs.getInt etc. methods which interpret them as label (for marinade).