Skip to content

feat(bigquery): Add new fields to JobStatistics#11607

Closed
klondikedragon wants to merge 2 commits into
googleapis:mainfrom
klondikedragon:bigquery-jobstats-reservation-id
Closed

feat(bigquery): Add new fields to JobStatistics#11607
klondikedragon wants to merge 2 commits into
googleapis:mainfrom
klondikedragon:bigquery-jobstats-reservation-id

Conversation

@klondikedragon

Copy link
Copy Markdown

Add ReservationId, TotalSlotMs, FinalExecutionDurationMs fields to JobStatistics. These are already populated in the auto-generated struct receiving the API response, but were not being propagated to this struct.

Also update the comment for ReservationUsage based on latest API docs.

Add ReservationId, TotalSlotMs, FinalExecutionDurationMs fields to
JobStatistics. These are already populated in the auto-generated
struct receiving the API response, but were not being propagated
to this struct.

Also update the comment for ReservationUsage based on latest API docs.
@klondikedragon klondikedragon requested review from a team and whuffman36 February 19, 2025 03:31
@product-auto-label product-auto-label Bot added the api: bigquery Issues related to the BigQuery API. label Feb 19, 2025
@klondikedragon klondikedragon force-pushed the bigquery-jobstats-reservation-id branch from 4fa7aaa to 6c5c658 Compare February 19, 2025 04:24
@alvarowolfx alvarowolfx self-assigned this Mar 11, 2025
@ash-ddog

Copy link
Copy Markdown
Contributor

+1, was going to open a feature request for ReservationID but found this one. 🙏

@shollyman shollyman requested review from alvarowolfx and shollyman and removed request for whuffman36 March 22, 2025 03:12

@alvarowolfx alvarowolfx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nit on preferring usage of custom types for enum like fields.

Comment thread bigquery/job.go
// "STANDARD" - Standard edition.
// "ENTERPRISE" - Enterprise edition.
// "ENTERPRISE_PLUS" - Enterprise Plus edition.
Edition string

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For those kind of fields, usually we created a custom enum like type to represent the available values, can you change that ?

Suggested change
Edition string
Edition ReservationEdition

and add the new enum like type:

// ReservationEdition is used to specify the name of edition corresponding to the reservation.
type ReservationEdition string

var (

	// UnspecifiedReservationEdtion is the default value, which will be treated as EnterpriseReservationEdition
	UnspecifiedReservationEdition ReservationEdition = "RESERVATION_EDITION_UNSPECIFIED"
        
	// EnterpriseReservationEdition represents the Standard edition.
	StandardReservationEdition ReservationEdition = "STANDARD"
	
        // EnterpriseReservationEdition represents the Enterprise edition.
	EnterpriseReservationEdition ReservationEdition = "ENTERPRISE"
	
       	// EnterprisePlusReservationEdition represents the Enterprise Plus edition.
	EnterprisePlusReservationEdition ReservationEdition = "ENTERPRISE_PLUS"
)

@ash-ddog

ash-ddog commented May 5, 2025

Copy link
Copy Markdown
Contributor

minor nit on preferring usage of custom types for enum like fields.

Thanks for taking a look @alvarowolfx

@klondikedragon I know it's been a while but let us know if you're planning on making the changes. If not I'm happy to as I'm also awaiting these changes. 🙏

@ash-ddog

ash-ddog commented May 7, 2025

Copy link
Copy Markdown
Contributor

FYI this PR is stale so I think we can close it and merge #12212 🙏

@alvarowolfx

Copy link
Copy Markdown
Contributor

superseded by #12212

@alvarowolfx alvarowolfx closed this May 8, 2025
@klondikedragon

Copy link
Copy Markdown
Author

@ash-ddog thanks for cleaning this up and making the changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the BigQuery API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants