[FEATURE] add scripted field support to SQL query
Is your feature request related to a problem? We are migrating from elasticsearch to opensearch and could not migrate many queries as they are using runtimefields https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-runtime-fields.html , also see related issues where work around using SQL does not work https://github.com/opensearch-project/sql/issues/2320
What solution would you like? allow users to specify scripted fields for SQL query when using API
What alternatives have you considered? We tried using nested SQL query , but got various errors such as missing field, join related
Do you have any additional context? https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-runtime-fields.html