github-code-scanning[bot] commented on code in PR #14542:
URL: https://github.com/apache/druid/pull/14542#discussion_r1260260740


##########
processing/src/main/java/org/apache/druid/segment/AutoTypeColumnIndexer.java:
##########
@@ -240,11 +244,11 @@
         @Override
         protected String getValue()
         {
-          final Object o = rootLiteralSelector.getObject();
-          if (o == null) {
-            return null;
+          final String s = Evals.asString(rootLiteralSelector.getObject());
+          if (spec.getExtractionFn() != null) {

Review Comment:
   ## Deprecated method or constructor invocation
   
   Invoking [DimensionSpec.getExtractionFn](1) should be avoided because it has 
been deprecated.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/5264)



##########
processing/src/main/java/org/apache/druid/segment/AutoTypeColumnIndexer.java:
##########
@@ -240,11 +244,11 @@
         @Override
         protected String getValue()
         {
-          final Object o = rootLiteralSelector.getObject();
-          if (o == null) {
-            return null;
+          final String s = Evals.asString(rootLiteralSelector.getObject());
+          if (spec.getExtractionFn() != null) {
+            return spec.getExtractionFn().apply(s);

Review Comment:
   ## Deprecated method or constructor invocation
   
   Invoking [DimensionSpec.getExtractionFn](1) should be avoided because it has 
been deprecated.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/5265)



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to