lszskye commented on code in PR #238:
URL: https://github.com/apache/paimon-cpp/pull/238#discussion_r3870709778
##########
src/paimon/core/schema/schema_validation.cpp:
##########
@@ -561,6 +562,70 @@ Status SchemaValidation::ValidateBlobFields(const
TableSchema& schema, const Cor
return Status::OK();
}
+Status SchemaValidation::ValidateMosaicDataField(const
std::shared_ptr<arrow::Field>& field) {
+ if (VariantTypeUtils::IsVariantField(field)) {
+ return Status::Invalid("Mosaic file format does not support type
VARIANT");
+ }
+ if (BlobUtils::IsBlobField(field)) {
+ return Status::Invalid("Mosaic file format does not support type
BLOB");
+ }
+
+ const std::shared_ptr<arrow::DataType>& type = field->type();
+ switch (type->id()) {
+ case arrow::Type::BOOL:
+ case arrow::Type::INT8:
+ case arrow::Type::INT16:
+ case arrow::Type::INT32:
+ case arrow::Type::INT64:
+ case arrow::Type::FLOAT:
+ case arrow::Type::DOUBLE:
+ case arrow::Type::DATE32:
+ case arrow::Type::STRING:
+ case arrow::Type::BINARY:
+ case arrow::Type::TIME32:
+ case arrow::Type::TIMESTAMP:
Review Comment:
why not reject TIMESTAMP(0) when schema validation, seems better than write
process
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]