xigongxiaoche commented on issue #31236:
URL:
https://github.com/apache/shardingsphere/issues/31236#issuecomment-2116536963
According to your advice, my unit tests passed on 5.4.1 and master. Thank
you very much.
According to your advice, my unit tests passed on 5.4.1 and master. Thank
you very much.
sql case:
```
<select sql-case-id="select_interval_with_subquery">
<projections start-index="7" stop-index="9">
<column-projection name="age" start-index="7" stop-index="9"/>
</projections>
<from>
<subquery-table start-index="16" stop-index="162">
<subquery>
<select>
<projections start-index="24" stop-index="64">
<expression-projection text="0-1岁"
start-index="24" stop-index="33" alias="age"/>
<aggregation-projection type="COUNT"
start-index="35" stop-index="42" expression="count(*)" alias="countNum"/>
<expression-projection text="0" start-index="54"
stop-index="64" alias="sortNum"/>
</projections>
<from start-index="71" stop-index="91">
<simple-table name="T_EMPI_PATIENT_INFO"
start-index="71" stop-index="91" alias="t"/>
</from>
<where start-index="93" stop-index="161">
<expr>
<binary-operation-expression
start-index="99" stop-index="161">
<operator>></operator>
<left>
<column name="birth"
start-index="99" stop-index="105">
<owner name="t" start-index="99"
stop-index="99"/>
</column>
</left>
<right>
<function text="to_char((sysdate -
interval '1' year(3)), 'yyyymmdd')" function-name="to_char" start-index="109"
stop-index="161">
<parameter>
<binary-operation-expression
start-index="118" stop-index="147">
<operator>-</operator>
<left>
<column
name="sysdate" start-index="118" stop-index="124"/>
</left>
<right>
<common-expression
text="interval '1' year(3)" start-index="128" stop-index="147"/>
</right>
</binary-operation-expression>
</parameter>
<parameter>
<literal-expression
value="yyyymmdd" start-index="151" stop-index="160"/>
</parameter>
</function>
</right>
</binary-operation-expression>
</expr>
</where>
</select>
</subquery>
</subquery-table>
</from>
</select>
<sql-case id="select_interval_with_subquery" value="select age from
(select '0-1岁' age,count(*) countNum, '0' sortNum from T_EMPI_PATIENT_INFO t
where t.birth > to_char((sysdate - interval '1' year(3)), 'yyyymmdd'))"
db-types="Oracle" />
```
--
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]