Class: Parquet::Schema
- Inherits:
-
Object
- Object
- Parquet::Schema
- Defined in:
- lib/parquet/schema.rb
Overview
Schema definition for Parquet files
Defined Under Namespace
Classes: SchemaBuilder
Class Method Summary collapse
-
.define(&block) ⇒ Hash
Define a new schema using the DSL.
Class Method Details
.define(&block) ⇒ Hash
Define a new schema using the DSL
33 34 35 36 37 38 39 |
# File 'lib/parquet/schema.rb', line 33 def self.define(&block) builder = SchemaBuilder.new builder.instance_eval(&block) # Return a structured hash representing the schema { type: :struct, fields: builder.fields } end |