func (c *conn) startQuery(query string) (string, error) {
	resp, err := c.athena.StartQueryExecution(&athena.StartQueryExecutionInput{
		QueryString: aws.String(query),
		QueryExecutionContext: &athena.QueryExecutionContext{
			Database: aws.String(c.db),
		},
		ResultConfiguration: &athena.ResultConfiguration{
			OutputLocation: aws.String(c.OutputLocation),
		},
	})
	if err != nil {
		return "", err
	}
	return *resp.QueryExecutionId, nil
}
startQuery starts an Athena query and returns its ID.
package athena
import (
	"context"
	"database/sql/driver"
	"errors"
	"time"
	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/service/athena"
	"github.com/aws/aws-sdk-go/service/athena/athenaiface"
)
type conn struct {
	athena         athenaiface.AthenaAPI
	db             string
	OutputLocation string
	pollFrequency time.Duration
}
func (c *conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) {
	if len(args) > 0 {
		panic("Athena doesn't support prepared statements. Format your own arguments.")
	}
	rows, err := c.runQuery(ctx, query)
	return rows, err
}
func (c *conn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) {
	if len(args) > 0 {
		panic("Athena doesn't support prepared statements. Format your own arguments.")
	}
	_, err := c.runQuery(ctx, query)
	return nil, err
}
func (c *conn) runQuery(ctx context.Context, query string) (driver.Rows, error) {
	queryID, err := c.startQuery(query)
	if err != nil {
		return nil, err
	}
	if err := c.waitOnQuery(ctx, queryID); err != nil {
		return nil, err
	}
	return newRows(rowsConfig{
		Athena:  c.athena,
		QueryID: queryID,
		SkipHeader: true,
	})
}