[
https://issues.apache.org/jira/browse/ASTERIXDB-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16822371#comment-16822371
]
Ali Alsuliman commented on ASTERIXDB-2533:
------------------------------------------
Commit 709ea795627554fde484d1f0ce33cc10aab2e0cb in asterixdb's branch
refs/heads/master from Ali Alsuliman
[ [https://gitbox.apache.org/repos/asf?p=asterixdb.git;h=709ea79] ]
ASTERIXDB-2516[RT] Prevent passing null type to comparator provider
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
This change is to disallow passing null as IAType to the comparator
provider when asking for a comparator. It also includes few fixes
for issues appearing as a result of this change.
- changed the generic comparator to check whether the tag of data
at runtime is a valid tag and throw an exception if not.
- modified the comparator provider to return non-tagged comparator
for IAType SHORTWITHOUTINFOTYPE which is a short without tag.
SHORTWITHOUTINFOTYPE should not use the generic comparator since
the input data has no tag.
- fixed Dataset class to consider external dataset when getting
the IAType of the primary keys. The primary keys for external
datasets are different from regular datasets. They are not
part of the record type. Previously, null would be returned.
This would cause a failure when getting a comparator for the
primary keys of an external dataset since the type passed is null.
- fixed the TypeTraitProvider to give the correct lengths for
duration, day_time_duration, and year_month_duration.
Change-Id: I37767a3f3d1e3b29597d2a4998c0b60005cadb09
Reviewed-on: [https://asterix-gerrit.ics.uci.edu/3336]
Contrib: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Integration-Tests: Jenkins <[email protected]>
Reviewed-by: Till Westmann <[email protected]>
> Disallow use of comparators for tagged data on untagged data
> ------------------------------------------------------------
>
> Key: ASTERIXDB-2533
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-2533
> Project: Apache AsterixDB
> Issue Type: Task
> Components: RT - Runtime
> Affects Versions: 0.9.4
> Reporter: Till
> Assignee: Ali Alsuliman
> Priority: Major
> Fix For: 0.9.4.2
>
>
> AsterixDB contains comparators for tagged and untagged data. In some
> comparators there are provisions to not fail, if untagged data is compared
> while tagged data is expected.
> We need to ensure that it is always clear if tagged or untagged data items
> are compared and ensure that comparisons that expect tagged data fail on
> untagged data.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)