Hi ,
I noticed that the parsing logic for DATA_TYPE was recently updated in sql/dd/impl/system_views/columns.cc to support the VECTOR type by stripping comments and dimensions:
cpp
/* Ignore the comment especially for vector columns. */
m_target_def.add_field(FIELD_DATA_TYPE, "DATA_TYPE",
"SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(col."
"column_type_utf8, '*/ ', -1), '(', 1),' ', 1)");
While this is a great improvement for COLUMNS, I have found several concerns regarding its implementation:
1. MTR Test Failure (i_s_schema_definition_debug)
After this modification, the MTR test case information_schema.i_s_schema_definition_debug consistently fails with a checksum mismatch.
It appears the I_S_VERSION (or IS_DD_VERSION) was not incremented. This mismatch indicates that the persisted Data Dictionary (DD) definitions are now out of sync with the hardcoded checksums.
2. Missing Adaptations in PARAMETERS and ROUTINES
The logic in sql/dd/impl/system_views/parameters.cc and sql/dd/impl/system_views/routines.cc remains unchanged. Since Stored Procedures and Functions can also utilize the VECTOR type for arguments and return values, this creates an inconsistency within INFORMATION_SCHEMA. Metadata sync tools will receive sanitized types from COLUMNS but raw strings (e.g., vector(128) or /*!80400 VECTOR */) from PARAMETERS or ROUTINES.
Questions:
- Do you plan to unify the
DATA_TYPE parsing logic across PARAMETERS.cc and ROUTINES.cc to ensure metadata consistency?
- Regarding the
I_S_VERSION, if we only fix the MTR checksum without bumping the version number, will it cause issues during in-place upgrades? Specifically, will the Data Dictionary successfully refresh the persisted system view definitions if the version remains the same?
I have locally verified that applying the same logic to all three files and bumping the I_S_VERSION fixes both the inconsistency and the MTR failure. I would like to confirm if this is the intended direction for AliSQL.
Best regards.
Hi ,
I noticed that the parsing logic for
DATA_TYPEwas recently updated insql/dd/impl/system_views/columns.ccto support theVECTORtype by stripping comments and dimensions:cpp
While this is a great improvement for
COLUMNS, I have found several concerns regarding its implementation:1. MTR Test Failure (
i_s_schema_definition_debug)After this modification, the MTR test case
information_schema.i_s_schema_definition_debugconsistently fails with a checksum mismatch.It appears the
I_S_VERSION(orIS_DD_VERSION) was not incremented. This mismatch indicates that the persisted Data Dictionary (DD) definitions are now out of sync with the hardcoded checksums.2. Missing Adaptations in
PARAMETERSandROUTINESThe logic in
sql/dd/impl/system_views/parameters.ccandsql/dd/impl/system_views/routines.ccremains unchanged. Since Stored Procedures and Functions can also utilize theVECTORtype for arguments and return values, this creates an inconsistency withinINFORMATION_SCHEMA. Metadata sync tools will receive sanitized types fromCOLUMNSbut raw strings (e.g.,vector(128)or/*!80400 VECTOR */) fromPARAMETERSorROUTINES.Questions:
DATA_TYPEparsing logic acrossPARAMETERS.ccandROUTINES.ccto ensure metadata consistency?I_S_VERSION, if we only fix the MTR checksum without bumping the version number, will it cause issues during in-place upgrades? Specifically, will the Data Dictionary successfully refresh the persisted system view definitions if the version remains the same?I have locally verified that applying the same logic to all three files and bumping the
I_S_VERSIONfixes both the inconsistency and the MTR failure. I would like to confirm if this is the intended direction for AliSQL.Best regards.