[
https://issues.apache.org/jira/browse/CALCITE-4908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17551513#comment-17551513
]
Woonsan Ko commented on CALCITE-4908:
-------------------------------------
Hi [~sereda],
Yes, I wish to have it in the coming release! ;-)
And, yes, I believe it can be resolved very soon, based on my judgement as
follows:
- I initially put titles in this ticket and the PR with "classpath URI", which
made some confusions IMHO.
Actually the "path" used to load a resource from a classpath has nothing to
do with "URI", but it is just a Java-specific path as documented in
Class.getResource(String name) API doc.
- Therefore, I don't believe we have to worry about URI encoding when
determining the classpath resource path; so I updated the titles as mentioned
already in the PR discussion.
- Regarding, the other ask about using the thread's current context
classloader's resource loading strategy instead of the current _simple_ choice,
I don't believe that's really necessary as calcite-core jar should be loaded by
the same class loader or its accessible ancestors in most cases. (Without clear
reasoning to prefer 'current context classloader', it could allow an
unnecessary potential risk.)
And the PR still looks good in green.
Please let me know if you need any other clarifications of if I misunderstood
any.
Cheers,
Woonsan
> Support classpath resource name as model resource path
> ------------------------------------------------------
>
> Key: CALCITE-4908
> URL: https://issues.apache.org/jira/browse/CALCITE-4908
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Reporter: Woonsan Ko
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.31.0
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> In JDBC uri with a model file reference like
> 'jdbc:calcite:model=/a/b/c/model.json', it would be nice if we support a
> classpath resource name (path) too like
> 'jdbc:calcite:model=classpath:/a/b/c/model.json'.
> It would be very helpful to my web application envs. A classpath resource
> cannot be always converted to a File object if the resource is in a jar or
> war, etc.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)