Skip to content

Commit

Permalink
Add comment why disabling pushdown on MariaDB REAL type
Browse files Browse the repository at this point in the history
  • Loading branch information
ebyhr committed Dec 19, 2023
1 parent 8a3d1f9 commit 69315d9
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,8 @@ public Optional<ColumnMapping> toColumnMapping(ConnectorSession session, Connect
case Types.BIGINT:
return Optional.of(bigintColumnMapping());
case Types.REAL:
// Disable pushdown because floating-point values are approximate and not stored as exact values,
// attempts to treat them as exact in comparisons may lead to problems
return Optional.of(ColumnMapping.longMapping(
REAL,
(resultSet, columnIndex) -> floatToRawIntBits(resultSet.getFloat(columnIndex)),
Expand Down

0 comments on commit 69315d9

Please sign in to comment.