GetStmtTimestamp retrieves the current statement timestamp as per the evaluation context. The timestamp is guaranteed to be nonzero.
()
| 2960 | // GetStmtTimestamp retrieves the current statement timestamp as per |
| 2961 | // the evaluation context. The timestamp is guaranteed to be nonzero. |
| 2962 | func (ctx *EvalContext) GetStmtTimestamp() time.Time { |
| 2963 | // TODO(knz): a zero timestamp should never be read, even during |
| 2964 | // Prepare. This will need to be addressed. |
| 2965 | if !ctx.PrepareOnly && ctx.StmtTimestamp.IsZero() { |
| 2966 | panic(errors.AssertionFailedf("zero statement timestamp in EvalContext")) |
| 2967 | } |
| 2968 | return ctx.StmtTimestamp |
| 2969 | } |
| 2970 | // |
| 2971 | //// GetClusterTimestamp retrieves the current cluster timestamp as per |
| 2972 | //// the evaluation context. The timestamp is guaranteed to be nonzero. |