Class: Altertable::Lakehouse::Models::ExplainResponse

Inherits:
Request
  • Object
show all
Defined in:
lib/altertable/lakehouse/models.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Request

#to_h

Constructor Details

#initialize(tables:, statement:, connections_errors:, error: nil, plan: nil, scanned_bytes_estimate: nil, scanned_files_estimate: nil, total_bytes: nil, total_files: nil) ⇒ ExplainResponse

Returns a new instance of ExplainResponse.



299
300
301
302
303
304
305
306
307
308
309
310
311
# File 'lib/altertable/lakehouse/models.rb', line 299

def initialize(tables:, statement:, connections_errors:, error: nil, plan: nil,
               scanned_bytes_estimate: nil, scanned_files_estimate: nil,
               total_bytes: nil, total_files: nil)
  @tables = tables
  @statement = statement
  @connections_errors = connections_errors
  @error = error
  @plan = plan
  @scanned_bytes_estimate = scanned_bytes_estimate
  @scanned_files_estimate = scanned_files_estimate
  @total_bytes = total_bytes
  @total_files = total_files
end

Instance Attribute Details

#connections_errorsObject (readonly)

Returns the value of attribute connections_errors.



296
297
298
# File 'lib/altertable/lakehouse/models.rb', line 296

def connections_errors
  @connections_errors
end

#errorObject (readonly)

Returns the value of attribute error.



296
297
298
# File 'lib/altertable/lakehouse/models.rb', line 296

def error
  @error
end

#planObject (readonly)

Returns the value of attribute plan.



296
297
298
# File 'lib/altertable/lakehouse/models.rb', line 296

def plan
  @plan
end

#scanned_bytes_estimateObject (readonly)

Returns the value of attribute scanned_bytes_estimate.



296
297
298
# File 'lib/altertable/lakehouse/models.rb', line 296

def scanned_bytes_estimate
  @scanned_bytes_estimate
end

#scanned_files_estimateObject (readonly)

Returns the value of attribute scanned_files_estimate.



296
297
298
# File 'lib/altertable/lakehouse/models.rb', line 296

def scanned_files_estimate
  @scanned_files_estimate
end

#statementObject (readonly)

Returns the value of attribute statement.



296
297
298
# File 'lib/altertable/lakehouse/models.rb', line 296

def statement
  @statement
end

#tablesObject (readonly)

Returns the value of attribute tables.



296
297
298
# File 'lib/altertable/lakehouse/models.rb', line 296

def tables
  @tables
end

#total_bytesObject (readonly)

Returns the value of attribute total_bytes.



296
297
298
# File 'lib/altertable/lakehouse/models.rb', line 296

def total_bytes
  @total_bytes
end

#total_filesObject (readonly)

Returns the value of attribute total_files.



296
297
298
# File 'lib/altertable/lakehouse/models.rb', line 296

def total_files
  @total_files
end

Class Method Details

.from_h(h) ⇒ Object



313
314
315
316
317
318
319
320
321
322
323
324
325
# File 'lib/altertable/lakehouse/models.rb', line 313

def self.from_h(h)
  new(
    tables: Array(h["tables"]).map { |table| TableScanEstimate.from_h(table) },
    statement: h["statement"],
    connections_errors: h["connections_errors"] || {},
    error: h["error"],
    plan: h["plan"],
    scanned_bytes_estimate: h["scanned_bytes_estimate"],
    scanned_files_estimate: h["scanned_files_estimate"],
    total_bytes: h["total_bytes"],
    total_files: h["total_files"]
  )
end