File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ public static class ConvertFromJsonNullableInput implements DrillSimpleFunc {
5454 @ Inject
5555 ResultSetLoader loader ;
5656
57- @ Output
57+ @ Output // TODO Remove in future work
5858 BaseWriter .ComplexWriter writer ;
5959
6060 @ Override
@@ -68,9 +68,6 @@ public void setup() {
6868 public void eval () {
6969 if (in .end == 0 ) {
7070 // Return empty map
71- org .apache .drill .exec .vector .complex .writer .BaseWriter .MapWriter mapWriter = writer .rootAsMap ();
72- mapWriter .start ();
73- mapWriter .end ();
7471 return ;
7572 }
7673
@@ -79,7 +76,6 @@ public void eval() {
7976 org .apache .drill .exec .store .easy .json .loader .JsonLoader jsonLoader = jsonLoaderBuilder .build ();
8077 loader .startBatch ();
8178 jsonLoader .readBatch ();
82- loader .close ();
8379 } catch (Exception e ) {
8480 throw new org .apache .drill .common .exceptions .DrillRuntimeException ("Error while converting from JSON. " , e );
8581 }
@@ -93,7 +89,7 @@ public static class ConvertFromJsonVarcharInput implements DrillSimpleFunc {
9389 @ Param
9490 VarCharHolder in ;
9591
96- @ Output
92+ @ Output // TODO Remove in future work
9793 ComplexWriter writer ;
9894
9995 @ Workspace
@@ -118,9 +114,6 @@ public void eval() {
118114
119115 // If the input is null or empty, return an empty map
120116 if (jsonString .length () == 0 ) {
121- org .apache .drill .exec .vector .complex .writer .BaseWriter .MapWriter mapWriter = writer .rootAsMap ();
122- mapWriter .start ();
123- mapWriter .end ();
124117 return ;
125118 }
126119
@@ -129,7 +122,6 @@ public void eval() {
129122 org .apache .drill .exec .store .easy .json .loader .JsonLoader jsonLoader = jsonLoaderBuilder .build ();
130123 loader .startBatch ();
131124 jsonLoader .readBatch ();
132- loader .close ();
133125 } catch (Exception e ) {
134126 throw new org .apache .drill .common .exceptions .DrillRuntimeException ("Error while converting from JSON. " , e );
135127 }
You can’t perform that action at this time.
0 commit comments