Skip to content

Commit

Permalink
[native] Use velox exception instead of std exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
Amit Dutta authored and amitkdutta committed Nov 8, 2022
1 parent 79b2d04 commit 352c8a2
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ connector::hive::HiveColumnHandle::ColumnType toHiveColumnType(
case protocol::ColumnType::SYNTHESIZED:
return connector::hive::HiveColumnHandle::ColumnType::kSynthesized;
default:
throw std::invalid_argument("Unknown Hive column type");
VELOX_UNSUPPORTED("Unknown Hive column type");
}
}

Expand All @@ -97,7 +97,7 @@ std::shared_ptr<connector::ColumnHandle> toColumnHandle(
tpchColumn->columnName);
}

throw std::invalid_argument("Unknown column handle type: " + column->_type);
VELOX_UNSUPPORTED("Unknown column handle type:{}", column->_type);
}

connector::hive::LocationHandle::TableType toTableType(
Expand All @@ -110,7 +110,7 @@ connector::hive::LocationHandle::TableType toTableType(
case protocol::TableType::TEMPORARY:
return connector::hive::LocationHandle::TableType::kTemporary;
default:
throw std::invalid_argument("Unknown table type");
VELOX_UNSUPPORTED("Unknown table type");
}
}

Expand All @@ -127,7 +127,7 @@ connector::hive::LocationHandle::WriteMode toWriteMode(
return connector::hive::LocationHandle::WriteMode::
kDirectToTargetExistingDirectory;
default:
throw std::invalid_argument("Unknown write mode");
VELOX_UNSUPPORTED("Unknown write mode");
}
}

Expand Down Expand Up @@ -665,7 +665,7 @@ std::shared_ptr<connector::ConnectorTableHandle> toConnectorTableHandle(
tpch::fromTableName(tpchLayout->table.tableName),
tpchLayout->table.scaleFactor);
}
throw std::invalid_argument("Unsupported TableHandle type");
VELOX_UNSUPPORTED("Unsupported TableHandle type");
}

std::vector<core::TypedExprPtr> getProjections(
Expand Down Expand Up @@ -696,7 +696,7 @@ void setCellFromVariantByKind<TypeKind::VARBINARY>(
const VectorPtr& /*column*/,
vector_size_t /*row*/,
const velox::variant& value) {
throw std::invalid_argument("Return of VARBINARY data is not supported");
VELOX_UNSUPPORTED("Return of VARBINARY data is not supported");
}

template <>
Expand Down Expand Up @@ -749,7 +749,7 @@ core::SortOrder toVeloxSortOrder(const protocol::SortOrder& sortOrder) {
case protocol::SortOrder::DESC_NULLS_LAST:
return core::SortOrder(false, false);
default:
throw std::invalid_argument("Unknown sort order");
VELOX_UNSUPPORTED("Unknown sort order");
}
}

Expand Down

0 comments on commit 352c8a2

Please sign in to comment.