private bool CheckQueryCondition(string tableName, int?maxVersions, DataModel.TimeRange timeRange)
        {
            if (maxVersions.HasValue && timeRange != null)
            {
                throw new OTSException("Error, MaxVersions and TimeRange can NOT be specified at the same time. Table name:" + tableName);
            }

            if (!maxVersions.HasValue && timeRange == null)
            {
                return(false);
            }

            return(true);
        }
        private static PB.TimeRange EncodeTimeRange(DataModel.TimeRange timeRange)
        {
            PB.TimeRange.Builder builder = PB.TimeRange.CreateBuilder();
            if (timeRange.SpecificTime.HasValue)
            {
                builder.SetSpecificTime(timeRange.SpecificTime.Value);
            }
            else
            {
                builder.SetStartTime(timeRange.StartTime.Value);
                builder.SetEndTime(timeRange.EndTime.Value);
            }

            return(builder.Build());
        }