Skip to content

Commit

Permalink
added test for querying native/unsupported data types in Postgres and…
Browse files Browse the repository at this point in the history
… updated release notes;

Refs prestodb#4082
  • Loading branch information
albertocsm committed Dec 16, 2015
1 parent 0096a00 commit 39f24dd
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions presto-docs/src/main/sphinx/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Release Notes
.. toctree::
:maxdepth: 1

release/release-0.131
release/release-0.130
release/release-0.129
release/release-0.128
Expand Down
8 changes: 8 additions & 0 deletions presto-docs/src/main/sphinx/release/release-0.131.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
=============
Release 0.131
=============

General Changes
---------------

* Fallback to varchar for unkown Jdbc data types.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import static com.facebook.presto.plugin.postgresql.PostgreSqlQueryRunner.createPostgreSqlQueryRunner;
import static io.airlift.testing.Closeables.closeAllRuntimeException;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;

Expand Down Expand Up @@ -78,6 +79,24 @@ public void testViews()
execute("DROP VIEW IF EXISTS tpch.test_view");
}

@Test
public void testSelectNativeDataTypeColumn()
throws Exception
{
execute("CREATE TABLE tpch.test_other_data_type (_foo UUID)");
assertTrue(queryRunner.tableExists(getSession(), "test_other_data_type"));

execute("INSERT INTO tpch.test_other_data_type VALUES ('00000000-0000-0000-0000-000000000000')");
assertEquals(
queryRunner
.execute(getSession(), "SELECT _foo from test_other_data_type")
.getRowCount(),
1);

execute("DROP TABLE IF EXISTS tpch.test_other_data_type");
assertFalse(queryRunner.tableExists(getSession(), "test_other_data_type"));
}

private void execute(String sql)
throws SQLException
{
Expand Down

0 comments on commit 39f24dd

Please sign in to comment.