arjansh commented on a change in pull request #239: METAMODEL-1224: Fixed 
PostgreSQL compatibility (upgrading driver+tests)
URL: https://github.com/apache/metamodel/pull/239#discussion_r396966132
 
 

 ##########
 File path: 
jdbc/src/test/java/org/apache/metamodel/jdbc/dialects/PostgresqlQueryRewriterTest.java
 ##########
 @@ -46,4 +52,18 @@ public void testInsertNullMap() throws SQLException {
 
         EasyMock.verify(statementMock);
     }
+    
+    @Test
+    public void testApproximateCountQueryAndBlankSchemaName() {
+        final SelectItem selectItem = SelectItem.getCountAllItem();
+        selectItem.setFunctionApproximationAllowed(true);
+        final Query query = new Query();
+        query.select(selectItem);
+        query.from(new MutableTable("tbl").setSchema(new MutableSchema("")));
+        assertEquals("SELECT APPROXIMATE COUNT(*) FROM tbl", query.toSql());
+        
 
 Review comment:
   Again, not sure about the code style conventions, but lines 55 and 64 
contain trailing spaces (which for some reason aren't visible in the browser 
view), can you remove these?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to