Aggarwal-Raghav commented on code in PR #5647:
URL: https://github.com/apache/hive/pull/5647#discussion_r1963829003


##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/lineage/Generator.java:
##########
@@ -90,7 +90,7 @@ public static Generator fromConf(HiveConf conf) {
   static Predicate<ParseContext> createFilterPredicateFromConf(Configuration 
conf) {
     Set<LineageInfoFilter> operations = new HashSet<>();
     boolean noneSpecified = false;
-    for (String valueText : 
conf.getStringCollection(HiveConf.ConfVars.HIVE_LINEAGE_STATEMENT_FILTER.varname))
 {
+    for (String valueText : 
conf.getTrimmedStringCollection(HiveConf.ConfVars.HIVE_LINEAGE_STATEMENT_FILTER.varname))
 {

Review Comment:
   IMO, better to use getTrimmedStringCollection method as it protects from 
throwing the following error if users put space while setting the value of 
config.
   ```
   Error while compiling statement: FAILED: EnumConstantNotPresentException 
org.apache.hadoop.hive.ql.optimizer.lineage.Generator$LineageInfoFilter. 
CREATE_VIEW;
   Query ID: raghav_20250219220810_850ffba9-62a7-40b5-95bb-ff2db6769696 
(state=42000, code=40000)
   ```



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to