add show nchar type

This commit is contained in:
yihaoDeng 2024-04-10 08:25:51 +00:00
parent d55af6b729
commit 7288b1329a
1 changed files with 8 additions and 7 deletions

View File

@ -366,13 +366,14 @@ int8_t validColEncode(uint8_t type, uint8_t l1) {
return TSDB_COLVAL_ENCODE_DELTAD == l1 ? 1 : 0; return TSDB_COLVAL_ENCODE_DELTAD == l1 ? 1 : 0;
} else if ((type == TSDB_DATA_TYPE_VARCHAR || type == TSDB_DATA_TYPE_NCHAR) || type == TSDB_DATA_TYPE_JSON || } else if ((type == TSDB_DATA_TYPE_VARCHAR || type == TSDB_DATA_TYPE_NCHAR) || type == TSDB_DATA_TYPE_JSON ||
type == TSDB_DATA_TYPE_VARBINARY || type == TSDB_DATA_TYPE_BINARY) { type == TSDB_DATA_TYPE_VARBINARY || type == TSDB_DATA_TYPE_BINARY) {
if (l1 >= TSDB_COLVAL_ENCODE_NOCHANGE || l1 <= TSDB_COLVAL_ENCODE_DELTAD) { return l1 == TSDB_COLVAL_ENCODE_DISABLED ? 1 : 0;
return 1; // if (l1 >= TSDB_COLVAL_ENCODE_NOCHANGE || l1 <= TSDB_COLVAL_ENCODE_DELTAD) {
} else if (l1 == TSDB_COLVAL_ENCODE_DISABLED) { // return 1;
return 1; // } else if (l1 == TSDB_COLVAL_ENCODE_DISABLED) {
} else { // return 1;
return 0; // } else {
} // return 0;
// }
} else if (type == TSDB_DATA_TYPE_TIMESTAMP) { } else if (type == TSDB_DATA_TYPE_TIMESTAMP) {
return TSDB_COLVAL_ENCODE_XOR == l1 ? 1 : 0; return TSDB_COLVAL_ENCODE_XOR == l1 ? 1 : 0;
} else if (type >= TSDB_DATA_TYPE_UTINYINT && type <= TSDB_DATA_TYPE_UINT) { } else if (type >= TSDB_DATA_TYPE_UTINYINT && type <= TSDB_DATA_TYPE_UINT) {