Skip to content

Commit

Permalink
Revert the change for Bridge.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILO-HE committed Feb 11, 2024
1 parent 1defcce commit 214198b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions velox/vector/arrow/Bridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,6 @@ const char* exportArrowFormatStr(
return "+m"; // map
case TypeKind::ROW:
return "+s"; // struct
case TypeKind::UNKNOWN:
return "n";

default:
VELOX_NYI("Unable to map type '{}' to ArrowSchema.", type->kind());
Expand Down Expand Up @@ -600,7 +598,6 @@ void exportFlat(
case TypeKind::REAL:
case TypeKind::DOUBLE:
case TypeKind::TIMESTAMP:
case TypeKind::UNKNOWN:
exportValues(vec, rows, out, pool, holder);
break;
case TypeKind::VARCHAR:
Expand Down Expand Up @@ -943,8 +940,6 @@ TypePtr importFromArrowImpl(
return REAL();
case 'g':
return DOUBLE();
case 'n':
return UNKNOWN();

// Map both utf-8 and large utf-8 string to varchar.
case 'u':
Expand Down
2 changes: 1 addition & 1 deletion velox/vector/arrow/tests/ArrowBridgeSchemaTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ TEST_F(ArrowBridgeSchemaExportTest, constant) {
}

TEST_F(ArrowBridgeSchemaExportTest, unsupported) {
GTEST_SKIP() << "Skipping it, cause unknown type supported";
// Try some combination of unsupported types to ensure there's no crash or
// memory leak in failure scenarios.
EXPECT_THROW(testScalarType(UNKNOWN(), ""), VeloxException);
Expand Down Expand Up @@ -396,6 +395,7 @@ TEST_F(ArrowBridgeSchemaImportTest, complexTypes) {
}

TEST_F(ArrowBridgeSchemaImportTest, unsupported) {
EXPECT_THROW(testSchemaImport("n"), VeloxUserError);
EXPECT_THROW(testSchemaImport("C"), VeloxUserError);
EXPECT_THROW(testSchemaImport("S"), VeloxUserError);
EXPECT_THROW(testSchemaImport("I"), VeloxUserError);
Expand Down

0 comments on commit 214198b

Please sign in to comment.