Map
11/04/2021, 5:54 PMtable1 with fields X in upsert mode. When a new field Y is added to the schema, a simple query
select * from table1 limit 10
in the Pinot explorer will return the following error:
[
{
"message": "MergeResponseError:\nData schema mismatch between merged block: [X(DOUBLE)] and block to merge: [X(DOUBLE),Y(DOUBLE)], drop block to merge",
"errorCode": 500
}
]
However, the following query would work as expected
select * from table1 limit 10 option (skipUpsert=True)
Has anyone seen this before?Mayank
Jackie
11/04/2021, 7:44 PMMap
11/04/2021, 9:07 PMYes we did. We don’t see this error with a regular table. This only manifests whenis on.upsert
Map
11/04/2021, 9:07 PMThat said, maybe we are doing the reload incorrectly? Can you let us know the right way to do it?
Jackie
11/04/2021, 9:14 PMJackie
11/04/2021, 9:14 PMMap
11/04/2021, 9:15 PMMap
11/04/2021, 9:16 PMJackie
11/04/2021, 9:32 PMJackie
11/04/2021, 9:34 PMMap
11/04/2021, 9:44 PMMap
11/04/2021, 9:45 PMJackie
11/04/2021, 10:01 PMJackie
11/04/2021, 10:02 PMMap
11/04/2021, 10:03 PMJackie
11/04/2021, 10:28 PMSELECT MAX(Y) FROM table GROUP BY $segmentName LIMIT 10000Map
11/05/2021, 1:13 AMJackie
11/05/2021, 1:22 AMSELECT DISTINCT $segmentName FROM table LIMIT 10000 to get all the segmentsMap
11/05/2021, 1:28 AMSELECT MAX(Y) FROM table GROUP BY $segmentName LIMIT 100000 option (skipUpsert=true) will return all the segmentsMap
11/05/2021, 1:32 AMselect * from table1 limit 10 option (skipUpsert=True)?Yupeng Fu
11/05/2021, 1:32 AMYupeng Fu
11/05/2021, 1:33 AMJackie
11/05/2021, 1:37 AMSELECT DISTINCT $segmentName FROM table LIMIT 10000 should give you thatJackie
11/05/2021, 1:39 AMselect * from table1 limit 10 will read the first 10 valid docs, and with upsert enabled, it might need to read more than 1 segment, thus cause merge conflictMap
11/05/2021, 1:39 AMMap
11/05/2021, 1:39 AMJackie
11/05/2021, 1:40 AMMap
11/05/2021, 1:40 AMJackie
11/05/2021, 1:40 AMJackie
11/05/2021, 1:41 AMMap
11/05/2021, 1:41 AMJackie
11/05/2021, 1:42 AMSELECT COUNT(*) FROM table GROUP BY $segmentName LIMIT 10000?Jackie
11/05/2021, 1:43 AMMap
11/05/2021, 1:44 AMMap
11/05/2021, 1:45 AMJackie
11/05/2021, 1:46 AMJackie
11/05/2021, 1:47 AMPOST /tables/{tableName}/segments/reloadMap
11/05/2021, 2:24 AMPOST /segments/{tableName}/reload. Also since we are at this, what is the impact of a reload? Will a segment under reload become unavailable for query?Map
11/05/2021, 2:35 AMMap
11/05/2021, 2:56 AMMap
11/05/2021, 2:58 AMSELECT MAX(Y) FROM table GROUP BY $segmentName LIMIT 100000 and SELECT MAX(X) FROM table GROUP BY $segmentName LIMIT 100000 return 13 segments…so I suppose when the table is queried, only these 13 segments are accessed and they all have both fields X and Y. Following the logic, such an error should not have been thrown out.Jackie
11/05/2021, 3:38 AMMap
11/05/2021, 1:03 PMJackie
11/06/2021, 1:12 AMJackie
11/06/2021, 1:14 AMSELECT COUNT(*) FROM table GROUP BY $segmentName LIMIT 100000 and SELECT DISTINCT $segmentName FROM table LIMIT 10000 should return the same segments. Not sure how you got different results for these 2 queries