Skip to content

Commit

Permalink
[FLINK-18434] Fix getter methods of AbstractJdbcCatalog
Browse files Browse the repository at this point in the history
  • Loading branch information
dawidwys committed Jul 10, 2020
1 parent e5bf5dc commit f2b6608
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,12 @@ public List<CatalogPartitionSpec> listPartitionsByFilter(ObjectPath tablePath, L

@Override
public CatalogPartition getPartition(ObjectPath tablePath, CatalogPartitionSpec partitionSpec) throws PartitionNotExistException, CatalogException {
throw new UnsupportedOperationException();
throw new PartitionNotExistException(getName(), tablePath, partitionSpec);
}

@Override
public boolean partitionExists(ObjectPath tablePath, CatalogPartitionSpec partitionSpec) throws CatalogException {
throw new UnsupportedOperationException();
return false;
}

@Override
Expand All @@ -258,12 +258,12 @@ public List<String> listFunctions(String dbName) throws DatabaseNotExistExceptio

@Override
public CatalogFunction getFunction(ObjectPath functionPath) throws FunctionNotExistException, CatalogException {
throw new UnsupportedOperationException();
throw new FunctionNotExistException(getName(), functionPath);
}

@Override
public boolean functionExists(ObjectPath functionPath) throws CatalogException {
throw new UnsupportedOperationException();
return false;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ public void setup() {
tEnv.useCatalog(TEST_CATALOG_NAME);
}

@Test
public void testSelectField() {
List<Row> results = Lists.newArrayList(
tEnv.sqlQuery(String.format("select id from %s", TABLE1)).execute().collect());
assertEquals("[1]", results.toString());
}

@Test
public void testWithoutSchema() {
List<Row> results = Lists.newArrayList(
Expand Down

0 comments on commit f2b6608

Please sign in to comment.