-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[LIMU INDX] File format for DDIC secondary indexes #354
Conversation
AFF file format for ABAP DDIC secondary indexes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jheinri for your contribution 👍
Please see my questions and comments
"! <p class="shorttext">Header</p> | ||
"! Header | ||
"! $required | ||
header TYPE zif_aff_types_v1=>ty_header_60, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we have a LIMU object here, we most probably won't need a header. The original_language
and the abap_language_version
is derived from the TABL object, isn't it?
I think we can just add a description
field instead of the complete header. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For REPS & FUNC, we use the header zif_aff_types_v1=>ty_header_only_description
, a header for sub objects which consists only of the field description
. Should this be kept the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original language can be derived from the table. That is not necessary true for the abap_language_version. There are still discussion going on, but currently we must assume that extension indexes (R3TR XINX) can have an abap_language_version independent from the table.
So far we assume that the file format for LIMU INDX and R3TR XINX is the same. If this is still true this would mean that we leave the header field as it is, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to have different formats (wrt the header) for LIMU INDX and R3TR XINX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If R3TR XINX supports only ABAP language version standard
and cloudDevelopment
you should use zif_aff_types_v1=>ty_header_60_cloud
as type for field header
.
"! $default 'abap_false' | ||
text_index TYPE abap_bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to change this field to an enumeration with the values like standard
and textIndex
(or similar)? This allows you to open it up for other kind of indexes in the future.
If you want to keep it as boolean I think you can remove the default false
because this is anyhow the standard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is in principle a good idea. The question is how this will look afterwards on the GUI. So far we are much in favor of a checkbox which only must be selected if the developer actually wants a text index (should be the 1% case). I guess if the change this to an enumeration we cannot have a checkbox, right?
The question is also related to the support of old-style fulltext indexes. That would require the ability to enable and disable certain fields based on the index type. I think so far we said that this is not possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would become a drop-down with both options. The "old-style fulltext indexes" would be a third option, wouldn't it?
For the ABAP file formats it is most probably helpful to specify the full object type even if we use/support just a subset in ADT in a first version.
"! Position | ||
position TYPE n LENGTH 4, | ||
END OF ty_indexfield, | ||
tt_index_fields TYPE SORTED TABLE OF ty_indexfield WITH UNIQUE KEY fieldname. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great if we could rename the type to ty_index_fields
tt_index_fields TYPE SORTED TABLE OF ty_indexfield WITH UNIQUE KEY fieldname. | |
ty_index_fields TYPE SORTED TABLE OF ty_indexfield WITH UNIQUE KEY fieldname. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be at least against our DDIC coding conventions. We start simple type definitions with ty_, table types with tt_. If you have other guidelines and it is important for you I have no problem if we change this, but from our perspective this looks ok as it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I discussed this with the team. We would prefer to stick only to one option within this repository. I.e., types shall start with ty_
.
See also #357
and again, why not just make this part of TABL, it is logically part of TABL, the implementation is part of TABL? ensuring consistency across multiple files is more work, why not just make it consistent by design? |
Independent how we solve it (as part of the *.tabl.json-file or as dedicated file(s)) I would prefer to keep it also as close as possible how it is/will be provided in the development environment. |
in a typical development environment, I think its pretty common to keep the table definition and index definitions close eg. CREATE TABLE and CREATE INDEX as part of the same schema file, or else it gets difficult to keep track of the dependencies same problem here, just not a normal SQL schema language |
Co-authored-by: Michael Schneider <[email protected]>
Co-authored-by: Michael Schneider <[email protected]>
Co-authored-by: Michael Schneider <[email protected]>
I just want to summarize which options I see to cover indexes of TABL: a) The indexes will be part of this file t100.tabl.json file I guess it would help taking the whole file format of TABL into account Furthermore, extension indexes can be also created as dedicated transport object (R3TR XINX) which represents one index. |
I think "b)" has more sub-options, as the source code for table definitions, I dont think it covers POOL/CLUSTER tables? |
Co-authored-by: Michael Schneider <[email protected]>
- unique secondary index on fields table defined - no_db_index field added - fields for full text indexes added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"! <p class="shorttext">Header</p> | ||
"! Header | ||
"! $required | ||
header TYPE if_aff_types_v1=>ty_header_60, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a full-blown header
? I guess the object needs only a description. Therefore, you might want to change the type to zif_aff_types_v1=>ty_header_only_description
header TYPE if_aff_types_v1=>ty_header_60, | |
header TYPE zif_aff_types_v1=>ty_header_only_description, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, we need a full-blown header with abap_language_version. No change here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, for R3TR XINX, you will need it.
But for LIMU objects, I expect the ABAP language version and the original language are specified for the table.
I would create different headers for R3TR XINX and LIMU XINX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we can do that. Given that we have then two different interfaces (IF_AFF_INDX, IF_AFF_XINX) but just one editor for both objects - which interface/JSON should we take for the editor? Does it matter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two additional comments related to full-text indexes. I think I missed to add them in my previous review.
Co-authored-by: Michael Schneider <[email protected]>
delete obsolete files
Distinguish between token index and fulltext index, separate structure for fulltext index properties, property "no_db_index" added
I close this PR. No updates for more than one year. |
AFF file format for ABAP DDIC secondary indexes