diff --git a/src/common/src/texpr.c b/src/common/src/texpr.c index 96bc03fd0898c14980a7d1137e30bd542de346c8..8f7056cc7dc938c3d37fa748127259cf6b8619fa 100644 --- a/src/common/src/texpr.c +++ b/src/common/src/texpr.c @@ -2029,9 +2029,9 @@ void vectorTimeFunc(int16_t functionId, tExprOperandInfo *pInputs, int32_t numIn if (tsDigits == TSDB_TIME_PRECISION_MILLI_DIGITS) { timeVal = timeVal; } else if (tsDigits == TSDB_TIME_PRECISION_MICRO_DIGITS) { - timeVal = timeVal / (1000 * 1000) * (1000 * 1000); + timeVal = timeVal / (1000000) * (1000000); } else if (tsDigits == TSDB_TIME_PRECISION_NANO_DIGITS) { - timeVal = timeVal / (1000 * 1000 * 1000) * (1000 * 1000 * 1000); + timeVal = timeVal / (1000000000) * (1000000000); } else if (tsDigits <= TSDB_TIME_PRECISION_SEC_DIGITS){ timeVal = timeVal * factor; } else { @@ -2043,9 +2043,9 @@ void vectorTimeFunc(int16_t functionId, tExprOperandInfo *pInputs, int32_t numIn if (tsDigits == TSDB_TIME_PRECISION_MILLI_DIGITS) { timeVal = timeVal / 1000 * 1000; } else if (tsDigits == TSDB_TIME_PRECISION_MICRO_DIGITS) { - timeVal = timeVal / (1000 * 1000) * (1000 * 1000); + timeVal = timeVal / (1000000) * (1000000); } else if (tsDigits == TSDB_TIME_PRECISION_NANO_DIGITS) { - timeVal = timeVal / (1000 * 1000 * 1000) * (1000 * 1000 * 1000); + timeVal = timeVal / (1000000000) * (1000000000); } else if (tsDigits <= TSDB_TIME_PRECISION_SEC_DIGITS) { timeVal = timeVal * factor; } else { @@ -2057,9 +2057,9 @@ void vectorTimeFunc(int16_t functionId, tExprOperandInfo *pInputs, int32_t numIn if (tsDigits == TSDB_TIME_PRECISION_MILLI_DIGITS) { timeVal = timeVal / 1000 / 60 * 60 * 1000; } else if (tsDigits == TSDB_TIME_PRECISION_MICRO_DIGITS) { - timeVal = timeVal / (1000 * 1000) / 60 * 60 * (1000 * 1000); + timeVal = timeVal / (1000000) / 60 * 60 * (1000000); } else if (tsDigits == TSDB_TIME_PRECISION_NANO_DIGITS) { - timeVal = timeVal / (1000 * 1000 * 1000) / 60 * 60 * (1000 * 1000 * 1000); + timeVal = timeVal / (1000000000) / 60 * 60 * (1000000000); } else if (tsDigits <= TSDB_TIME_PRECISION_SEC_DIGITS) { timeVal = timeVal * factor / factor / 60 * 60 * factor; } else { @@ -2071,9 +2071,9 @@ void vectorTimeFunc(int16_t functionId, tExprOperandInfo *pInputs, int32_t numIn if (tsDigits == TSDB_TIME_PRECISION_MILLI_DIGITS) { timeVal = timeVal / 1000 / 3600 * 3600 * 1000; } else if (tsDigits == TSDB_TIME_PRECISION_MICRO_DIGITS) { - timeVal = timeVal / (1000 * 1000) / 3600 * 3600 * (1000 * 1000); + timeVal = timeVal / (1000000) / 3600 * 3600 * (1000000); } else if (tsDigits == TSDB_TIME_PRECISION_NANO_DIGITS) { - timeVal = timeVal / (1000 * 1000 * 1000) / 3600 * 3600 * (1000 * 1000 * 1000); + timeVal = timeVal / (1000000000) / 3600 * 3600 * (1000000000); } else if (tsDigits <= TSDB_TIME_PRECISION_SEC_DIGITS) { timeVal = timeVal * factor / factor / 3600 * 3600 * factor; } else { @@ -2085,9 +2085,9 @@ void vectorTimeFunc(int16_t functionId, tExprOperandInfo *pInputs, int32_t numIn if (tsDigits == TSDB_TIME_PRECISION_MILLI_DIGITS) { timeVal = timeVal / 1000 / 86400 * 86400 * 1000; } else if (tsDigits == TSDB_TIME_PRECISION_MICRO_DIGITS) { - timeVal = timeVal / (1000 * 1000) / 86400 * 86400 * (1000 * 1000); + timeVal = timeVal / (1000000) / 86400 * 86400 * (1000000); } else if (tsDigits == TSDB_TIME_PRECISION_NANO_DIGITS) { - timeVal = timeVal / (1000 * 1000 * 1000) / 86400 * 86400 * (1000 * 1000 * 1000); + timeVal = timeVal / (1000000000) / 86400 * 86400 * (1000000000); } else if (tsDigits <= TSDB_TIME_PRECISION_SEC_DIGITS) { timeVal = timeVal * factor / factor / 86400* 86400 * factor; } else {