File tree Expand file tree Collapse file tree
isthmus/src/test/java/io/substrait/isthmus Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -128,13 +128,14 @@ protected RelRoot assertSqlSubstraitRelRoundTrip(
128128 // Assert (sql -> calcite -> substrait) and (sql -> substrait -> calcite -> substrait) are same.
129129 // Return list of sql -> Substrait rel -> Calcite rel.
130130
131+ SqlToSubstrait s2s = new SqlToSubstrait ();
131132 SubstraitToCalcite substraitToCalcite = new SubstraitToCalcite (extensions , typeFactory );
132133
133- // 1. SQL -> Calcite RelRoot
134- RelRoot relRoot1 = SubstraitSqlToCalcite . convertQuery (query , catalogReader );
134+ // 1. SQL -> Substrait Plan
135+ Plan plan1 = s2s . convert (query , catalogReader );
135136
136- // 2. Calcite RelRoot -> Substrait Rel
137- Plan .Root pojo1 = SubstraitRelVisitor . convert ( relRoot1 , extensions );
137+ // 2. Substrait Plan -> Substrait Rel
138+ Plan .Root pojo1 = plan1 . getRoots (). get ( 0 );
138139
139140 // 3. Substrait Rel -> Calcite RelNode
140141 RelRoot relRoot2 = substraitToCalcite .convert (pojo1 );
You can’t perform that action at this time.
0 commit comments