szucsvillo commented on PR #2001: URL: https://github.com/apache/phoenix/pull/2001#issuecomment-2404968761
Example: create table test203 (mykey integer not null primary key, col1 bigint, new_column_1 FLOAT, new_column_2 DOUBLE, new_column_3 BIGINT); create index indexName203 on test203 (col1) INCLUDE (new_column_1,new_column_2,new_column_3); UPSERT INTO TEST203(mykey,col1,new_column_1,new_column_2,new_column_3) VALUES(5,43,201,202,203); SELECT TENANT_ID, TABLE_SCHEM, TABLE_NAME, DATA_TYPE, COLUMN_NAME, DATA_TABLE_NAME, COLUMN_FAMILY,ORDINAL_POSITION, KEY_SEQ FROM system.catalog WHERE TABLE_NAME = 'INDEXNAME203' or TABLE_NAME = 'TEST203';  When creating an index like indexName203 on test203 (col1) with included columns (new_column_1, new_column_2, new_column_3), the data types of the included columns in the catalog table do not change to DECIMAL. This is because these columns are only included in the index for retrieval efficiency and are not part of the indexed key, like col1. That's why I made the following changes in AlterAddCascadeIndexIT to ensure the included columns retain their original data types, such as FLOAT or DOUBLE, rather than converting them to DECIMAL, since they are not part of the index key and don't require transformation for indexing purposes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
