Skip to content

Conversation

@OVI3D0
Copy link
Member

@OVI3D0 OVI3D0 commented Oct 23, 2025

Description

The DateParquetField.addToGroup() method was attempting to cast to DateMilliVector, but the getArrowType() method returns ArrowType.Timestamp(MILLISECOND, null), which causes Apache Arrow to create a TimeStampMilliVector instead. This resulted in a ClassCastException whenever documents with date fields were indexed.

Before:

curl -X POST "localhost:9200/clickbench/_doc" -H 'Content-Type: application/json' -d'
  {
    "EventTime": "2013-07-08 08:44:42",
    "WatchID": 123,
    "CounterID": 456
  }'
{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"failed to parse field [EventTime] of type [date] in document with id '4hQUE5oByIKCyOSXCS1e'. Preview of field's value: '2013-07-08 08:44:42'"}],"type":"mapper_parsing_exception","reason":"failed to parse field [EventTime] of type [date] in document with id '4hQUE5oByIKCyOSXCS1e'. Preview of field's value: '2013-07-08 08:44:42'","caused_by":{"type":"class_cast_exception","reason":"class org.apache.arrow.vector.TimeStampMilliVector cannot be cast to class org.apache.arrow.vector.DateMilliVector (org.apache.arrow.vector.TimeStampMilliVector and org.apache.arrow.vector.DateMilliVector are in unnamed module of loader java.net.FactoryURLClassLoader @6b0f266e)"}},"status":400}

After:

[ec2-user@ip-172-31-0-197 ~]$ curl -X POST "localhost:9200/clickbench/_doc" -H 'Content-Type: application/json' -d'
  {
    "EventTime": "2013-07-08 08:44:42",
    "WatchID": 123,
    "CounterID": 456
  }'
{"_index":"clickbench","_id":"SAtBE5oB1bFaJ7IJ4qY_","_version":1,"result":"created","_shards":{"total":2,"successful":1,"failed":0},"_seq_no":1,"_primary_term":1}[ec2-user@ip-172-31-0-197 ~]$

Also should allow the clickbench workload to index without errors:

[ec2-user@ip-172-31-0-197 ~]$ opensearch-benchmark run     --target-hosts=localhost:9200     --workload=clickbench     --workload-params='{"number_of_replicas": 0, "bulk_indexing_clients": 2}' --kill-running-processes --test-mode

   ____                  _____                      __       ____                  __                         __
  / __ \____  ___  ____ / ___/___  ____ ___________/ /_     / __ )___  ____  _____/ /_  ____ ___  ____ ______/ /__
 / / / / __ \/ _ \/ __ \\__ \/ _ \/ __ `/ ___/ ___/ __ \   / __  / _ \/ __ \/ ___/ __ \/ __ `__ \/ __ `/ ___/ //_/
/ /_/ / /_/ /  __/ / / /__/ /  __/ /_/ / /  / /__/ / / /  / /_/ /  __/ / / / /__/ / / / / / / / / /_/ / /  / ,<
\____/ .___/\___/_/ /_/____/\___/\__,_/_/   \___/_/ /_/  /_____/\___/_/ /_/\___/_/ /_/_/ /_/ /_/\__,_/_/  /_/|_|
    /_/

[INFO] [Test Run ID]: 3a8da820-6d96-4d74-bd6a-e069a0721a17
[INFO] Preparing file offset table for [/home/ec2-user/.osb/benchmarks/data/clickbench/hits-1k.json] ... [OK]
[INFO] Running test with workload [clickbench], test_procedure [clickbench] and cluster_config ['external'] with version [3.3.0-SNAPSHOT].

Running delete-index                                                           [100% done]
Running create-index                                                           [100% done]
Running check-cluster-health                                                   [100% done]
Running index-append                                                           [100% done]
Running refresh-after-index                                                    [100% done]
Running force-merge                                                            [100% done]
Running refresh-after-force-merge                                              [100% done]
Running wait-until-merges-finish                                               [100% done]
...

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Michael Oviedo <[email protected]>
@github-actions
Copy link
Contributor

❌ Gradle check result for d04a05d: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant