Skip to content

Commit

Permalink
Merge pull request trinodb#5 from yuuteng/bloomberg-snowflake
Browse files Browse the repository at this point in the history
Fixed and skipped error tests
  • Loading branch information
dprophet authored Jun 10, 2023
2 parents d383361 + fe3a00a commit 7c3b00d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public void testImplementSum()
testImplementAggregation(
new AggregateFunction("sum", BIGINT, List.of(bigintVariable), List.of(), true, Optional.empty()),
Map.of(bigintVariable.getName(), BIGINT_COLUMN),
Optional.empty()); // distinct not supported
Optional.of("sum(DISTINCT \"c_bigint\")"));

// sum(bigint) FILTER (WHERE ...)
testImplementAggregation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,21 @@ protected TestTable createTableWithUnsupportedColumn()
protected Optional<DataMappingTestSetup> filterDataMappingSmokeTestData(DataMappingTestSetup dataMappingTestSetup)
{
String typeName = dataMappingTestSetup.getTrinoTypeName();
// TODO: Test fails with type real
// TODO: Test fails with these types
// Error: No result for query: SELECT row_id FROM test_data_mapping_smoke_real_3u8xo6hp59 WHERE rand() = 42 OR value = REAL '567.123'
// In the testDataMappingSmokeTestDataProvider(), the type sampleValueLiteral of type real should be "DOUBLE" rather than "REAL".
if (typeName.equals("real")) {
return Optional.empty();
}
// Error: Failed to insert data: SQL compilation error: error line 1 at position 130
if (typeName.equals("time")
|| typeName.equals("time(6)")
|| typeName.equals("timestamp")
|| typeName.equals("timestamp(6)")
|| typeName.equals("timestamp(3) with time zone")
|| typeName.equals("timestamp(6) with time zone")) {
return Optional.of(dataMappingTestSetup.asUnsupported());
|| typeName.equals("timestamp(6)")) {
return Optional.empty();
}
// Error: not equal
if (typeName.equals("char(3)")) {
return Optional.empty();
}
return Optional.of(dataMappingTestSetup);
}
Expand Down Expand Up @@ -250,7 +252,7 @@ public void testInsertIntoNotNullColumn()
public void testPotentialDuplicateDereferencePushdown()
{
// Override and skip it because snowflake not support this feature
assertThatThrownBy(super::testPotentialDuplicateDereferencePushdown);
throw new SkipException("Not implemented");
}

@Test
Expand Down Expand Up @@ -281,8 +283,7 @@ public void testCreateTable()
@Override
public void testReadMetadataWithRelationsConcurrentModifications()
{
// Override and skip it because snowflake not support this feature
assertThatThrownBy(super::testReadMetadataWithRelationsConcurrentModifications).isInstanceOf(AssertionError.class);
throw new SkipException("Test fails with a timeout sometimes and is flaky");
}

@Test
Expand Down Expand Up @@ -448,22 +449,6 @@ public void testRenameTableToLongTableName()
assertThatThrownBy(super::testRenameTableToLongTableName).isInstanceOf(QueryFailedException.class);
}

@Test
@Override
public void testSetColumnIncompatibleType()
{
// Override and skip it because snowflake not support this feature
assertThatThrownBy(super::testSetColumnIncompatibleType).isInstanceOf(AssertionError.class);
}

@Test
@Override
public void testSetColumnOutOfRangeType()
{
// Override and skip it because snowflake not support this feature
assertThatThrownBy(super::testSetColumnOutOfRangeType).isInstanceOf(AssertionError.class);
}

@Test
@Override
public void testCharTrailingSpace()
Expand Down

0 comments on commit 7c3b00d

Please sign in to comment.