You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: parse.go
    path of file: ./repos/erda/internal/tools/monitor/core/metric/query/es-tsql/influxql
    
    the code of the file until where you have to start completion: // Copyright (c) 2021 Terminus, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, sof
    
func getLiteralValue(ctx *Context, expr influxql.Expr) (interface{}, bool, error) {
	switch val := expr.(type) {
	case *influxql.IntegerLiteral:
		return val.Val, true, nil
	case *influxql.NumberLiteral:
		return val.Val, true, nil
	case *influxql.UnsignedLiteral:
		return val.Val, true, nil
	case *influxql.BooleanLiteral:
		if val.Val {
			return true, true, nil
		} else {
			return false, true, nil
		}
	case *influxql.StringLiteral:
		return val.Val, true, nil
	case *influxql.DurationLiteral:
		return int64(val.Val), true, nil
	case *influxql.TimeLiteral:
		return val.Val.UnixNano(), true, nil
	case *influxql.RegexLiteral:
		return val.Val, true, nil
	case *influxql.NilLiteral:
		return nil, true, nil
	case *influxql.ListLiteral:
		return val.Vals, true, nil
	case *influxql.Call:
		return getLiteralFuncValue(ctx, val)
	case *influxql.BinaryExpr:
		lv, ok, err := getLiteralValue(ctx, val.LHS)
		if err != nil {
			return nil, false, err
		}
		if !ok {
			return nil, false, nil
		}
		rv, ok, err := getLiteralValue(ctx, val.RHS)
		if err != nil {
			return nil, false, err
		}
		if !ok {
			return nil, false, nil
		}
		v, err := tsql.OperateValues(lv, toOperator(val.Op), rv)
		if err != nil {
			return nil, false, err
		}
		return v, true, nil
	case *influxql.ParenExpr:
		return getLiteralValue(ctx, val.Expr)
	}
	return nil, false, nil
}