Thanks to visit codestin.com
Credit goes to github.com

Skip to content

maint(all): Make changes for code to be compatible to scala 2.13#2112

Merged
amolnayak311 merged 7 commits intofilodb:developfrom
amolnayak311:scala_2.13_syntax_only_changes
Feb 2, 2026
Merged

maint(all): Make changes for code to be compatible to scala 2.13#2112
amolnayak311 merged 7 commits intofilodb:developfrom
amolnayak311:scala_2.13_syntax_only_changes

Conversation

@amolnayak311
Copy link
Contributor

Pull Request checklist

  • The commit(s) message(s) follows the contribution guidelines ?
  • Tests for the changes have been added (for bug fixes / features) ?
  • Docs have been added / updated (for bug fixes / features) ?

Current behavior :
No change in behavior expected

New behavior :
No change in behavior expected. The PR just applies changes to syntax that compiles with Scala 2.12 but also needed in Scala 2.13. This is to maintain subsequent diffs.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the FiloDB codebase to be compatible with Scala 2.13 while maintaining Scala 2.12 compatibility. The changes focus on syntax updates required for Scala 2.13, including method call conventions, type annotations, and replacing deprecated APIs.

Changes:

  • Updated method calls to use explicit parentheses for parameterless methods (e.g., rows(), iterator(), getLines())
  • Added explicit type annotations to implicit values for better type inference in Scala 2.13
  • Replaced deprecated collection operations (mapValues, filterKeys) with Scala 2.13-compatible equivalents
  • Updated Either API usage from deprecated .left.get/.right.get to .swap.toOption.get/.toOption.get

Reviewed changes

Copilot reviewed 133 out of 133 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Multiple test files Updated method calls to use parentheses and added type annotations
Query execution files Updated rows() calls and Either API usage
Collection utilities Replaced mapValues() with map { case (k, v) => ... }
Actor and coordinator files Added explicit type annotations to implicit values
Cassandra and storage files Updated iterator and collection API usage

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@vishramachandran vishramachandran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with one important comment. Please check and close. Thank you for this PR!

val pinim = plr.getPartIdsNotInMemoryList.asScala.map(intgr => intgr.intValue())
val partIdsNotInMemory = debox.Buffer.fromIterable(pinim)
val pkRecords = plr.getPkRecordsList.asScala.map(pklir => pklir.fromProto)
val pkRecords = plr.getPkRecordsList.asScala.map(pklir => pklir.fromProto).toSeq
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can result in a lot of allocations. We need to evaluate all the toSeq changes

@amolnayak311 amolnayak311 merged commit 1af058b into filodb:develop Feb 2, 2026
1 check passed
sandeep6189 added a commit that referenced this pull request Feb 18, 2026
* feat (core): writing part keys to downsample keyspace directly from the raw FiloDB (#2102)

* writing part keys to downsample keyspace directly from the raw FiloDB clusters

* removing accidental prints

---------

Co-authored-by: Kier Petrov <[email protected]>

* fixing clippy linting errors (#2104)

Co-authored-by: Kier Petrov <[email protected]>

* fixing nondeterministic test (#2105)

Co-authored-by: Kier Petrov <[email protected]>

* adding more debugging for the spec execution (#2106)

Co-authored-by: Kier Petrov <[email protected]>

* fix(core): adding C* configs for TimeSeriesMemStoreDownsampleIndexSpec (#2107)

* adding cassandra host/port config

* moving the config out of the spec file to the config file

---------

Co-authored-by: Kier Petrov <[email protected]>

* use absent(sum(last()) to to implement absent_over_time. (#2108)

* use absent(sum(last()) to to implement absent_over_time.

---------

Co-authored-by: Yu Zhang <[email protected]>

* fix(gateway): Simplify TestTimeSeriesProducer options and fix query link & command (#2111)

* Revert "feat(query): make unless operator timestamp-aware and correct test ut…" (#2114)

This reverts commit 58411e8.

* fix(misc): rename last-delta schema to v2 (#2101)

* fix(query) Fix the java.util.NoSuchElementException: head of empty list issue when the inner rvs of a scalar is empty (#2116)

* fix(query): Wrong rate function used on cumulative min-max-histograms (#2117)

* feat(histogram): OTEL Cummulative enhanced rate + quantile calculation with max-min values (#2119)

* feat(histogram): OTEL Cummulative enhanced rate + quantile calculation with max-min

* Adding additional unit tests

* build(deps): bump oneshot from 0.1.8 to 0.1.13 in /core/src/rust (#2124)

Bumps [oneshot](https://github.com/faern/oneshot) from 0.1.8 to 0.1.13.
- [Changelog](https://github.com/faern/oneshot/blob/v0.1.13/CHANGELOG.md)
- [Commits](faern/oneshot@v0.1.8...v0.1.13)

---
updated-dependencies:
- dependency-name: oneshot
  dependency-version: 0.1.13
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(query) Handle cases where non pipe regex are passed gracefully with a BadQueryException instead of default scala.MatchError (#2122)

* misc(cluster): Adding  helper function for ShardMapperV2 (#2123)

* misc(cluster): Adding  helper function for ShardMapperV2

* misc(cluster): Adding an async method to get the ShardMapperV2 response (#2127)

* misc(cluster): Adding an async method to get the ShardMapperV2 response

* fix(query): Handle empty histograms in ScalarOperationMapper to prevent ArrayIndexOutOfBoundsException (#2126)

* maint(all): Make changes for code to be compatible to scala 2.13 (#2112)

* perf(core): Optimize FilodbMetrics allocation in hot path (#2129)

Reduce OTel attribute allocations when additional tags are not involved. This appeared in the allocation hot path where chunks scanned counters are incremented too often resulting in lot of allocations. Perf tests after the change showed that this is not in the hot path anymore.
Also fixed a bug where we are relying on a mutable `AttributesBuilder` to create new time series. Fixed it to immutable `Attributes`.

* Add preagg delta histogram v2 schema (#2132)

* Add preagg delta histogram v2 schema

* Fix typo

---------

Co-authored-by: Srividhya Anantharamakrishnan <[email protected]>

* updating main version

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: kvpetrov <[email protected]>
Co-authored-by: Kier Petrov <[email protected]>
Co-authored-by: yu-shipit <[email protected]>
Co-authored-by: Yu Zhang <[email protected]>
Co-authored-by: Vish Ramachandran <[email protected]>
Co-authored-by: Amol Nayak <[email protected]>
Co-authored-by: Shaik Sher Ali <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: srivik <[email protected]>
Co-authored-by: Srividhya Anantharamakrishnan <[email protected]>
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.

3 participants

Comments