Skip to content

Commit cff03ba

Browse files
author
Ben Osheroff
committed
support REAL column types
these are sql-syntax aliases for 'double' types
1 parent 87ee756 commit cff03ba

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/main/java/com/zendesk/maxwell/schema/columndef/ColumnDef.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ public static ColumnDef build(String tableName, String name, String encoding, St
5555
case "mediumblob":
5656
case "longblob":
5757
return new StringColumnDef(tableName, name, type, pos, "binary");
58+
case "real":
59+
type = "double";
60+
// fall through
5861
case "float":
5962
case "double":
6063
return new FloatColumnDef(tableName, name, type, pos);

src/test/java/com/zendesk/maxwell/schema/ddl/DDLIntegrationTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,4 +163,13 @@ public void testBooleans() throws Exception {
163163

164164
testIntegration(sql);
165165
}
166+
167+
@Test
168+
public void testReals() throws Exception {
169+
String sql[] = {
170+
"create TABLE `test_reals` ( r1 REAL, b2 REAL (2,2) )"
171+
};
172+
173+
testIntegration(sql);
174+
}
166175
}

0 commit comments

Comments
 (0)