Skip to content

[VL] Separate each jni wrapper to different files #2845

Closed as not planned
Closed as not planned

Description

@Yohahaha

Description

JniWrapper.cc is too large and may be larger in the future, we could separate it into sub dirs when some stateful static variables be removed, and get benefits from readability and UT.

Activity

  1. Yohahaha commented on Sep 11, 2023

    @Yohahaha
    ContributorAuthor

    After issue 3077 completed, I will separate current JniWrapper.cc into different sub-dir, it will looks like below:

    cpp
      |- jni
      |- memory
      |- compute
        |- r2c
          |- R2CJniWrapper.cc
          |- Row2Columnar.h
          |- test
          |- benchmark
        |- c2r
          |- C2RJniWrapper.cc
          |- Columnar2Row.h
          |- ...
        |- shuffle
          |- ShuffleReaderJniWrapper.cc
          |- ShuffleReader.h
          |- ShuffleWriterJniWrapper.cc
          |- ShuffleWriter.h
          |- ...
        |- serializer
        |- wholestage
        |- [common files]
      |- ...
    

    Any suggestions? @jinchengchenghh @zhztheplayer @rui-mo

  2. zhztheplayer commented on Sep 12, 2023

    @zhztheplayer
    Member

    This sort of refactor is needed.

    The thing is that we should find a proper time to apply the change, since it may easily conflict with other pending PRs.

  3. Yohahaha commented on Sep 12, 2023

    @Yohahaha
    ContributorAuthor

    The thing is that we should find a proper time to apply the change, since it may easily conflict with other pending PRs.

    Good point, I prefer do the refactor in weekend, before that, let's discuss the structure we expected.

  4. Yohahaha commented on Sep 12, 2023

    @Yohahaha
    ContributorAuthor
  5. ulysses-you commented on Sep 12, 2023

    @ulysses-you
    Contributor

    I think make jni file name align with java class is good. The VexloJniWrapper should also be taken into account. e.g., The java class PlanEvaluatorJniWrapper has several jni methods that map to both JniWrapper and VexloJniWrapper. What's the really difference between VexloJniWrapper and JniWrapper ?

  6. zhztheplayer commented on Sep 13, 2023

    @zhztheplayer
    Member

    The java class PlanEvaluatorJniWrapper has several jni methods that map to both JniWrapper and VexloJniWrapper.

    PlanEvaluatorJniWrapper -> VeloxJniWrapper

    Such mappings should be finally eliminated IIUC. We already had Backend and ExecutionCtx as the APIs across backends.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions