Sanjeet Malhotra created PHOENIX-7161:
-----------------------------------------
Summary: Setting phoenix table property to null via Alter is an
unexpected no-op
Key: PHOENIX-7161
URL: https://issues.apache.org/jira/browse/PHOENIX-7161
Project: Phoenix
Issue Type: Bug
Affects Versions: 5.2.0
Environment: Observed this on current Phoenix master: 5.2.0-SNAPSHOT.
Reporter: Sanjeet Malhotra
Attachments: Screenshot 2023-12-26 at 4.59.46 PM.png
In ALTER table statement, if a Phoenix table property changes to NULL it
becomes a no-op. This is true for most of table properties (except for guide
post width). As per this:
[https://github.com/apache/phoenix/blob/2426212be275c0d39ecdb7fb763592c69829e80c/phoenix-core-client/src/main/java/org/apache/phoenix/schema/MetaDataClient.java#L3773-L3850]
seems like we only alter a table property if its value is not null in
`metaPropertiesEvaluated` object. But value of a property can be null in this
object due to either being not changed or getting changed to null. Thus, seems
like property not set is not being distinguished from being set to null.
One solution could be to do what guide post width does i.e. treat not set as -1
(in metaPropertiesEvaluated object) so that not set is different from set to
null.
Attached the screenshot depicting the example of setting to NULL via alter
becomes a no-op. !Screenshot 2023-12-26 at 4.59.46 PM.png!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)