[jira] [Commented] (DRILL-8393) Allow parameters to be passed to headers through SQL in WHERE clause
[ https://issues.apache.org/jira/browse/DRILL-8393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17694879#comment-17694879 ] ASF GitHub Bot commented on DRILL-8393: --- LYCJeff commented on PR #2747: URL: https://github.com/apache/drill/pull/2747#issuecomment-1449446242 > @LYCJeff I really like the functionality here, but I am concerned that this is a breaking change and will affect existing Drill users. Also, it adds effectively new syntax to the SQL queries. @cgivre At this point, I can pass the unprefixed parameters in their place by default, the way they were. This minimizes the impact on existing users, except in the following cases. For example, the argument that the user passed into the request body was called `header.xxx`, but now needs to be rewritten as `body.header.xxx`, otherwise the argument will be passed into the request header. In addition, a problem that had been fixed would reappear. The argument that is passed to the url path is also passed to the end of the url, which has been clearly distinguished since I changed it. Let me know if you think this is more friendly to existing users, then I'll move in this direction. > Allow parameters to be passed to headers through SQL in WHERE clause > > > Key: DRILL-8393 > URL: https://issues.apache.org/jira/browse/DRILL-8393 > Project: Apache Drill > Issue Type: Improvement > Components: Storage - HTTP >Affects Versions: 1.20.0 >Reporter: Yuchen Liang >Priority: Major > > Some APIs require parameters (e.g. digital signature) in the headers to be > generated at access time.So I'm wondering if we can pass it in through filter > statement. > Perhaps we could design it like the params field in connections parameter. > For example: > > Config: > { "url": "https://api.sunrise-sunset.org/json;, "requireTail": false, > "params": ["body.lat", "body.lng", "body.date", "header.header1"], > "parameterLocation": "json_body" } > > SQL Query: > SELECT * FROM api.sunrise > WHERE `body.lat` = 36.7201600 > AND `body.lng` = -4.4203400 > AND `body.date` = '2019-10-02' > AND `header.header1` = 'value1'; > > Post body: > { "lat": 36.7201600, "lng": -4.4203400, "date": "2019-10-02"} > > Headers: > { "header1": "value1", ……} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (DRILL-8406) Enable implicit casting of VARCHAR and BIT args in aggregate functions
[ https://issues.apache.org/jira/browse/DRILL-8406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17694707#comment-17694707 ] ASF GitHub Bot commented on DRILL-8406: --- cgivre merged PR #2768: URL: https://github.com/apache/drill/pull/2768 > Enable implicit casting of VARCHAR and BIT args in aggregate functions > -- > > Key: DRILL-8406 > URL: https://issues.apache.org/jira/browse/DRILL-8406 > Project: Apache Drill > Issue Type: Improvement > Components: Functions - Drill >Affects Versions: 1.21.0 >Reporter: James Turton >Assignee: James Turton >Priority: Minor > Fix For: 1.21.1 > > > Default function implementations that that throw unsupported operation > exceptions in the class AggregateErrorFunctions prevent the implicit casting > of VARCHAR and BIT arguments to neighbouring types. E.g. > {code:java} > apache drill> select sum('1'); > Error: UNSUPPORTED_OPERATION ERROR: Only COUNT, MIN and MAX aggregate > functions supported for VarChar type{code} > This issue proposes to remove AggregateErrorFunctions so that implicit > casting works, the example above changing as follows. > {code:java} > apache drill> select sum('1'); > EXPR$0 1 > 1 row selected (2.346 seconds) > {code} > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (DRILL-8393) Allow parameters to be passed to headers through SQL in WHERE clause
[ https://issues.apache.org/jira/browse/DRILL-8393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17694615#comment-17694615 ] ASF GitHub Bot commented on DRILL-8393: --- cgivre commented on PR #2747: URL: https://github.com/apache/drill/pull/2747#issuecomment-1448388913 @LYCJeff I really like the functionality here, but I am concerned that this is a breaking change and will affect existing Drill users. Also, it adds effectively new syntax to the SQL queries. > Allow parameters to be passed to headers through SQL in WHERE clause > > > Key: DRILL-8393 > URL: https://issues.apache.org/jira/browse/DRILL-8393 > Project: Apache Drill > Issue Type: Improvement > Components: Storage - HTTP >Affects Versions: 1.20.0 >Reporter: Yuchen Liang >Priority: Major > > Some APIs require parameters (e.g. digital signature) in the headers to be > generated at access time.So I'm wondering if we can pass it in through filter > statement. > Perhaps we could design it like the params field in connections parameter. > For example: > > Config: > { "url": "https://api.sunrise-sunset.org/json;, "requireTail": false, > "params": ["body.lat", "body.lng", "body.date", "header.header1"], > "parameterLocation": "json_body" } > > SQL Query: > SELECT * FROM api.sunrise > WHERE `body.lat` = 36.7201600 > AND `body.lng` = -4.4203400 > AND `body.date` = '2019-10-02' > AND `header.header1` = 'value1'; > > Post body: > { "lat": 36.7201600, "lng": -4.4203400, "date": "2019-10-02"} > > Headers: > { "header1": "value1", ……} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (DRILL-8405) Upgrade to snakeyaml 2.0 due to CVE
[ https://issues.apache.org/jira/browse/DRILL-8405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17694613#comment-17694613 ] ASF GitHub Bot commented on DRILL-8405: --- cgivre commented on PR #2767: URL: https://github.com/apache/drill/pull/2767#issuecomment-1448370911 @pjfanning I'm going to convert this to draft status until we can update liquibase. > Upgrade to snakeyaml 2.0 due to CVE > --- > > Key: DRILL-8405 > URL: https://issues.apache.org/jira/browse/DRILL-8405 > Project: Apache Drill > Issue Type: Task >Reporter: PJ Fanning >Priority: Major > > https://bitbucket.org/snakeyaml/snakeyaml/issues/561/cve-2022-1471-vulnerability-in -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (DRILL-8405) Upgrade to snakeyaml 2.0 due to CVE
[ https://issues.apache.org/jira/browse/DRILL-8405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17694549#comment-17694549 ] ASF GitHub Bot commented on DRILL-8405: --- pjfanning commented on PR #2767: URL: https://github.com/apache/drill/pull/2767#issuecomment-1448205614 Need to wait for liquibase to upgrade their lib. I don't know if snakeyaml is used elsewhere in Drill. If it is, it may be possible to upgrade snakeyaml in some places and keep the old version where liquibase is used. > Upgrade to snakeyaml 2.0 due to CVE > --- > > Key: DRILL-8405 > URL: https://issues.apache.org/jira/browse/DRILL-8405 > Project: Apache Drill > Issue Type: Task >Reporter: PJ Fanning >Priority: Major > > https://bitbucket.org/snakeyaml/snakeyaml/issues/561/cve-2022-1471-vulnerability-in -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (DRILL-8405) Upgrade to snakeyaml 2.0 due to CVE
[ https://issues.apache.org/jira/browse/DRILL-8405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17694531#comment-17694531 ] ASF GitHub Bot commented on DRILL-8405: --- cgivre commented on PR #2767: URL: https://github.com/apache/drill/pull/2767#issuecomment-1448156621 @pjfanning Is there any workaround for this? > Upgrade to snakeyaml 2.0 due to CVE > --- > > Key: DRILL-8405 > URL: https://issues.apache.org/jira/browse/DRILL-8405 > Project: Apache Drill > Issue Type: Task >Reporter: PJ Fanning >Priority: Major > > https://bitbucket.org/snakeyaml/snakeyaml/issues/561/cve-2022-1471-vulnerability-in -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (DRILL-8406) Enable implicit casting of VARCHAR and BIT args in aggregate functions
[ https://issues.apache.org/jira/browse/DRILL-8406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17694439#comment-17694439 ] ASF GitHub Bot commented on DRILL-8406: --- jnturton opened a new pull request, #2768: URL: https://github.com/apache/drill/pull/2768 # [DRILL-8406](https://issues.apache.org/jira/browse/DRILL-8406): Enable implicit casting of VARCHAR and BIT args in aggregate functions ## Description Default function implementations that that throw unsupported operation exceptions in the class AggregateErrorFunctions prevent the implicit casting of VARCHAR and BIT arguments to neighbouring types. E.g. ``` apache drill> select sum('1'); Error: UNSUPPORTED_OPERATION ERROR: Only COUNT, MIN and MAX aggregate functions supported for VarChar type ``` This PR removes AggregateErrorFunctions so that implicit casting works, the example above changing as follows. ``` apache drill> select sum('1'); EXPR$0 1 1 row selected (2.346 seconds) ``` ## Documentation N/A ## Testing New unit test. > Enable implicit casting of VARCHAR and BIT args in aggregate functions > -- > > Key: DRILL-8406 > URL: https://issues.apache.org/jira/browse/DRILL-8406 > Project: Apache Drill > Issue Type: Improvement > Components: Functions - Drill >Affects Versions: 1.21.0 >Reporter: James Turton >Assignee: James Turton >Priority: Minor > Fix For: 1.21.1 > > > Default function implementations that that throw unsupported operation > exceptions in the class AggregateErrorFunctions prevent the implicit casting > of VARCHAR and BIT arguments to neighbouring types. E.g. > {code:java} > apache drill> select sum('1'); > Error: UNSUPPORTED_OPERATION ERROR: Only COUNT, MIN and MAX aggregate > functions supported for VarChar type{code} > This issue proposes to remove AggregateErrorFunctions so that implicit > casting works, the example above changing as follows. > {code:java} > apache drill> select sum('1'); > EXPR$0 1 > 1 row selected (2.346 seconds) > {code} > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (DRILL-8406) Enable implicit casting of VARCHAR and BIT args in aggregate functions
James Turton created DRILL-8406: --- Summary: Enable implicit casting of VARCHAR and BIT args in aggregate functions Key: DRILL-8406 URL: https://issues.apache.org/jira/browse/DRILL-8406 Project: Apache Drill Issue Type: Improvement Components: Functions - Drill Affects Versions: 1.21.0 Reporter: James Turton Assignee: James Turton Fix For: 1.21.1 Default function implementations that that throw unsupported operation exceptions in the class AggregateErrorFunctions prevent the implicit casting of VARCHAR and BIT arguments to neighbouring types. E.g. {code:java} apache drill> select sum('1'); Error: UNSUPPORTED_OPERATION ERROR: Only COUNT, MIN and MAX aggregate functions supported for VarChar type{code} This issue proposes to remove AggregateErrorFunctions so that implicit casting works, the example above changing as follows. {code:java} apache drill> select sum('1'); EXPR$0 1 1 row selected (2.346 seconds) {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)