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

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

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_errors::Hash[untyped, untyped] (readonly)

Returns the value of attribute connections_errors.

Returns:

  • (::Hash[untyped, untyped])


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

def connections_errors
  @connections_errors
end

#errorString? (readonly)

Returns the value of attribute error.

Returns:

  • (String, nil)


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

def error
  @error
end

#planObject (readonly)

Returns the value of attribute plan.

Returns:

  • (Object)


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

def plan
  @plan
end

#scanned_bytes_estimateInteger? (readonly)

Returns the value of attribute scanned_bytes_estimate.

Returns:

  • (Integer, nil)


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

def scanned_bytes_estimate
  @scanned_bytes_estimate
end

#scanned_files_estimateInteger? (readonly)

Returns the value of attribute scanned_files_estimate.

Returns:

  • (Integer, nil)


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

def scanned_files_estimate
  @scanned_files_estimate
end

#statementString (readonly)

Returns the value of attribute statement.

Returns:

  • (String)


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

def statement
  @statement
end

#tables::Array[TableScanEstimate] (readonly)

Returns the value of attribute tables.

Returns:



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

def tables
  @tables
end

#total_bytesInteger? (readonly)

Returns the value of attribute total_bytes.

Returns:

  • (Integer, nil)


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

def total_bytes
  @total_bytes
end

#total_filesInteger? (readonly)

Returns the value of attribute total_files.

Returns:

  • (Integer, nil)


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

def total_files
  @total_files
end

Class Method Details

.from_h(h) ⇒ ExplainResponse

Parameters:

  • h (::Hash[String, untyped])

Returns:



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