maheshrajus commented on code in PR #5856: URL: https://github.com/apache/hive/pull/5856#discussion_r2154045964
########## ql/src/java/org/apache/hadoop/hive/ql/metadata/PartitionTree.java: ########## @@ -258,21 +254,20 @@ List<Partition> getPartitionsByFilter(final String filter) throws MetaException return new ArrayList<>(parts.values()); } List<Partition> result = new ArrayList<>(); - ScriptEngine se = new ScriptEngineManager().getEngineByName("JavaScript"); - if (se == null) { - LOG.error("JavaScript script engine is not found, therefore partition filtering " - + "for temporary tables is disabled."); - return result; - } - for (Map.Entry<String, Partition> entry : parts.entrySet()) { - se.put("partitionName", entry.getKey()); - se.put("values", entry.getValue().getValues()); - try { - if ((Boolean)se.eval(filter)) { - result.add(entry.getValue()); + try (GraalJSScriptEngine se = GraalJSScriptEngine.create(null, + Context.newBuilder().allowExperimentalOptions(true) + .option("js.nashorn-compat", "true") + .allowAllAccess(true))) { Review Comment: yeah, i removed property .allowAllAccess(true) and checked it previously, we are getting error "failed due to: Unknown identifier: get". So in our case we need to pass this field. thanks ! -- 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