[
https://issues.apache.org/jira/browse/KYLIN-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17487855#comment-17487855
]
ASF GitHub Bot commented on KYLIN-4382:
---------------------------------------
juntaozhang opened a new pull request #1808:
URL: https://github.com/apache/kylin/pull/1808
## Proposed changes
fix[ KYLIN-4382](https://issues.apache.org/jira/browse/KYLIN-4382) Unable to
use DATE type in prepared statements
## Github Branch
As most of the development works are on Kylin 4, we need to switch it as
main branch. Apache Kylin community changes the branch settings on Github since
2021-08-04 :
1. The original branch _kylin-on-parquet-v2_ for **Kylin 4.X** (Parquet
Storage) has been renamed to branch **main**, and configured as the **default**
branch;
2. The original branch _master_ for **Kylin 3.X** (HBase Storage) has been
renamed to branch **kylin3** ;
Please check [Intro to Kylin 4
architecture](https://kylin.apache.org/blog/2021/07/02/Apache-Kylin4-A-new-storage-and-compute-architecture/)
and [INFRA-22166](https://issues.apache.org/jira/browse/INFRA-22166) if you
are interested.
## Types of changes
What types of changes does your code introduce to Kylin?
_Put an `x` in the boxes that apply_
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Documentation Update (if none of the other choices apply)
## Checklist
_Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look for
before merging your code._
- [ ] I have create an issue on [Kylin's
jira](https://issues.apache.org/jira/browse/KYLIN), and have described the
bug/feature there in detail
- [x] Commit messages in my PR start with the related jira ID, like
"KYLIN-0000 Make Kylin project open-source"
- [x] Compiling and unit tests pass locally with my changes
- [x] I have added tests that prove my fix is effective or that my feature
works
- [x] I have added necessary documentation (if appropriate)
- [ ] Any dependent changes have been merged
## Further comments
If this is a relatively large or complex change, kick off the discussion at
user@kylin or dev@kylin by explaining why you chose the solution you did and
what alternatives you considered, etc...
--
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]
> Unable to use DATE type in prepared statements
> ----------------------------------------------
>
> Key: KYLIN-4382
> URL: https://issues.apache.org/jira/browse/KYLIN-4382
> Project: Kylin
> Issue Type: Bug
> Components: Query Engine
> Reporter: Gabor Arki
> Priority: Major
>
> h4. Environment
> * Kylin JDBC driver: 3.0.0
> * Kylin server: 3.0.0
> h4. Reproduction steps
> * Use a cube with a DATE column (like the derived day_start)
> * Create a prepared statement and try to filter with this column in a where
> clause
> * Pass the values as java.sql.Date type
> h4. Expected result
> * The proper response is provided for the query with the values for the
> specified date(s)
> h4. Actual result
> * No data is returned
> * StreamStorageQuery's _Skip cube segment_ log message is containing the
> filter with an epoch day value, for example: {{DAY_START GTE [18231]}}
> * Executing the same query from the web UI you get the expected response.
> Now the same log message is containing the filter in epoch millis format, for
> example: {{DAY_START IN [1580774400000, 1580860800000]}}
> * Passing the value as String instead of java.sql.Date fails on server-side
> with: {{exception while executing query: java.lang.String cannot be cast to
> java.lang.Integer}}
> * Passing the value as java.sql.Timestamp or java.util.Date fails on
> server-side with: {{exception while executing query: java.lang.Long cannot be
> cast to java.lang.Integer}}
> * Trying to CAST a String to DATE fails with the error described here:
> https://issues.apache.org/jira/browse/CALCITE-3100
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)