#pragma once #include #include #include #include #include #include namespace NYT::NYson { struct IYsonConsumer; } // namespace NYT::NYson namespace NYT { struct TClientContext; enum class ENodeReaderFormat : int; namespace NDetail { //////////////////////////////////////////////////////////////////////////////// struct TCreateSkiffSchemaOptions { using TSelf = TCreateSkiffSchemaOptions; FLUENT_FIELD_DEFAULT(bool, HasKeySwitch, false); FLUENT_FIELD_DEFAULT(bool, HasRangeIndex, false); using TRenameColumnsDescriptor = THashMap; FLUENT_FIELD_OPTION(TRenameColumnsDescriptor, RenameColumns); }; //////////////////////////////////////////////////////////////////////////////// NSkiff::TSkiffSchemaPtr CreateSkiffSchema( const TVector& tableSchemas, const TCreateSkiffSchemaOptions& options); NSkiff::TSkiffSchemaPtr GetJobInputSkiffSchema(); NSkiff::EWireType ValueTypeToSkiffType(EValueType valueType); NSkiff::TSkiffSchemaPtr CreateSkiffSchema( const TTableSchema& schema, const TCreateSkiffSchemaOptions& options = TCreateSkiffSchemaOptions()); NSkiff::TSkiffSchemaPtr CreateSkiffSchema( const TNode& schemaNode, const TCreateSkiffSchemaOptions& options = TCreateSkiffSchemaOptions()); void Serialize(const NSkiff::TSkiffSchemaPtr& schema, NYson::IYsonConsumer* consumer); void Deserialize(NSkiff::TSkiffSchemaPtr& schema, const TNode& node); TFormat CreateSkiffFormat(const NSkiff::TSkiffSchemaPtr& schema); NSkiff::TSkiffSchemaPtr CreateSkiffSchemaIfNecessary( const TClientContext& context, const IClientRetryPolicyPtr& clientRetryPolicy, const TTransactionId& transactionId, ENodeReaderFormat nodeReaderFormat, const TVector& tablePaths, const TCreateSkiffSchemaOptions& options = TCreateSkiffSchemaOptions()); //////////////////////////////////////////////////////////////////////////////// } // namespace NDetail } // namespace NYT