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 {
54
54
@ Inject
55
55
ResultSetLoader loader ;
56
56
57
- @ Output
57
+ @ Output // TODO Remove in future work
58
58
BaseWriter .ComplexWriter writer ;
59
59
60
60
@ Override
@@ -68,9 +68,6 @@ public void setup() {
68
68
public void eval () {
69
69
if (in .end == 0 ) {
70
70
// Return empty map
71
- org .apache .drill .exec .vector .complex .writer .BaseWriter .MapWriter mapWriter = writer .rootAsMap ();
72
- mapWriter .start ();
73
- mapWriter .end ();
74
71
return ;
75
72
}
76
73
@@ -79,7 +76,6 @@ public void eval() {
79
76
org .apache .drill .exec .store .easy .json .loader .JsonLoader jsonLoader = jsonLoaderBuilder .build ();
80
77
loader .startBatch ();
81
78
jsonLoader .readBatch ();
82
- loader .close ();
83
79
} catch (Exception e ) {
84
80
throw new org .apache .drill .common .exceptions .DrillRuntimeException ("Error while converting from JSON. " , e );
85
81
}
@@ -93,7 +89,7 @@ public static class ConvertFromJsonVarcharInput implements DrillSimpleFunc {
93
89
@ Param
94
90
VarCharHolder in ;
95
91
96
- @ Output
92
+ @ Output // TODO Remove in future work
97
93
ComplexWriter writer ;
98
94
99
95
@ Workspace
@@ -118,9 +114,6 @@ public void eval() {
118
114
119
115
// If the input is null or empty, return an empty map
120
116
if (jsonString .length () == 0 ) {
121
- org .apache .drill .exec .vector .complex .writer .BaseWriter .MapWriter mapWriter = writer .rootAsMap ();
122
- mapWriter .start ();
123
- mapWriter .end ();
124
117
return ;
125
118
}
126
119
@@ -129,7 +122,6 @@ public void eval() {
129
122
org .apache .drill .exec .store .easy .json .loader .JsonLoader jsonLoader = jsonLoaderBuilder .build ();
130
123
loader .startBatch ();
131
124
jsonLoader .readBatch ();
132
- loader .close ();
133
125
} catch (Exception e ) {
134
126
throw new org .apache .drill .common .exceptions .DrillRuntimeException ("Error while converting from JSON. " , e );
135
127
}
You can’t perform that action at this time.
0 commit comments